{"id":327,"date":"2010-11-09T08:47:28","date_gmt":"2010-11-09T08:47:28","guid":{"rendered":""},"modified":"2017-06-22T11:51:57","modified_gmt":"2017-06-22T03:51:57","slug":"centos5-4-%e6%90%ad%e5%bb%balamp%e7%8e%af%e5%a2%83","status":"publish","type":"post","link":"https:\/\/dingxuan.info\/wp\/?p=327","title":{"rendered":"Centos5.4, 6, 7 \u642d\u5efaLAMP\u73af\u5883"},"content":{"rendered":"<p>\u53c8\u5728\u6298\u817eCentOS\uff0c\u4ee5\u524d\u8bb0\u4f4f\u7684\u5230\u4e86\u518d\u6b21\u7528\u7684\u65f6\u5019\u53c8\u5fd8\u4e86\u3002\u518d\u6b21\u603b\u7ed3\u8bb0\u5f55\u4e00\u4e0b\u3002<\/p>\n<p>1\u3001 \u5b89\u88c5\u7eaf\u51c0\u7cfb\u7edfCentos5.4\uff0c\u4e0d\u5b89\u88c5\u4efb\u4f55\u7ec4\u4ef6\uff1b\n2\u3001 \u66f4\u65b0\u7cfb\u7edfyum update -y\n3\u3001 \u5b89\u88c5VSFTP\u8f6f\u4ef6 yum install vsftpd -y\n4\u3001 \u5b89\u88c5MYSQL yum install mysql-server mysql mysql-devel -y<\/p>\n<p>CentOS7<\/p>\n<pre>yum install mariadb-server mariadb<\/pre>\n<p>5\u3001 \u5b89\u88c5Apache2 yum install httpd -y<\/p>\n<p>yum -y install epel-release\nyum -y install yum-axelget\nyum clean all &amp;&amp; yum makecache &amp;&amp; yum -y update<\/p>\n<p>echo -e &#8220;\\nalias vi=vim\\nalias grep=&#8217;grep &#8211;color&#8217;\\n&#8221; &gt;&gt;~\/.bashrc &amp;&amp; source ~\/.bashrc<\/p>\n<!--more-->\n<p><del>\u6dfb\u52a0centos\u5b98\u65b9\u6e90\uff0c\u5b89\u88c5PHP5.3<\/del>\n<del> vi \/etc\/yum.repos.d\/test.repo<\/del><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">[c5-testing]\n<del>name=CentOS-5 Testing<\/del>\n<del>baseurl=http:\/\/dev.centos.org\/centos\/$releasever\/testing\/$basearch\/<\/del>\n<del>enabled=1<\/del>\n<del>gpgcheck=1<\/del>\n<del>gpgkey=http:\/\/dev.centos.org\/centos\/RPM-GPG-KEY-CentOS-testing<\/del>\n<del>priority=1<\/del><\/pre>\n<p>[ 13-12-28 \u66f4\u65b0 ] \u6dfb\u52a0epel\u548cremi\u6e90\u3002<\/p>\n<p>rpm -Uvh <a href=\"http:\/\/download.fedoraproject.org\/pub\/epel\/6\/i386\/epel-release-6-8.noarch.rpm\">http:\/\/download.fedoraproject.org\/pub\/epel\/6\/i386\/epel-release-6-8.noarch.rpm<\/a>\nrpm -Uvh <a href=\"http:\/\/rpms.famillecollet.com\/enterprise\/remi-release-6.rpm\">http:\/\/rpms.famillecollet.com\/enterprise\/remi-release-6.rpm<\/a><\/p>\n<p>6\u3001 \u5b89\u88c5php\u652f\u6301 yum install php -y\n7\u3001 \u5b89\u88c5php\u6a21\u5757 yum install php-mysql php-gd php-imap php-odbc php-pear php-xml php-xmlrpc php-mcrypt php-mbstring php-mysqli -y<\/p>\n<p>\u88c5\u5b8cPHP\u518d\u628atest.repo\u6539\u4e2a\u540d\u5b57\u3002<\/p>\n<p>8\u3001 \u5b89\u88c5ZendOptimizer.3.3.3\ntar xzvf ZendOptimizer-3.3.3-linux.tar.gz\ncd ZendOptimizer-3.3.3-linux\n.\/install.sh<\/p>\n<p>9\u3001 \u914d\u7f6eVSFTP\u3001MYSQL\u3001Apache2\u81ea\u52a8\u542f\u52a8\nchkconfig vsftpd on\nchkconfig mysqld on\nchkconfig httpd on<\/p>\n<p>11\u3001 \u8bbe\u7f6eMYSQL\u6570\u636e\u5e93\u5bc6\u7801\uff1b\nmysqladmin -u root password \u201c\u5bc6\u7801\u201d\n\u8bbf\u95eemysql\u6570\u636e\u5e93\uff1amysql -uroot -p<\/p>\n<p>12\u3001\u914d\u7f6ePHP\n\u914d\u7f6ephp\u4f7f\u7528\u5185\u5b58\u6700\u5c0f\u503c\u3001\u4e0a\u4f20\u6587\u4ef6\u5927\u5c0f\u7b49\nvi \/etc\/php.ini\nmemory_limit=128M\npost_max_size=8M\nupload_max_filesize=2M<\/p>\n<p>13\u3001\u914d\u7f6eVSFTP\u8f6f\u4ef6\n\u521b\u5efa\u6ca1\u6709\u6743\u9650\u767b\u5f55\u7cfb\u7edf\u7684FTP\u5e10\u53f7\nadduser -d \/var\/www\/html\/www.esojourn.org -g ftp -s \/sbin\/nologin USERNAME\npasswd USERNAME<\/p>\n<p>\u8bbe\u7f6e\/home\/wordpress\u76ee\u5f55\u7684\u6743\u9650\u7ed9zhcxl\u7528\u6237\nchown USERNAME:USERNAME\u00a0\u00a0\/var\/www\/html\/www.esojourn.org<\/p>\n<p>\u53d6\u6d88\u533f\u540d\u7528\u6237\u7684\u767b\u5f55\u6743\u9650\nvi \/etc\/vsftpd\/vsftpd.conf\nanonymous_enable=NO<\/p>\n<p>\u628a\u6240\u6709FTP\u7528\u6237\u90fd\u9650\u5236\u5728\u5bb6\u76ee\u5f55\nvi \/etc\/vsftpd\/vsftpd.conf\n\u6dfb\u52a0\u4e00\u884cchroot_local_user=YES<\/p>\n<p>centos5: setsebool -P ftp_home_dir 1\ncentos6: setsebool -P allow_ftpd_full_access 1<\/p>\n<p>14\u3001\u914d\u7f6eApache2\nvi \/etc\/httpd\/conf\/httpd.conf<\/p>\n<p>10\u3001 \u542f\u52a8VSFTP\u3001MYSQL\u3001Apache2\nservice vsftpd start\nservice mysqld start\nservice httpd start<\/p>\n<p>CentOS7 : mysql_secure_installation<\/p>\n<p>[ 2011-7-21 ]\u3000\u53c8\u88c5\u4e86\u4e00\u53f0\u670d\u52a1\u5668\uff0c\u7ea0\u6b63\u4e86\u51e0\u4e2a\u9519\u8bef\u3002\n[ 2012-2-11 ]\u00a0\u00a0 \u5b89\u88c5\u5b8c\u540e\uff0c\u6ce8\u610f\u5b89\u5168\u9632\u62a4\uff0c\u89c1http:\/\/dingxuan.info\/blog\/post\/secure-web-server.php\n[ 2012-2-15 ]\u00a0\u00a0 \u4f18\u5316\u901f\u5ea6\uff0czend optimizer\u3002\n\u522b\u7528\u7f51\u4e0a\u7684atomic\u6e90\u3002\u53e6\u5916\u4e00\u5957\u5b89\u88c5\u811a\u672c\u6709\u65f6\u4e5f\u6709\u95ee\u9898\u3002\n\u76f4\u63a5\u5230\u5b98\u7f51\u4e0b\u8f7dso\u6587\u4ef6http:\/\/www.zend.com\/en\/downloads\/\u3002\u7528extension\u52a0\u8fdbphp.ini\u4e2d\u3002\n\u6d4b\u8bd5\u662f\u5426\u751f\u6548 php -v\n[ 2012-10-11 ]\u00a0\u00a0\u589e\u52a0\u4e86\u51e0\u4e2a\u5e38\u7528\u8f6f\u4ef6\u5305\u7684\u5b89\u88c5\uff0c\u6bd4\u5982mysqld-devel\u4e4b\u7c7b\u3002<\/p>","protected":false},"excerpt":{"rendered":"<p>\u53c8\u5728\u6298\u817eCentOS\uff0c\u4ee5\u524d\u8bb0\u4f4f\u7684\u5230\u4e86\u518d\u6b21\u7528\u7684\u65f6\u5019\u53c8\u5fd8\u4e86\u3002\u518d\u6b21\u603b\u7ed3\u8bb0\u5f55\u4e00\u4e0b\u3002 1\u3001 \u5b89\u88c5\u7eaf\u51c0\u7cfb\u7edfCentos5. &hellip; <a href=\"https:\/\/dingxuan.info\/wp\/?p=327\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">Centos5.4, 6, 7 \u642d\u5efaLAMP\u73af\u5883<\/span><\/a><\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[117],"tags":[79,78,126],"class_list":["post-327","post","type-post","status-publish","format-standard","hentry","category-network","tag-centos","tag-linux","tag-starred"],"_links":{"self":[{"href":"https:\/\/dingxuan.info\/wp\/index.php?rest_route=\/wp\/v2\/posts\/327","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dingxuan.info\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dingxuan.info\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dingxuan.info\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dingxuan.info\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=327"}],"version-history":[{"count":0,"href":"https:\/\/dingxuan.info\/wp\/index.php?rest_route=\/wp\/v2\/posts\/327\/revisions"}],"wp:attachment":[{"href":"https:\/\/dingxuan.info\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=327"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dingxuan.info\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=327"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dingxuan.info\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}