{"id":5692,"date":"2017-03-03T16:30:32","date_gmt":"2017-03-03T08:30:32","guid":{"rendered":"https:\/\/sdeno.com\/?p=5692"},"modified":"2017-03-31T16:59:26","modified_gmt":"2017-03-31T08:59:26","slug":"centos-6-x%e4%b8%80%e9%94%ae%e5%ae%89%e8%a3%85lamp%e7%8e%af%e5%a2%83","status":"publish","type":"post","link":"https:\/\/sdeno.com\/?p=5692","title":{"rendered":"centOS 6.x\u4e00\u952e\u5b89\u88c5lamp\u73af\u5883"},"content":{"rendered":"<p style=\"color: #444444;\">linux centos ubuntu\u5f00\u673a\u81ea\u52a8\u542f\u52a8<\/p>\n<p style=\"color: #444444;\"><strong style=\"font-weight: bold;\">\u7cfb\u7edf\u9700\u6c42<\/strong><\/p>\n<ul style=\"color: #444444;\">\n<li>\u7cfb\u7edf\u652f\u6301\uff1aCentOS\/Redhat\/Fedora<\/li>\n<li>\u5185\u5b58\u8981\u6c42\uff1a\u2265 512M<\/li>\n<li>\u786c\u76d8\u8981\u6c42\uff1a2GB\u4ee5\u4e0a\u7684\u5269\u4f59\u7a7a\u95f4<\/li>\n<li>\u670d\u52a1\u5668\u5fc5\u987b\u914d\u7f6e\u597d\u8f6f\u4ef6\u6e90\u548c\u53ef\u8fde\u63a5\u5916\u7f51<\/li>\n<li>\u5fc5\u987b\u5177\u6709\u7cfb\u7edf root \u6743\u9650<\/li>\n<li>\u5efa\u8bae\u4f7f\u7528\u5e72\u51c0\u7cfb\u7edf\u5168\u65b0\u5b89\u88c5<\/li>\n<\/ul>\n<p style=\"color: #444444;\"><strong style=\"font-weight: bold;\">\u652f\u6301\u7ec4\u4ef6<\/strong><\/p>\n<ul style=\"color: #444444;\">\n<li>\u652f\u6301 PHP \u81ea\u5e26\u6240\u6709\u7ec4\u4ef6<\/li>\n<li>\u652f\u6301 MySQL\u3001MariaDB\u3001SQLite \u6570\u636e\u5e93<\/li>\n<li>\u652f\u6301 oci8 \uff08\u53ef\u9009\u5b89\u88c5\uff09<\/li>\n<li>\u652f\u6301 pure-ftpd \uff08\u53ef\u9009\u5b89\u88c5\uff09<\/li>\n<li>\u652f\u6301 memcached \uff08\u53ef\u9009\u5b89\u88c5\uff09<\/li>\n<li>\u652f\u6301 ImageMagick \uff08\u53ef\u9009\u5b89\u88c5\uff09<\/li>\n<li>\u652f\u6301 GraphicsMagick \uff08\u53ef\u9009\u5b89\u88c5\uff09<\/li>\n<li>\u652f\u6301 Zend Guard Loader \uff08\u53ef\u9009\u5b89\u88c5\uff09<\/li>\n<li>\u652f\u6301 ionCube PHP Loader \uff08\u53ef\u9009\u5b89\u88c5\uff09<\/li>\n<li>\u652f\u6301 XCache \uff0cZend OPcache \uff08\u53ef\u9009\u5b89\u88c5\uff09<\/li>\n<li>\u81ea\u52a9\u5347\u7ea7 Apache\uff0cPHP\uff0cphpMyAdmin\uff0cMySQL \u6216 MariaDB \u81f3\u6700\u65b0\u7248\u672c<\/li>\n<li>\u547d\u4ee4\u884c\u65b0\u589e\u865a\u62df\u4e3b\u673a\uff0c\u64cd\u4f5c\u7b80\u4fbf<\/li>\n<li>\u4e00\u952e\u5378\u8f7d<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>1\uff0c\u5b89\u88c5\u4f9d\u8d56\u5305<\/p>\n<pre>yum -y install wget screen unzip\r\nscreen -S lamp<\/pre>\n<p>&nbsp;<\/p>\n<p>2\uff0c\u4e0b\u8f7d\u5b89\u88c5\u5305<\/p>\n<pre>wget -O lamp.zip https:\/\/github.com\/teddysun\/lamp\/archive\/master.zip\r\nunzip lamp.zip\r\ncd lamp-master\/\r\nchmod +x *.sh<\/pre>\n<p>&nbsp;<\/p>\n<p>3\uff0c\u5f00\u59cb\u5b89\u88c5<\/p>\n<pre>.\/lamp.sh 2&gt;&amp;1 | tee lamp.log<\/pre>\n<p>\u5b89\u88c5\u7684\u8fc7\u7a0b\u4e2d\u9009\u62e9\u4f60\u9700\u8981\u5b89\u88c5\u7684\u9009\u9879\u5373\u53ef\uff0c\u540c\u65f6\u8bbe\u7f6e\u5f00\u673a\u81ea\u52a8\u542f\u52a8<\/p>\n<pre>chkconfig httpd on   \/\/apache\u5f00\u673a\u81ea\u52a8\u542f\u52a8\r\nchkconfig mysqld on  \/\/mysql\u5f00\u673a\u81ea\u52a8\u542f\u52a8\r\n\r\n\u5173\u4e8echkconfig\u5f00\u673a\u81ea\u52a8\u542f\u52a8\uff0c\u8981\u4fdd\u8bc1\u4ee5\u4e0a\u547d\u4ee4\u80fd\u4f7f\u7528\u5c31\u5fc5\u987b\u6ee1\u8db3\u4ee5\u4e0b\u6761\u4ef6\uff1a\r\n1.\u786e\u4fdd\/etc\/rc.d\/init.d\/mysqld \u5b58\u5728\uff0c\u53ef\u4ee5\u4f7f\u7528service mysqld start\u80fd\u591f\u6b63\u5e38\u542f\u52a8\u00a0\r\n2.\u628amysqld\u6258\u7ba1\u7ed9chkconfig\uff1achkconfig --add mysqld\u00a0\r\n3.\u6267\u884cchkconfig mysqld on\r\n4.\u67e5\u770b\u662f\u5426\u8bbe\u7f6e\u6210\u529f\uff1achkconfig --list mysqld\r\n5.\u5982\u679c 0:off \u00a0 1:off \u00a0 2:on \u00a0 \u00a03:on \u00a0 \u00a04:on \u00a0 \u00a05:on \u00a0 \u00a06:off  \/\/2345\u90fd\u662fon\u8868\u793a\u8bbe\u7f6e\u6210\u529f\r\n6.\u5982\u679c\u6ca1\u6709\u6210\u529f\u624b\u52a8\u8bbe\u7f6e\u4e00\u4e0b\uff1achkconfig --level 2345 mysqld on\r\n<a href=\"http:\/\/blog.csdn.net\/chtdsl\/article\/details\/8644788\" target=\"_blank\">http:\/\/blog.csdn.net\/chtdsl\/article\/details\/8644788<\/a><\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>4\uff0c\u5b89\u88c5\u5176\u4ed6php\u6a21\u5757<\/p>\n<pre>\u4e0b\u8f7d\u5305\u542b\u6240\u6709\u5b89\u88c5\u5305\u7684\u6e90\u7801\uff08230MB\uff09\u6765\u5b89\u88c5\r\nwget http:\/\/lamp.teddysun.com\/lamp.tar.gz\r\ntar -zxf lamp.tar.gz\r\ncd lamp\/\r\nchmod +x *.sh<\/pre>\n<p>\u6839\u636e\u4f60\u9700\u8981\u5b89\u88c5\u7684\u6a21\u5757\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4<\/p>\n<ol style=\"color: #444444;\">\n<li>\uff08\u53ef\u9009\u5b89\u88c5\uff09\u6267\u884c\u811a\u672c xcache.sh \u5b89\u88c5 Xcache<\/li>\n<\/ol>\n<blockquote style=\"color: #444444;\"><p>.\/xcache.sh<\/p><\/blockquote>\n<ol style=\"color: #444444;\" start=\"2\">\n<li>\uff08\u53ef\u9009\u5b89\u88c5\uff09\u6267\u884c\u811a\u672c oci8_oracle11g.sh \u5b89\u88c5 oci8 \u6269\u5c55\u4ee5\u53ca oracle-instantclient11.2<\/li>\n<\/ol>\n<blockquote style=\"color: #444444;\"><p>.\/oci8_oracle11g.sh<\/p><\/blockquote>\n<ol style=\"color: #444444;\" start=\"3\">\n<li>\uff08\u53ef\u9009\u5b89\u88c5\uff09\u6267\u884c\u811a\u672c pureftpd.sh \u5b89\u88c5 pure-ftpd-1.0.42<\/li>\n<\/ol>\n<blockquote style=\"color: #444444;\"><p>.\/pureftpd.sh<\/p><\/blockquote>\n<ol style=\"color: #444444;\" start=\"4\">\n<li>\uff08\u53ef\u9009\u5b89\u88c5\uff09\u6267\u884c\u811a\u672c ZendGuardLoader.sh \u5b89\u88c5 Zend Guard Loader<\/li>\n<\/ol>\n<blockquote style=\"color: #444444;\"><p>.\/ZendGuardLoader.sh<\/p><\/blockquote>\n<ol style=\"color: #444444;\" start=\"5\">\n<li>\uff08\u53ef\u9009\u5b89\u88c5\uff09\u6267\u884c\u811a\u672c ioncube.sh \u5b89\u88c5 ionCube PHP Loader<\/li>\n<\/ol>\n<blockquote style=\"color: #444444;\"><p>.\/ioncube.sh<\/p><\/blockquote>\n<ol style=\"color: #444444;\" start=\"6\">\n<li>\uff08\u53ef\u9009\u5b89\u88c5\uff09\u6267\u884c\u811a\u672c ImageMagick.sh \u5b89\u88c5 imagick \u7684 PHP \u6269\u5c55<\/li>\n<\/ol>\n<blockquote style=\"color: #444444;\"><p>.\/ImageMagick.sh<\/p><\/blockquote>\n<ol style=\"color: #444444;\" start=\"7\">\n<li>\uff08\u53ef\u9009\u5b89\u88c5\uff09\u6267\u884c\u811a\u672c GraphicsMagick.sh \u5b89\u88c5 gmagick \u7684 PHP \u6269\u5c55<\/li>\n<\/ol>\n<blockquote style=\"color: #444444;\"><p>.\/GraphicsMagick.sh<\/p><\/blockquote>\n<ol style=\"color: #444444;\" start=\"8\">\n<li>\uff08\u53ef\u9009\u5b89\u88c5\uff09\u6267\u884c\u811a\u672c opcache.sh \u5b89\u88c5 Zend OPcache \u7684 PHP \u6269\u5c55<\/li>\n<\/ol>\n<blockquote style=\"color: #444444;\"><p>.\/opcache.sh<\/p><\/blockquote>\n<ol style=\"color: #444444;\" start=\"9\">\n<li>\uff08\u53ef\u9009\u5b89\u88c5\uff09\u6267\u884c\u811a\u672c memcached.sh \u5b89\u88c5 memcached \u53ca memcached \u7684 PHP \u6269\u5c55<\/li>\n<\/ol>\n<blockquote style=\"color: #444444;\"><p>.\/memcached.sh<\/p><\/blockquote>\n<ol style=\"color: #444444;\" start=\"10\">\n<li>\uff08\u53ef\u9009\u5b89\u88c5\uff09\u6267\u884c\u811a\u672c mongodb.sh \u5b89\u88c5 MongoDB \u7684 PHP \u6269\u5c55<\/li>\n<\/ol>\n<blockquote style=\"color: #444444;\"><p>.\/mongodb.sh<\/p><\/blockquote>\n<ol style=\"color: #444444;\" start=\"11\">\n<li>\uff08\u5347\u7ea7\u811a\u672c\uff09\u6267\u884c\u811a\u672c upgrade_php.sh \u5c06\u4f1a\u5347\u7ea7 PHP \u548c phpMyAdmin \u81f3\u6700\u65b0\u7248\u672c\u3002<\/li>\n<\/ol>\n<blockquote style=\"color: #444444;\"><p>.\/upgrade_php.sh 2&gt;&amp;1 | tee upgrade_php.log<\/p><\/blockquote>\n<ol style=\"color: #444444;\" start=\"12\">\n<li>\uff08\u5347\u7ea7\u811a\u672c\uff09\u6267\u884c\u811a\u672c upgrade_mysql.sh \u5c06\u4f1a\u5347\u7ea7 MySQL \u81f3\u5df2\u5b89\u88c5\u7248\u672c\u7684\u6700\u65b0\u7248\u672c\u3002<br \/>\n\u5347\u7ea7\u4e4b\u524d\u4f1a\u81ea\u52a8\u5907\u4efd\u5168\u90e8\u6570\u636e\u5e93\uff0c\u5728\u5347\u7ea7\u5b8c\u6210\u4e4b\u540e\u518d\u5c06\u5907\u4efd\u6062\u590d\u3002<\/li>\n<\/ol>\n<blockquote style=\"color: #444444;\"><p>.\/upgrade_mysql.sh 2&gt;&amp;1 | tee upgrade_mysql.log<\/p><\/blockquote>\n<ol style=\"color: #444444;\" start=\"13\">\n<li>\uff08\u5347\u7ea7\u811a\u672c\uff09\u6267\u884c\u811a\u672c upgrade_mariadb.sh \u5c06\u4f1a\u5347\u7ea7 MariaDB \u81f3\u5df2\u5b89\u88c5\u7248\u672c\u7684\u6700\u65b0\u7248\u672c\u3002<br \/>\n\u5347\u7ea7\u4e4b\u524d\u4f1a\u81ea\u52a8\u5907\u4efd\u5168\u90e8\u6570\u636e\u5e93\uff0c\u5728\u5347\u7ea7\u5b8c\u6210\u4e4b\u540e\u518d\u5c06\u5907\u4efd\u6062\u590d\u3002<\/li>\n<\/ol>\n<blockquote style=\"color: #444444;\"><p>.\/upgrade_mariadb.sh 2&gt;&amp;1 | tee upgrade_mariadb.log<\/p><\/blockquote>\n<ol style=\"color: #444444;\" start=\"14\">\n<li>\uff08\u5347\u7ea7\u811a\u672c\uff09\u6267\u884c\u811a\u672c upgrade_apache.sh \u5c06\u4f1a\u5347\u7ea7 Apache \u81f3\u5df2\u5b89\u88c5\u7248\u672c\u7684\u6700\u65b0\u7248\u672c\u3002<\/li>\n<\/ol>\n<blockquote style=\"color: #444444;\"><p>.\/upgrade_apache.sh 2&gt;&amp;1 | tee upgrade_apache.log<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p style=\"color: #444444;\"><strong style=\"font-weight: bold;\">\u4f7f\u7528\u63d0\u793a<\/strong><\/p>\n<blockquote style=\"color: #444444;\"><p>lamp add(del,list) \u521b\u5efa\uff08\u5220\u9664\uff0c\u5217\u51fa\uff09\u865a\u62df\u4e3b\u673a\u3002<br \/>\nlamp ftp(add|del|list) \u521b\u5efa\uff08\u5220\u9664\uff0c\u5217\u51fa\uff09ftp \u7528\u6237\u3002<br \/>\nlamp uninstall \u4e00\u952e\u5220\u9664 LAMP\uff08\u5207\u8bb0\uff0c\u5220\u9664\u4e4b\u524d\u8bf7\u6ce8\u610f\u5907\u4efd\u6570\u636e\uff01\uff09<\/p><\/blockquote>\n<p style=\"color: #444444;\"><strong style=\"font-weight: bold;\">\u7a0b\u5e8f\u76ee\u5f55<\/strong><\/p>\n<ul style=\"color: #444444;\">\n<li>MySQL \u5b89\u88c5\u76ee\u5f55: \/usr\/local\/mysql<\/li>\n<li>MySQL \u6570\u636e\u5e93\u76ee\u5f55\uff1a\/usr\/local\/mysql\/data\uff08\u9ed8\u8ba4\uff0c\u5b89\u88c5\u65f6\u53ef\u66f4\u6539\u8def\u5f84\uff09<\/li>\n<li>MariaDB \u5b89\u88c5\u76ee\u5f55: \/usr\/local\/mariadb<\/li>\n<li>MariaDB \u6570\u636e\u5e93\u76ee\u5f55\uff1a\/usr\/local\/mariadb\/data\uff08\u9ed8\u8ba4\uff0c\u5b89\u88c5\u65f6\u53ef\u66f4\u6539\u8def\u5f84\uff09<\/li>\n<li>PHP \u5b89\u88c5\u76ee\u5f55: \/usr\/local\/php<\/li>\n<li>Apache \u5b89\u88c5\u76ee\u5f55\uff1a \/usr\/local\/apache<\/li>\n<\/ul>\n<p style=\"color: #444444;\"><strong style=\"font-weight: bold;\">\u547d\u4ee4\u4e00\u89c8<\/strong><\/p>\n<ul style=\"color: #444444;\">\n<li>MySQL \u6216 MariaDB \u547d\u4ee4<\/li>\n<\/ul>\n<blockquote style=\"color: #444444;\"><p>\/etc\/init.d\/mysqld(start|stop|restart|status)<\/p><\/blockquote>\n<ul style=\"color: #444444;\">\n<li>Apache \u547d\u4ee4<\/li>\n<\/ul>\n<blockquote style=\"color: #444444;\"><p>\/etc\/init.d\/httpd(start|stop|restart|status)<\/p><\/blockquote>\n<ul style=\"color: #444444;\">\n<li>Memcached \u547d\u4ee4<\/li>\n<\/ul>\n<blockquote style=\"color: #444444;\"><p>\/etc\/init.d\/memcached (start|stop|restart|status)<\/p><\/blockquote>\n<p style=\"color: #444444;\"><strong style=\"font-weight: bold;\">\u7f51\u7ad9\u6839\u76ee\u5f55<\/strong><\/p>\n<p style=\"color: #444444;\">\u9ed8\u8ba4\u7684\u7f51\u7ad9\u6839\u76ee\u5f55\uff1a \/data\/www\/default<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ff0000;\">\u9ed8\u8ba4\u4fe1\u606f<\/span><\/p>\n<p>LAMP \u4f7f\u7528\u65b9\u6cd5\uff1a<\/p>\n<p>lamp (add, del, list)\uff1a\u521b\u5efa\uff0c\u5220\u9664\uff0c\u5217\u51fa\u865a\u62df\u4e3b\u673a<br \/>\nLAMP \u5347\u7ea7\u65b9\u6cd5\uff1a<\/p>\n<p>\u6267\u884c\u811a\u672c\uff1a.\/upgrade.sh<br \/>\nLAMP \u5378\u8f7d\u65b9\u6cd5\uff1a<\/p>\n<p>\u6267\u884c\u811a\u672c\uff1a.\/uninstall.sh<br \/>\n\u7a0b\u5e8f\u9ed8\u8ba4\u5b89\u88c5\u76ee\u5f55\uff1a<\/p>\n<p>Apache\uff1a\/usr\/local\/apache<br \/>\nPHP\uff1a\/usr\/local\/php<br \/>\nMySQL\uff1a\/usr\/local\/mysql<br \/>\nMariaDB\uff1a\/usr\/local\/mariadb<br \/>\nPercona\uff1a\/usr\/local\/percona<br \/>\n\u53ef\u7528\u547d\u4ee4\u4e00\u89c8\uff1a<\/p>\n<p>Apache\uff1a\/etc\/init.d\/httpd (start|stop|restart|status)<br \/>\nMySQL\uff1a\/etc\/init.d\/mysqld (start|stop|restart|status)<br \/>\nMariaDB\uff1a\/etc\/init.d\/mysqld (start|stop|restart|status)<br \/>\nPercona\uff1a\/etc\/init.d\/mysqld (start|stop|restart|status)<br \/>\nMemcached\uff1a\/etc\/init.d\/memcached (start|stop|restart)<br \/>\nRedis-server\uff1a\/etc\/init.d\/redis-server (start|stop|restart)<\/p>\n<p>\u4fee\u6539mysql\u4e25\u683c\u6a21\u5f0f\u8def\u5f84\uff1a<br \/>\n\/usr\/local\/mysql\/my.cnf<\/p>\n<p>\u7f51\u7ad9\u9ed8\u8ba4\u6839\u76ee\u5f55\uff1a<\/p>\n<p>\u7f51\u7ad9\u9ed8\u8ba4\u6839\u76ee\u5f55\uff1a\/data\/www\/default<\/p>\n<p><a href=\"http:\/\/qiaobook.cn\/?post=6\" target=\"_blank\">http:\/\/qiaobook.cn\/?post=6<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-\u6dfb\u52a0\u540c\u4e00\u4e2aip\u4e0d\u540c\u7aef\u53e3\u7ad9\u70b9&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n<p>\u7f16\u8f91\u6587\u4ef6\uff1a\/usr\/local\/apache\/conf\/extra\/httpd-vhosts.conf\uff0c\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u7801\uff08\u8def\u5f84\u6839\u636e\u60c5\u51b5\u4fee\u6539\u76f8\u5e94\u8def\u5f84\uff09<\/p>\n<pre>&lt;VirtualHost *:8180&gt;\r\n ServerAdmin localhost:8180\r\n DocumentRoot \"\/data\/www\/xgllseo\"\r\n ServerName localhost:8180\r\n #ErrorLog \"\/data\/wwwlog\/wwww.avalon123.com\/error.log\"\r\n #CustomLog \"\/data\/wwwlog\/wwww.avalon123.com\/com-access_log\" common\r\n &lt;Directory \/data\/www\/xgllseo&gt;\r\nOptions +Includes -Indexes\r\nAllowOverride All\r\nOrder Deny,Allow\r\nRequire all granted\r\n&lt;\/Directory&gt;\r\n&lt;\/VirtualHost&gt;<\/pre>\n<p>&nbsp;<\/p>\n<p>\u7f16\u8f91\u6587\u4ef6\uff1a\/usr\/local\/apache\/conf\/httpd.conf\uff0c\u6dfb\u52a0\u4e00\u4e2a8180\u7aef\u53e3<\/p>\n<pre>Listen 45.32.197.199:80 \r\nListen 45.32.197.199:8180<\/pre>\n<p>&nbsp;<\/p>\n<p>\u91cd\u542fapache<\/p>\n<pre>\/etc\/init.d\/httpd restart<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;\u4e3a\u7f51\u7ad9\u6dfb\u52a0SSL&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/p>\n<p>1\uff0c\u9996\u5148\u8981\u83b7\u5f97ssl\u8bc1\u4e66\uff0c\u5230\u7f51\u7ad9<a href=\"https:\/\/github.com\/letsencrypt\/letsencrypt\" target=\"_blank\">https:\/\/github.com\/letsencrypt\/letsencrypt<\/a>\u5177\u4f53\u6559\u7a0b\u53c2\u8003\u7f51\u7ad9\u5185\u5bb9\u3002<\/p>\n<pre><code class=\"language-bash\">1: Spin up a temporary webserver <span class=\"o\" style=\"font-weight: bold;\">(<\/span>standalone<span class=\"o\" style=\"font-weight: bold;\">)<\/span>\r\n2: Place files in webroot directory <span class=\"o\" style=\"font-weight: bold;\">(<\/span>webroot<span class=\"o\" style=\"font-weight: bold;\">)\r\n<\/span><\/code>\/\/\u9009\u62e9 webroot<\/pre>\n<p>&nbsp;<\/p>\n<p>\u8f93\u5165\u4f60\u7684\u57df\u540d<\/p>\n<pre><code class=\"language-bash\">Please enter in your domain name<span class=\"o\" style=\"font-weight: bold;\">(<\/span>s<span class=\"o\" style=\"font-weight: bold;\">)<\/span> <span class=\"o\" style=\"font-weight: bold;\">(<\/span>comma and\/or space separated<span class=\"o\" style=\"font-weight: bold;\">)<\/span>  <span class=\"o\" style=\"font-weight: bold;\">(<\/span>Enter <span class=\"s1\" style=\"color: #dd3322;\">'c'<\/span>\r\nto cancel<span class=\"o\" style=\"font-weight: bold;\">)<\/span>:www.xgllseo.com<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>\u8f93\u5165\u7f51\u7ad9\u8def\u5f84<\/p>\n<pre><code class=\"language-text\">Input the webroot for test.testnode.com: (Enter 'c' to cancel):\/data\/www\/xgllseo<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>\u7533\u8bf7\u6210\u529f\u5c31\u6709\u8fd9\u6837\u63d0\u793a\uff1a<\/p>\n<div class=\"highlight\">\n<pre><code class=\"language-bash\">Waiting <span class=\"k\" style=\"font-weight: bold;\">for<\/span> verification...\r\nCleaning up challenges\r\nGenerating key <span class=\"o\" style=\"font-weight: bold;\">(<\/span><span class=\"m\" style=\"color: #009999;\">2048<\/span> bits<span class=\"o\" style=\"font-weight: bold;\">)<\/span>: \/etc\/letsencrypt\/keys\/0000_key-certbot.pem\r\nCreating CSR: \/etc\/letsencrypt\/csr\/0000_csr-certbot.pem\r\n \r\nIMPORTANT NOTES:\r\n - Congratulations! Your certificate and chain have been saved at\r\n   \/etc\/letsencrypt\/live\/www.xgllseo.com\/fullchain.pem. Your cert\r\n   will expire on 2017-06-18. To obtain a new or tweaked version of\r\n   this certificate in the future, simply run certbot again. To\r\n   non-interactively renew *all* of your certificates, run <span class=\"s2\" style=\"color: #dd3322;\">\"certbot<\/span>\r\n<span class=\"s2\" style=\"color: #dd3322;\">   renew\"<\/span>\r\n - If you like Certbot, please consider supporting our work by:\r\n \r\n   Donating to ISRG \/ Let<span class=\"err\" style=\"color: #a61717;\">'<\/span>s Encrypt:   https:\/\/letsencrypt.org\/donate\r\n<\/code><\/pre>\n<p><code class=\"language-bash\">\u00a0<\/code><\/p>\n<p>\u67e5\u770b\u8bc1\u4e66\u6240\u5728\u76ee\u5f55\uff0c\u6267\u884ccertbot certificates\u53ef\u4ee5\u53d1\u73b0\u8bc1\u4e66\u548c\u79c1\u94a5\u90fd\u5df2\u7ecf\u5728\/etc\/letsencrypt\/live\u8fd9\u4e2a\u76ee\u5f55\u4e0b\u4e86<\/p>\n<\/div>\n<pre><code class=\"language-bash\">$ certbot certificates\r\nSaving debug log to \/var\/log\/letsencrypt\/letsencrypt.log\r\n\u200b\r\n-------------------------------------------------------------------------------\r\nFound the following certs:\r\n  Certificate Name: www.xgllseo.com\r\n    Domains: www.xgllseo.com\r\n    Expiry Date: 2017-06-18 04:09:00+00:00 <span class=\"o\" style=\"font-weight: bold;\">(<\/span>VALID: <span class=\"m\" style=\"color: #009999;\">87<\/span> days<span class=\"o\" style=\"font-weight: bold;\">)<\/span>\r\n    Certificate Path: \/etc\/letsencrypt\/live\/www.xgllseo.com\/fullchain.pem\r\n    Private Key Path: \/etc\/letsencrypt\/live\/www.xgllseo.com\/privkey.pem\r\n---------------------------------------------------------------------<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>2\uff0c\u6210\u529f\u7533\u8bf7\u5230\u8bc1\u4e66\u540e\u8bc1\u4e66\u57fa\u672c\u5728\/etc\/letsencrypt\/live\/xgllseo.com\u76ee\u5f55\u4e0b\uff0c\u5206\u522b\u8bb0\u5f55fullchain.pem\u3001privkey.pem\u7684\u8def\u5f84\u3002<\/p>\n<p>3\uff0c\u7f16\u8f91\/usr\/local\/apache\/conf\/extra\/httpd-ssl.conf\uff0c\u6dfb\u52a0\u521a\u521a\u90a3\u4e24\u4e2a\u8bc1\u4e66<\/p>\n<pre>&lt;VirtualHost *:443&gt;\r\n\r\n# General setup for the virtual host\r\nDocumentRoot \"\/data\/www\/xgllseo\"\r\n#DirectoryIndex index.php index.html index.htm\r\nServerName www.xgllseo.com:443\r\n#ServerAdmin you@example.com\r\n#ErrorLog \"\/usr\/local\/apache\/logs\/error_log\"\r\n#TransferLog \"\/usr\/local\/apache\/logs\/access_log\"\r\n\r\nSSLEngine on\r\n \r\n<span style=\"color: #ff0000;\">SSLCertificateFile \/etc\/letsencrypt\/live\/www.xgllseo.com\/fullchain.pem<\/span>\r\n<span style=\"color: #ff0000;\">SSLCertificateKeyFile \/etc\/letsencrypt\/live\/www.xgllseo.com\/privkey.pem<\/span><\/pre>\n<p>&nbsp;<\/p>\n<p>\u7ee7\u7eed\u4fee\u6539\uff0c\u7ed9443\u7aef\u53e3\u8bbf\u95ee\u8d4b\u503c\u6743\u9650<\/p>\n<pre>&lt;Directory \"\/data\/www\/xgllseo\"&gt;  #\u4fee\u6539\u76f8\u5e94\u8def\u5f84\r\n SSLOptions +StdEnvVars\r\n #\u6dfb\u52a0\u4ee5\u4e0b3\u6761\u4ee3\u7801\r\n Options Indexes FollowSymLinks\r\n AllowOverride None\r\n Require all granted\r\n&lt;\/Directory&gt;<\/pre>\n<p>&nbsp;<\/p>\n<p>4\uff0c\u7f16\u8f91\/usr\/local\/apache\/conf\/httpd.conf<\/p>\n<pre># Secure (SSL\/TLS) connections\r\nInclude conf\/extra\/httpd-ssl.conf  #\u628a \u6b64\u4ee3\u7801\u524d\u9762\u7684#\u5220\u9664\r\n#<\/pre>\n<p>\u5982\u679c\u8bbf\u95eehttps:\/\/www.xx.com\u7684\u65f6\u5019\u51fa\u73b0 bad require\u7684\u5b57\u6837\u90a3\u4e48\u5728\u6700\u5e95\u90e8\u7ee7\u7eed\u6dfb\u52a0<\/p>\n<pre>LimitRequestLine 40940\r\nLimitRequestFieldSize 40940<\/pre>\n<p>&nbsp;<\/p>\n<p>5\uff0c\u505a301\u8df3\u8f6c\uff0c\u5373\u4f7f\u8bbf\u95eehttp:\/\/www.xx.com\u4e5f\u81ea\u52a8\u8df3\u8f6c\u4e3ahttps:\/\/www.xx.com\u9875\u9762<\/p>\n<p>\u7f16\u8f91\uff1a\/usr\/local\/apache\/conf\/extra\/httpd-vhosts.conf<\/p>\n<pre><span style=\"color: #ff0000;\">RewriteEngine On<\/span>\r\n<span style=\"color: #ff0000;\">RewriteCond %{HTTPS} !=on<\/span>\r\n<span style=\"color: #ff0000;\">RewriteRule ^(.*) https:\/\/sdeno.com$1 [L,R=301]<\/span>\r\n&lt;\/VirtualHost&gt;<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>linux centos ubuntu\u5f00\u673a\u81ea\u52a8\u542f\u52a8 \u7cfb\u7edf\u9700\u6c42 \u7cfb\u7edf\u652f\u6301\uff1aCentOS\/Redhat\/Fedor [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39],"tags":[],"class_list":["post-5692","post","type-post","status-publish","format-standard","hentry","category-ubuntu"],"_links":{"self":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts\/5692","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5692"}],"version-history":[{"count":0,"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts\/5692\/revisions"}],"wp:attachment":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5692"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5692"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5692"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}