{"id":751,"date":"2020-08-30T16:29:54","date_gmt":"2020-08-30T08:29:54","guid":{"rendered":"https:\/\/www.kiccleaf.com\/?p=751"},"modified":"2020-08-30T16:52:02","modified_gmt":"2020-08-30T08:52:02","slug":"freebsd12%e5%ae%89%e8%a3%85nginx1-18php7-4mariadb10-4%e7%9a%84%e7%bd%91%e7%ab%99%e7%8e%af%e5%a2%83","status":"publish","type":"post","link":"http:\/\/www.kiccleaf.com\/?p=751","title":{"rendered":"FreeBSD12\u5b89\u88c5Nginx1.18+PHP7.4+MariaDB10.4\u7684\u7f51\u7ad9\u73af\u5883"},"content":{"rendered":"\n<p>\u4e2a\u4eba\u5f88\u559c\u6b22FreeBSD\u7cfb\u7edf\uff0c\u7b80\u5355\uff0c\u5360\u7528\u8d44\u6e90\u5c11\uff0c\u5728\u7f51\u7ad9\u5927\u5e76\u53d1\u5904\u7406\u65b9\u9762\u6027\u80fd\u6bd4Linux\u8981\u597d\u5f88\u591a\uff0c\u7a33\u5b9a\u8fd0\u884c\u4e09\u4e94\u5e74\u90fd\u4e0d\u7528\u91cd\u542f\uff0c\u56e0\u4e3a\u4e4b\u524d\u505a\u5e7f\u544a\u6295\u653e\u7cfb\u7edf\uff0c\u6bcf\u5929\u5927\u5e76\u53d1300\u591a\u4e07\uff0cLinux\u5e76\u53d1\u4e00\u4e0a\u6765\u538b\u529b\u5c31\u5927\u7cfb\u7edf\u5c31\u6162\u4e0b\u6765\uff0c\u641e\u4e0d\u597d\u5c31\u6302\u673a\u4e86\uff0c\u7136\u800cFreeBSD\u5b89\u7136\u65e0\u6059\uff0c\u6240\u4ee5\u8fd8\u6709\u4ec0\u4e48\u7406\u7531\u4e0d\u9009\u62e9\u8fd9\u4e48\u4f18\u79c0\u7684\u7cfb\u7edf\u6765\u505a\u5927\u5e76\u53d1\u670d\u52a1\u5462\uff1f\uff08\u5f53\u7136\u8fd9\u91cc\u8fd8\u6d89\u53ca\u5230\u5f88\u591a\u7cfb\u7edf\u5b89\u5168\u53ca\u4f18\u5316\u64cd\u4f5c\uff0c\u7b49\u7a7a\u4e86\u518d\u5206\u4eab\u7ed9\u5927\u5bb6\uff0c\u5148\u8bb0\u5f55\u4e00\u4e0b\u57fa\u672c\u73af\u5883\u7684\u642d\u5efa\uff09<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">\u5e38\u7528\u7684\u5de5\u5177\npkg install vim wget screen\n\u7f16\u8bd1\u6269\u5c55\u65f6\u7528\u5230\u7684\npkg install autoconf<\/code><\/pre>\n\n\n\n<p>\u8fd9\u91cc\u9700\u8981\u7684\u6269\u5c55\u5c31\u81ea\u5df1\u9009\u62e9\u589e\u52a0\u5427\uff0c\u4e0d\u77e5\u9053\u7684\u53ef\u4ee5\u7528\u624d\u4e0b\u5de5\u5177\u67e5\u51fa\u4f60\u60f3\u8981\u7684\u6269\u5c55\u5427<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">pkg search php74<\/code><\/pre>\n\n\n\n<p>\u5f00\u59cbNGINX+PHP7.4.9+MARIADB\u7684\u5b89\u88c5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">pkg install php74 php74-zlib php74-exif php74-gd php74-mbstring php74-xml php74-pdo php74-pdo_mysql php74-pdo_pgsql php74-mysqli php74-curl php74-opcache php74-intl php74-sockets php74-zip php74-openssl php74-bz2 php74-pecl-redis php74-session php74-json php74-dom php74-fileinfo php74-simplexml php74-simplexml php74-pdo_sqlite php74-iconv php74-pecl-imagick-im7 php74-filter php74-phar php74-calendar php74-ctype php74-exif php74-bcmath php74-dba php74-tokenizer php74-extensions php73-zip nginx-full mariadb104-server-10.4.13_4 mariadb104-client-10.4.13_4<\/code><\/pre>\n\n\n\n<p>\u5f00\u673a\u542f\u52a8\u9879\/etc\/rc.conf\u589e\u52a0\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"apacheconf\" class=\"language-apacheconf\">php_fpm_enable=\"yes\"\r\nnginx_enable=\"yes\"\r\nmysql_enable=\"yes\"\r\nmysql_pidfile=\"\/var\/db\/mysql\/mysql.pid\"\r\nmysql_optfile=\"\/usr\/local\/etc\/my.cnf\"<\/code><\/pre>\n\n\n\n<p>PHP\u914d\u7f6e\/usr\/local\/etc\/php-fpm.d\/www.conf<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"apacheconf\" class=\"language-apacheconf\">[www]\nuser = www\ngroup = www\n\n;listen = 127.0.0.1:9000\n \uff08\u6ce8\u91ca\u6389\u6216\u5220\u9664\uff0c\u6dfb\u52a0\u4ee5\u4e0b\u8fd9\u4e00\u884c\/tmp\/php-cgi.sock\uff09\nlisten = \/tmp\/php-cgi.sock\n\n\u5f00\u542f\u4ee5\u4e0b\u4e09\u884c\nlisten.owner = www\nlisten.group = www\nlisten.mode = 0660\n<\/code><\/pre>\n\n\n\n<p>\u4e3a\u4ec0\u4e48\u8981\u7528unix:\/tmp\/php-cgi.sock\u66ff\u4ee3127.0.0.1:9000\u5462\uff1f\u6700\u4e3b\u8981\u7684\u5c31\u662funix socket\u6bd4tcp\u5feb\uff0c\u6240\u4ee5\u5bf9\u5927\u5e76\u53d1\u7684\u7f51\u7ad9\u4f18\u5316\u8fc7\u540e\u6027\u80fd\u63d0\u5347\u4e0d\u5c11\uff0c\u8fd9\u4e00\u70b9\u4f60GET\u5230\u4e86\u5417\uff1f\u542f\u52a8php-fpm\u81ea\u52a8\u751f\u6210\/tmp\/php-cgi.sock\u3002<\/p>\n\n\n\n<p>\u5bf9php.ini\u6587\u4ef6\u7684\u4fee\u6539\uff0c\u589e\u52a0\u91cd\u8981\u7684\u51fd\u6570\u8fdb\u884c\u5c4f\u853d<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"apacheconf\" class=\"language-apacheconf\">disable_functions = passthru,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,popen,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server\n\u6839\u636e\u670d\u52a1\u5668\u5185\u5b58\u5927\u5c0f\u8c03\u6574\nmemory_limit = 128M\n\u4e0a\u4f20\u6587\u4ef6\u6700\u59275M\nupload_max_filesize = 5M\n\n\u6839\u636e\u9700\u8981\u5f00\u542fopcache\u7f13\u5b58\uff0c\u80fd\u63d0\u5347\u6027\u80fd\n[opcache]\nopcache.enable=1\nopcache.enable_cli=1\nopcache.memory_consumption=128\nopcache.interned_strings_buffer=8\nopcache.max_accelerated_files=10000\nopcache.max_wasted_percentage=5\nopcache.validate_timestamps=1\nopcache.revalidate_freq=10<\/code><\/pre>\n\n\n\n<p>validate_timestamps\u914d\u7f6e\u9879\u7528\u4e8e\u9a8c\u8bc1\u662f\u5426\u8981\u91cd\u65b0\u751f\u6210\u7f13\u5b58\u811a\u672c\uff0c \u5982\u679c\u8bbe\u7f6e\u4e3a 0\uff08\u6027\u80fd\u6700\u4f73\uff09\uff0c\u9700\u8981\u624b\u52a8\u5728\u6bcf\u6b21 PHP \u4ee3\u7801\u66f4\u6539\u540e\u624b\u52a8\u6e05\u9664 opcache\u3002\u9664\u4e86\u91cd\u542fphp-fpm\u7684\u8fdb\u7a0b\u53ef\u4ee5\u6e05\u7406opcache\u7f13\u5b58\u5916\uff0c \u901a\u8fc7PHP\u51fd\u6570\u53ef\u4ee5\u624b\u52a8\u6e05\u9664\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">&lt;?php opcache_reset();?><\/code><\/pre>\n\n\n\n<p>\u7f51\u7edc\u4e0a\u5176\u4ed6\u670b\u53cb\u8bf4\uff0c<strong>\u5f53PHP\u4ee5PHP-FPM\u7684\u65b9\u5f0f\u8fd0\u884c\u7684\u65f6\u5019\uff0copcache\u7684\u7f13\u5b58\u662f\u65e0\u6cd5\u901a\u8fc7php\u547d\u4ee4\u8fdb\u884c\u6e05\u9664\u7684\uff0c\u53ea\u80fd\u901a\u8fc7http\u6216cgi\u5230php-fpm\u8fdb\u7a0b\u7684\u65b9\u5f0f\u6765\u6e05\u9664\u7f13\u5b58\uff08\u6b64\u8bf4\u6cd5\u672c\u4eba\u672a\u9a8c\u8bc1\u8fc7\uff09\u3002<\/strong>\u6211\u914d\u7f6e\u7684\u751f\u4ea7\u73af\u5883\u4e00\u822c\u90fd\u4f1a\u901a\u8fc7\u91cd\u542fphp-fpm\u8fdb\u7a0b\u6765\u6e05\u9664\u7f13\u5b58\uff0c\u6240\u4ee5\u4e00\u822c\u4e00\u76f4\u7f13\u5b58\u7740\u9ad8\u6548\u3002<\/p>\n\n\n\n<p>validate_timestamps\u914d\u7f6e\u9879\u5982\u679c\u503c\u4e3a 0\uff0c\u90a3\u4e48 revalidate_freq \u5c06\u5931\u53bb\u4f5c\u7528\u3002<br>revalidate_freq \u7528\u4e8e\u63a7\u5236 opcache \u591a\u4e45\u751f\u6210\u4e00\u6b21\u7f13\u5b58\u5b57\u8282\u7801\uff0c\u8fd9\u91cc\u914d\u7f6e\u4e86\u9ed8\u8ba4 10s\u3002\u6240\u4ee5\u4e00\u822c\u6211\u4eec\u5728\u5f00\u53d1\u73af\u5883\u4e2d\u5c06\u4e0a\u9762\u4e24\u4e2a\u503c\u914d\u7f6e\u4e3a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"apacheconf\" class=\"language-apacheconf\">opcache.validate_timestamps=1;\r\nopcache.revalidate_freq=1;<\/code><\/pre>\n\n\n\n<p>php.net\u4e0a\u6709\u4eba\u63d0\u4f9b\u7684\u65b9\u6cd5\u5b58\u653e\u5230 \/usr\/local\/bin\/opcache-clear \uff0c\u9700\u8981\u91cd\u7f6e\u7684\u65f6\u5019\u6267\u884c\u4e00\u4e0b\uff1a &#8220;opcache-clear&#8221;\uff08\u4ec5\u4f9b\u53c2\u8003\uff09\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">#!\/bin\/bash\r\nWEBDIR=\/var\/www\/html\/\r\nRANDOM_NAME=$(head \/dev\/urandom | tr -dc A-Za-z0-9 | head -c 13)\r\necho \"&lt;?php opcache_reset(); ?>\" > ${WEBDIR}${RANDOM_NAME}.php\r\ncurl http:\/\/localhost\/${RANDOM_NAME}.php\r\nrm ${WEBDIR}${RANDOM_NAME}.php<\/code><\/pre>\n\n\n\n<p>PHP\u5f00\u53d1\u7684\u9488\u5bf9opcache\u8fdb\u884c\u56fe\u5f62\u5316\u7684\u53c2\u8003\uff1a<\/p>\n\n\n\n<p><a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/rlerdorf\/opcache-status\" target=\"_blank\">https:\/\/github.com\/rlerdorf\/opcache-status<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/PeeHaa\/OpCacheGUI\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/PeeHaa\/OpCacheGUI<\/a><\/p>\n\n\n\n<p>nginx.conf\u4e2d\u4fee\u6539<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"apacheconf\" class=\"language-apacheconf\"># fastcgi_pass 127.0.0.1:9000;\r\n\r\u6539\u4e3a\uff1a\nfastcgi_pass unix:\/tmp\/php-cgi.sock;\n\n# fastcgi_param  SCRIPT_FILENAME  \/scripts$fastcgi_script_name;\n\u6539\u4e3a:\nfastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;<\/code><\/pre>\n\n\n\n<p>\u9ed8\u8ba4WEB\u76ee\u5f55\uff1a\/usr\/local\/www\/nginx-dist \u6267\u884cPHP\u53ef\u80fd\u9700\u8981\u6dfb\u52a0\u76f8\u5e94\u7684\u6267\u884c\u6743\u9650\u53ca\u76ee\u5f55\u7528\u6237\u5f52www<br>\u4fdd\u5b58\u540e\u91cd\u542fphp-fpm\u548cnginx\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">root@kiccleaf:\/home # service php-fpm restart\nroot@kiccleaf:\/home # service nginx restart<\/code><\/pre>\n\n\n\n<p>\u542f\u52a8Mysql\uff0c\u6b63\u5e38\u60c5\u51b5\u4e0b<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">root@kiccleaf:\/usr\/local\/etc # service mysql-server start\r\nInstalling MariaDB\/MySQL system tables in '\/var\/db\/mysql' ...\r\nOK\r\n\r\nTo start mysqld at boot time you have to copy\r\nsupport-files\/mysql.server to the right place for your system\r\n\r\n\r\nTwo all-privilege accounts were created.\r\nOne is root@localhost, it has no password, but you need to\r\nbe system 'root' user to connect. Use, for example, sudo mysql\r\nThe second is mysql@localhost, it has no password either, but\r\nyou need to be the system 'mysql' user to connect.\r\nAfter connecting you can set the password, if you would need to be\r\nable to connect as any of these users with a password and without sudo\r\n\r\nSee the MariaDB Knowledgebase at http:\/\/mariadb.com\/kb or the\r\nMySQL manual for more instructions.\r\n\r\nYou can start the MariaDB daemon with:\r\ncd '\/usr\/local' ; \/usr\/local\/bin\/mysqld_safe --datadir='\/var\/db\/mysql'\r\n\r\nYou can test the MariaDB daemon with mysql-test-run.pl\r\ncd '\/usr\/local\/mysql-test' ; perl mysql-test-run.pl\r\n\r\nPlease report any problems at http:\/\/mariadb.org\/jira\r\n\r\nThe latest information about MariaDB is available at http:\/\/mariadb.org\/.\r\nYou can find additional information about the MySQL part at:\r\nhttp:\/\/dev.mysql.com\r\nConsider joining MariaDB's strong and vibrant community:\r\n<blockquote class=\"wp-embedded-content\" data-secret=\"U1lixARsIF\"><a href=\"https:\/\/mariadb.org\/get-involved\/\">Get Involved<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;Get Involved&#8221; &#8212; MariaDB.org\" src=\"https:\/\/mariadb.org\/get-involved\/embed\/#?secret=p8bI0kPSUs#?secret=U1lixARsIF\" data-secret=\"U1lixARsIF\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\r\n\r\nStarting mysql.\r\n<\/code><\/pre>\n\n\n\n<p>mysql\u5982\u679c\u8fdb\u7a0b\u4e2d\u6ca1\u6709\u770b\u5230\u8bf4\u660e\u542f\u52a8\u5931\u8d25\uff0c\u53ef\u4ee5\u770b\u9519\u8bef\u4fe1\u606f\u6587\u4ef6\uff1a\/var\/log\/mysql\/mysqld.err<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">2020-08-29 22:52:52 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins\r\n2020-08-29 22:52:52 0 [Note] InnoDB: Uses event mutexes\r\n2020-08-29 22:52:52 0 [Note] InnoDB: Compressed tables use zlib 1.2.11\r\n2020-08-29 22:52:52 0 [Note] InnoDB: Number of pools: 1\r\n2020-08-29 22:52:52 0 [Note] InnoDB: Using SSE2 crc32 instructions\r\n2020-08-29 22:52:52 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M\r\n2020-08-29 22:52:52 0 [Note] InnoDB: Completed initialization of buffer pool\r\n2020-08-29 22:52:52 0 [Note] InnoDB: 128 out of 128 rollback segments are active.\r\n2020-08-29 22:52:52 0 [Note] InnoDB: Creating shared tablespace for temporary tables\r\n2020-08-29 22:52:52 0 [Note] InnoDB: Setting file '.\/ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...\r\n2020-08-29 22:52:52 0 [Note] InnoDB: File '.\/ibtmp1' size is now 12 MB.\r\n2020-08-29 22:52:52 0 [Note] InnoDB: Waiting for purge to start\r\n2020-08-29 22:52:52 0 [Note] InnoDB: 10.4.13 started; log sequence number 61026; transaction id 21\r\n2020-08-29 22:52:52 0 [Note] InnoDB: Loading buffer pool(s) from \/var\/db\/mysql\/ib_buffer_pool\r\n2020-08-29 22:52:52 0 [Note] InnoDB: Buffer pool(s) load completed at 200829 22:52:52\r\n2020-08-29 22:52:52 0 [Note] Plugin 'FEEDBACK' is disabled.\r\n2020-08-29 22:52:52 0 [Note] Server socket created on IP: '127.0.0.1'.\r\n2020-08-29 22:52:52 0 [ERROR] Can't start server : Bind on unix socket: Permission denied\r\n2020-08-29 22:52:52 0 [ERROR] Do you already have another mysqld server running on socket: \/var\/run\/mysql\/mysql.sock ?\r\n2020-08-29 22:52:52 0 [ERROR] Aborting<\/code><\/pre>\n\n\n\n<p>\u5173\u952e\u7684\u9519\u8bef\u4fe1\u606f\u5df2\u7ecf\u63d0\u793a\uff1aCan&#8217;t start server : Bind on unix socket: Permission denied \u548cDo you already have another mysqld server running on socket: \/var\/run\/mysql\/mysql.sock ?\u542f\u52a8\u6743\u9650\u6709\u5173\uff0c\u9700\u8981\u627e\u5230\u542f\u52a8\uff1a\/var\/run\/mysql\u76ee\u5f55 \u6743\u9650\uff1aroot wheel\u9700\u8981\u4fee\u6539\u6210mysql\u7528\u6237\u6743\u9650\uff0c\u7136\u540e\u91cd\u542fmysql\u5c31\u6210\u529f\u4e86\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">\u539f\u76ee\u5f55\u6743\u9650\ndrwxr-xr-x  2 root  wheel      512 Aug 29 22:09 mysql\/\r\n\r\u53d8\u66f4\u76ee\u5f55\u6240\u6709\u8005\u6743\u9650\nroot@kiccleaf:\/var\/run # chown -R mysql:mysql mysql\/\r\n\r\u8fd0\u884cmysql\nroot@kiccleaf:\/var\/run # service mysql-server start\r\nStarting mysql.\r\n\u67e5\u770b\u4e00\u4e0bmysql\u76ee\u5f55\u4e0b\u662f\u5426\u751f\u6210\u4e86mysql.sock\u6587\u4ef6\nroot@kiccleaf:\/var\/run # ll mysql\/\r\ntotal 0\r\nsrwxrwxrwx  1 mysql  mysql  0 Aug 29 23:03 mysql.sock=\r\n\u67e5\u770b\u8fdb\u7a0b\u662f\u5426\u5df2\u7ecf\u542f\u52a8\uff0c\u627e\u5230mysqld_safe \nroot@kiccleaf:\/var\/run # ps aux\r\nmysql 1092   0.0  0.0  11988  2976  -  Ss   23:03     0:00.99 \/bin\/sh \/usr\/local\/bin\/mysqld_safe --defaults-extra-file=\/usr\/local\/etc\/my.cnf --user=mysql\n\n\u63a5\u4e0b\u53bb\u521d\u59cbmysql\u64cd\u4f5c\n\nroot@kiccleaf:\/var\/run # \/usr\/local\/bin\/mysql_secure_installation\r\n\r\nNOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB\r\n      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!\r\n\r\nIn order to log into MariaDB to secure it, we'll need the current\r\npassword for the root user. If you've just installed MariaDB, and\r\nhaven't set the root password yet, you should just press enter here.\r\n\r#\u8f93\u5165mysql\u7684root\u5bc6\u7801\u3002\u9ed8\u8ba4\u6ca1\u6709\uff0c\u76f4\u63a5\u56de\u8f66\nEnter current password for root (enter for none): \r\nOK, successfully used password, moving on...\r\n\r\nSetting the root password or using the unix_socket ensures that nobody\r\ncan log into the MariaDB root user without the proper authorisation.\r\n\r\nYou already have your root account protected, so you can safely answer 'n'.\r\n\r#\u662f\u5426\u5207\u6362\u5230unix\u5957\u63a5\u5b57\u8eab\u4efd\u9a8c\u8bc1[Y\/n]\nSwitch to unix_socket authentication [Y\/n] n\r\n ... skipping.\r\n\r\nYou already have your root account protected, so you can safely answer 'n'.\r\n\r#\u662f\u5426\u8bbe\u7f6eroot\u5bc6\u7801\uff0c\u9009Y\uff0c\u8f93\u51652\u6b21\u9700\u8981\u8bbe\u5b9a\u7684\u5bc6\u7801\nChange the root password? [Y\/n] Y\r\nNew password: \r\nRe-enter new password: \r\nPassword updated successfully!\r\nReloading privilege tables..\r\n ... Success!\r\n\r\n\r\nBy default, a MariaDB installation has an anonymous user, allowing anyone\r\nto log into MariaDB without having to have a user account created for\r\nthem.  This is intended only for testing, and to make the installation\r\ngo a bit smoother.  You should remove them before moving into a\r\nproduction environment.\r\n\r#\u662f\u5426\u5220\u9664\u533f\u540d\u7528\u6237?\u679c\u65ad\u5220\u9664\nRemove anonymous users? [Y\/n] Y\r\n ... Success!\r\n\r\nNormally, root should only be allowed to connect from 'localhost'.  This\r\nensures that someone cannot guess at the root password from the network.\r\n\r#\u662f\u5426\u4e0d\u5141\u8bb8\u8fdc\u7a0broot\u767b\u5f55\uff0c\u6b63\u5f0f\u73af\u5883\u4e0b\u5e94\u8be5\u9009\u62e9Y\uff0c\u6211\u662f\u5728\u6d4b\u8bd5\u73af\u5883\u9700\u8981\u8fde\u63a5\u3002\nDisallow root login remotely? [Y\/n] n\r\n ... skipping.\r\n\r\nBy default, MariaDB comes with a database named 'test' that anyone can\r\naccess.  This is also intended only for testing, and should be removed\r\nbefore moving into a production environment.\r\n\r#\u662f\u5426\u5220\u9664test\u6570\u636e\u5e93\nRemove test database and access to it? [Y\/n] Y\r\n - Dropping test database...\r\n ... Success!\r\n - Removing privileges on test database...\r\n ... Success!\r\n\r\nReloading the privilege tables will ensure that all changes made so far\r\nwill take effect immediately.\r\n\r#\u662f\u5426\u52a0\u8f7d\u6743\u9650\u4f7f\u4e4b\u751f\u6548\nReload privilege tables now? [Y\/n] Y\r\n ... Success!\r\n\r\nCleaning up...\r\n\r\nAll done!  If you've completed all of the above steps, your MariaDB\r\ninstallation should now be secure.\r\n\r\nThanks for using MariaDB!<\/code><\/pre>\n\n\n\n<p>\u5728\u9ed8\u8ba4\u7684WEB\u76ee\u5f55\u4e0b\/usr\/local\/www\/nginx-dist\u521b\u5efaindex.php\u5185\u5bb9\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">&lt;?php\nphpinfo();\n?><\/code><\/pre>\n\n\n\n<p>\u6253\u5f00\u6d4f\u89c8\u5668\uff0c\u8f93\u5165http:\/\/IP\u5730\u5740\/index.php\uff0c\u53ef\u4ee5\u770b\u5230\u6210\u529f\u7684\u9875\u9762\u4e86\u3002\u5230\u6b64FreeBSD12\u7cfb\u7edf\u4e0b\u7684\u57fa\u7840\u914d\u7f6e\u5df2\u7ecf\u5b8c\u6210\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"944\" height=\"940\" src=\"https:\/\/www.kiccleaf.com\/wp-content\/uploads\/2020\/08\/20200830161918.png\" alt=\"\" class=\"wp-image-771\" srcset=\"http:\/\/www.kiccleaf.com\/wp-content\/uploads\/2020\/08\/20200830161918.png 944w, http:\/\/www.kiccleaf.com\/wp-content\/uploads\/2020\/08\/20200830161918-300x300.png 300w, http:\/\/www.kiccleaf.com\/wp-content\/uploads\/2020\/08\/20200830161918-150x150.png 150w, http:\/\/www.kiccleaf.com\/wp-content\/uploads\/2020\/08\/20200830161918-768x765.png 768w\" sizes=\"auto, (max-width: 944px) 100vw, 944px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u4e2a\u4eba\u5f88\u559c\u6b22FreeBSD\u7cfb\u7edf\uff0c\u7b80\u5355\uff0c\u5360\u7528\u8d44\u6e90\u5c11\uff0c\u5728&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"http:\/\/www.kiccleaf.com\/?p=751\">Continue reading<span class=\"screen-reader-text\">FreeBSD12\u5b89\u88c5Nginx1.18+PHP7.4+MariaDB10.4\u7684\u7f51\u7ad9\u73af\u5883<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":7,"footnotes":""},"categories":[6],"tags":[8,120,68,33],"class_list":["post-751","post","type-post","status-publish","format-standard","hentry","category-freebsd","tag-freebsd","tag-mariadb","tag-nginx","tag-php","entry"],"views":2307,"_links":{"self":[{"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=\/wp\/v2\/posts\/751","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=751"}],"version-history":[{"count":23,"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=\/wp\/v2\/posts\/751\/revisions"}],"predecessor-version":[{"id":781,"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=\/wp\/v2\/posts\/751\/revisions\/781"}],"wp:attachment":[{"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=751"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=751"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=751"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}