{"id":38010,"date":"2020-02-18T10:40:17","date_gmt":"2020-02-18T02:40:17","guid":{"rendered":"http:\/\/4563.org\/?p=38010"},"modified":"2020-02-18T10:40:17","modified_gmt":"2020-02-18T02:40:17","slug":"%e5%8f%97%e4%b8%8d%e4%ba%86%e5%ae%9d%e5%a1%94%ef%bc%8c%e5%88%86%e4%ba%abdebian10%e5%ae%89%e8%a3%85lnmp%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=38010","title":{"rendered":"\u53d7\u4e0d\u4e86\u5b9d\u5854\uff0c\u5206\u4eabDebian10\u5b89\u88c5LNMP\u6559\u7a0b"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>30826<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-1 14:34:54\t<\/p>\n<h3>\u53d7\u4e0d\u4e86\u5b9d\u5854\uff0c\u5206\u4eabDebian10\u5b89\u88c5LNMP\u6559\u7a0b<\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 30826 \u4e8e 2019-12-1 15:45 \u7f16\u8f91 <\/p>\n<p> \u8be6\u60c5\u89c1\u4e0a\u56de\uff0c\u5b9d\u5854\u7f16\u8bd1\u4e869\u4e2a\u5c0f\u65f6\u8fd8\u5931\u8d25\u4e86\uff1a<br \/>  https:\/\/www.hostloc.com\/thread-613931-1-1.html<\/p>\n<p>  \u5df2\u7ecf\u5378\u8f7d\u5b9d\u5854\uff0c\u5206\u4eab\u4e00\u4e2a\u81ea\u7528\u7684Debian10\u4e0b\u624b\u52a8\u5b89\u88c5LNMP\u7684\u6559\u7a0b\u3002<br \/>  \u4e5f\u6ca1\u6bd4\u9762\u677f\u590d\u6742\u5230\u54ea\u53bb\uff0c\u5b89\u88c5\u901f\u5ea6\u6709\u8d28\u7684\u98de\u8dc3\u3002<\/p>\n<p>  \u5148\u5347\u7ea7\u7cfb\u7edf\u7ec4\u4ef6\u5230\u6700\u65b0\uff1a<br \/>  apt update &amp;&amp; apt dist-upgrade<\/p>\n<p>  \u5b89\u88c5\u5e38\u7528\u7ec4\u4ef6\uff1a<br \/>  apt install cron rsync openssl xinetd haveged sshguard lsb-release ca-certificates apt-transport-https<\/p>\n<p>  \u521b\u5efa\/www\u76ee\u5f55\uff1a<br \/>  mkdir \/www<\/p>\n<p>  \u5b89\u88c5Nginx\uff1a<br \/>  apt install nginx<br \/>  service nginx start<\/p>\n<p>  \u5047\u5982\u6211\u6709abc.com\uff0c\u7528SFTP\u5efa\u7acb\u7f51\u7ad9\u914d\u7f6e\/etc\/nginx\/conf.d\/abc.conf\uff1a<br \/>  server {<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; listen 80;<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; server_name abc.com www.abc.com;<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; index index.html index.htm index.php;<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; root \/www\/abc;<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; if ($scheme != https) { \/\/\u5f3a\u5236HTTPS<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rewrite ^\/(.*) https:\/\/$server_name\/$1 permanent;<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; }<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; location ~* .php$ {<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; include fastcgi_params;<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fastcgi_pass unix:\/var\/php.sock;<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fastcgi_param SCRIPT_FILENAME $request_filename;<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fastcgi_param PHP_VALUE &quot;open_basedir=$document_root:\/tmp\/:\/proc\/&quot;;<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; }<br \/>  }<\/p>\n<p>  \u914d\u7f6e\u5b8c\u91cd\u542fNginx\uff1a<br \/>  service nginx restart<\/p>\n<p>  \u5b89\u88c5SSL\u7533\u8bf7\u7cfb\u7edf\uff1a<br \/>  wget https:\/\/dl.eff.org\/certbot-auto &#8211;no-check-certificate &amp;&amp; chmod a+x certbot-auto<\/p>\n<p>  \u6309\u63d0\u793a\u8f93\u5165\u9700\u8981\u8bc1\u4e66\u7684\u57df\u540d\uff0c\u5b89\u88c5\u8bc1\u4e66\uff1a<br \/>  .\/certbot-auto &#8211;nginx &#8211;no-redirect<\/p>\n<p>  \u7f16\u8f91\u8ba1\u5212\u4efb\u52a1\uff0c\u5b9a\u65f6\u7eed\u671fSSL\uff1a<br \/>  crontab -e<\/p>\n<p>  \u8ba1\u5212\u4efb\u52a1\u8fd9\u91cc\u9700\u8981\u4f7f\u7528nano\u7f16\u8f91\u5668\uff0c\u7c98\u8d34\u6b64\u547d\u4ee4\u5230\u6587\u4ef6\u5e95\u90e8\uff0c\u6309Ctrl+X\u9000\u51fa\u5e76\u9009\u62e9\u4fdd\u5b58\u3002<br \/>  0 1 * * * \/root\/certbot-auto renew &#8211;post-hook &quot;service nginx reload&quot;<\/p>\n<p>  \u5b89\u88c5\u6700\u65b0\u7248PHP\uff0c\u6570\u636e\u5e93\u81ea\u884c\u9009\u62e9\u7528sqlite\u8fd8\u662fmysql\uff1a<br \/>  apt install php-fpm php-xml php-opcache php-mbstring php-gd<br \/>  apt install php-sqlite3<br \/>  apt install php-mysql<\/p>\n<p>  \u5efa\u7acb\u5feb\u6377\u65b9\u5f0f\uff0c\u7b49PHP7.4\u6709\u4e86\u4ee5\u540e\uff0c\u5347\u7ea7PHP\u5e76\u91cd\u65b0\u5173\u8054php7.4-fpm.sock\u5c31\u884c\uff1a<br \/>  ln -s \/run\/php\/php7.3-fpm.sock \/var\/php.sock<br \/>  service php*-fpm start<\/p>\n<p>  \u5b89\u88c5MariaDB\uff0c\u4e0d\u7528MySQL\u7684\u53ef\u4ee5\u8df3\u8fc7\u4e86\uff1a<br \/>  apt install mariadb-server<br \/>  service mariadb start<\/p>\n<p>  \u542f\u52a8MariaDB\u914d\u7f6e\u5411\u5bfc\uff0c\u8ddf\u7740\u5411\u5bfc\u8d70\u5c31\u884c\uff0c\u914d\u7f6eroot\u5bc6\u7801\uff1a<br \/>  mysql_secure_installation<\/p>\n<p>  \u5efa\u7acb\u6570\u636e\u5e93\uff08\u6bd4\u5982abc\uff09\uff1a<br \/>  CREATE DATABASE `abc` CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;<\/p>\n<p>  \u5efa\u7acb\u6570\u636e\u5e93\u7528\u6237\uff08\u6bd4\u5982abc\uff0c\u5bc6\u7801123\uff09\uff1a<br \/>  CREATE USER &#8216;abc&#8217;@&#8217;localhost&#8217; IDENTIFIED BY &#8216;123&#8217;;<\/p>\n<p>  \u628a\u7528\u6237\u6388\u6743\u5230\u6570\u636e\u5e93\uff1a<br \/>  GRANT ALL ON abc.* TO &#8216;abc&#8217;@&#8217;localhost&#8217;;<\/p>\n<p>  \u5b8c\u4e8b\u4ee5\u540e\u5c31\u53ef\u4ee5\u7528\uff08\u7528\u6237abc\uff0c\u5bc6\u7801123\uff09\u767b\u5f55\u6570\u636e\u5e93abc\u4e86\u3002<\/p>\n<p>  \u5168\u90e8\u6559\u7a0b\u5b8c\u3002\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>aming<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-1 16:19:34\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u7ed9LZ\u8865\u5145\u4e0b\uff0c<\/p>\n<p>  MariaDB\uff08\u5b98\u65b9\uff0c\u8fd9\u6837\u53ef\u9009\u7248\u672c\uff0c\u6309\u6b65\u9aa4\u64cd\u4f5c\u5373\u53ef\uff09<br \/>  https:\/\/downloads.mariadb.org\/mariadb\/repositories\/#mirror=jaleco<\/p>\n<p>  \u7528 Percona \u7684\u8bdd\uff0c\u5219<\/p>\n<p>  wget https:\/\/repo.percona.com\/apt\/percona-release_latest.$(lsb_release -sc)_all.deb &amp;&amp; dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb<\/p>\n<p>  apt update &amp;&amp; apt install -y percona-server-server-5.7\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>aming<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-1 16:15:26\t<\/p>\n<h3><\/h3>\n<p>  \t\tILL \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-1 15:39<br \/>  \u7f16\u8bd1\u548c\u5b89\u88c5\u80fd\u4e00\u6837\u5417\u3002\u3002<\/p>\n<p> \u4f60\u60f3\u4e86\u89e3\u5dee\u5f02\uff0c\u53ef\u4ee5\u4e0a\u7f51\u67e5\u770b\u6587\u7ae0\uff0c\u6709\u4eba\u4e13\u95e8\u8dd1\u6d4b\u8bd5\uff0c\u56fd\u4eba\u6587\u7ae0\u4e5f\u6709\uff0c\u7ed3\u679c\u751a\u81f3\u662f\u5305\u6bd4\u7f16\u8bd1\u66f4\u4f18\u79c0\u3002<br \/>  \u53ef\u4ee5\u8ddf\u4f60\u8bf4\u76f8\u5dee\u5f88\u5fae\uff0c\u662f\u4f60\u4f53\u9a8c\u4e0d\u5230\u3002<br \/>  \u73b0\u5728\u5927\u6982\u4e5f\u5c31\u56fd\u4eba\u8fd8\u7279\u4e48\u8ff7\u4fe1centos+\u7f16\u8bd1\u5b89\u88c5php\u7684\uff0c\u8001\u5916\u57fa\u672c\u90fd\u662f\u76f4\u63a5\u5305\u5b89\u88c5\uff0c\u9047\u5230\u6ca1\u6709\u624d\u4f1a\u7f16\u8bd1\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>maiawpyg<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-1 14:57:21\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u624b\u52a8\u90a3\u4e48\u9999\u5417 \u4e00\u952e\u4e0d\u7528\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u5929\u6709\u70b9\u70ed<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-1 15:15:16\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u5927\u4f6c\u771f\u80fd\u6298\u817e\uff0c\u7f51\u7ad9\u6708\u5165\u8fc7\u4e09\u4e07\u4e86\u5427\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>nic2013<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-1 14:35:59\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u8fdb\u6765\u5b66\u4e60\u4e00\u4e0b\u3002\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>shares<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-1 14:39:00\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u8fd9\u4e2a\u6559\u7a0b\u4e0d\u9519<br \/>  \u4e00\u76f4\u7528lnmp<br \/>  \u73b0\u5728\u5e94\u8be5\u5230\u4e861.6\u4e86\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>cnly1987<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-1 14:41:24\t<\/p>\n<h3><\/h3>\n<p>  \t\twget http:\/\/soft.vpser.net\/lnmp\/lnmp1.6.tar.gz -cO lnmp1.6.tar.gz &amp;&amp; tar zxf lnmp1.6.tar.gz &amp;&amp; cd lnmp1.6 &amp;&amp; .\/install.sh lnmp\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>doing<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-1 14:42:03\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u4e00\u770b\u5927\u4f6c\u5c31\u662f\u571f\u8c6a\uff0c\u52a8\u4e0d\u52a8\u5c31update\uff0c\u5f88\u591a\u5c0f\u9e21update\u90fd\u5e26\u4e0d\u8d77\u6765\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>xcy1020<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-1 14:42:19\t<\/p>\n<h3><\/h3>\n<p>  \t\t:lol:lol:lol:loloneinstack\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>xuh<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-1 14:45:53\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u7528oneinstack\u4e86\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>asp<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-1 14:48:24\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u52a0\u6cb9~~~\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>myseil<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-1 14:48:51\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u6559\u7a0b\u5f88\u597d\u3002\u6211\u8fd8\u662f\u9009\u62e9\u4f7f\u7528\u5b9d\u5854\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>Crying<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2019-12-1 14:51:36\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u81ea\u5df1\u7f16\u8bd1\uff0c\u5b83\u80fd\u4e0d\u9999\u561b\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>30826 \u5927\u4f6c\u6709\u8bdd\u8bf4 : 201&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/38010"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=38010"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/38010\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=38010"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=38010"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=38010"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}