{"id":2083,"date":"2011-02-15T21:42:48","date_gmt":"2011-02-15T13:42:48","guid":{"rendered":"http:\/\/blog.myhz.com\/ivan\/?p=2083"},"modified":"2011-02-15T21:42:48","modified_gmt":"2011-02-15T13:42:48","slug":"myhz-com%e7%bd%91%e7%ab%99%e5%b9%b3%e5%8f%b0%e5%8d%87%e7%ba%a7%ef%bc%9afedora%e5%b9%b3%e5%8f%b0%e7%bd%91%e7%ab%99%e4%bc%98%e5%8c%96-%e9%87%87%e7%94%a8nginxphpmysqleaccelerator","status":"publish","type":"post","link":"https:\/\/ivan.xin\/?p=2083","title":{"rendered":"myhz.com\u7f51\u7ad9\u5e73\u53f0\u5347\u7ea7\uff1afedora\u5e73\u53f0\u7f51\u7ad9\u4f18\u5316 \u91c7\u7528nginx+php+mysql+eAccelerator"},"content":{"rendered":"<p>\u6ce8\u610f\u51e0\u4e2a\u95ee\u9898\uff1a<\/p>\n<p>1\u3001memcached\u548clibmemcached\u6bd4memcache\u6548\u679c\u8981\u597d\uff0c\u9002\u5408\u96c6\u7fa4<\/p>\n<p>2\u3001eAccelerator\u9002\u5408\u5355\u673a\uff0c\u5b89\u88c5\u4e86eAccelerator\u5c31\u6ca1\u5fc5\u8981\u518d\u5b89\u88c5memcached\u4e86<\/p>\n<p>3\u3001php 5.3.5\u81ea\u5df1\u5305\u542b\u4e86php-fpm\u548czend\uff0c\u4e0d\u9700\u8981\u91cd\u65b0\u5b89\u88c5<\/p>\n<p>\u5b89\u88c5\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<p>\u76f8\u5173\u7248\u672c\uff1a<\/p>\n<p>fedora 12 32\u4f4d<\/p>\n<p>php 5.3.5 \uff08\u5305\u542bzend \u548c php-fpm\uff09<\/p>\n<p>eaccelerator 0.9.6.1<\/p>\n<p>nginx-0.7.67-1.fc12.i686<\/p>\n<p>mysql-5.1.47-2.fc12.i686<\/p>\n<p>mysql-server-5.1.47-2.fc12.i686<\/p>\n<p>\u5b89\u88c5ftp\u767b\u9646\u8f6f\u4ef6<\/p>\n<p>[root@206089 ~]# yum -y install vsftpd<\/p>\n<p>[root@206089 local]# cd \/etc\/vsftpd\/<\/p>\n<p>[root@206089 vsftpd]# vi ftpusers ##\u6ce8\u91ca\u6389root<\/p>\n<p>[root@206089 vsftpd]# vi user_list ##\u6ce8\u91ca\u6389root<\/p>\n<p>[root@206089 vsftpd]# service vsftpd\u00a0 start<\/p>\n<p>\u5b89\u88c5\u5fc5\u8981\u5305<\/p>\n<p>[root@206089 vsftpd]# yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libpng libpng-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel gd-devel patch<\/p>\n<p>\u5b89\u88c5mysql<\/p>\n<p>[root@206089 vsftpd]# yum -y install mysql-devel<\/p>\n<p>[root@206089 bin]# yum -y install mysql-server<\/p>\n<p>[root@206089 vsftpd]# service mysqld start<\/p>\n<p>[root@206089 bin]# mysql<\/p>\n<p>mysql&gt; GRANT ALL PRIVILEGES ON *.* TO root@localhost IDENTIFIED BY 'root' WITH GRANT OPTION;<\/p>\n<p>mysql&gt; create database discuz;<\/p>\n<p>mysql&gt; exit<\/p>\n<p>\u5b89\u88c5php\uff08\u5df2\u7ecf\u5305\u542b\u4e86zend php-fpm\uff09<\/p>\n<p>[root@206089 vsftpd]# cd \/tmp<\/p>\n<p>[root@206089 php]# wget http:\/\/cn.php.net\/distributions\/php-5.3.5.tar.gz<\/p>\n<p>[root@206089 php]# tar zxvf php-5.3.5.tar.gz<\/p>\n<p>[root@206089 php]# cd php-5.3.5<\/p>\n<p>[root@206089 php-5.3.5]# .\/configure --prefix=\/usr\/local\/php --enable-fpm --with-fpm-user=www --with-fpm-group=www --with-pcre-regex --with-zlib --with-bz2 --enable-calendar --with-curl --enable-dba --with-libxml-dir --enable-ftp --with-gd --with-jpeg-dir --with-png-dir --with-zlib-dir --with-freetype-dir --enable-gd-native-ttf --enable-gd-jis-conv --with-mhash --enable-mbstring --with-mysql --with-mysql-sock --with-mysqli --enable-pcntl --with-pdo-mysql --enable-shmop --enable-sockets --enable-zip --with-pear=\/usr\/local\/lib\/php\/pear<\/p>\n<p>[root@206089 php-5.3.5]# make<\/p>\n<p>[root@206089 php-5.3.5]# make test<\/p>\n<p>[root@206089 php-5.3.5]# make install<\/p>\n<p>[root@206089 php-5.3.5]# \/usr\/sbin\/groupadd www -g 480<\/p>\n<p>[root@206089 php-5.3.5]# \/usr\/sbin\/useradd -u 480 -g www www<\/p>\n<p>[root@206089 php-5.3.5]# cp \/usr\/local\/php\/etc\/php-fpm.conf.default \/usr\/local\/php\/etc\/php-fpm.conf<\/p>\n<p>[root@206089 php-5.3.5]# cp sapi\/fpm\/init.d.php-fpm \/etc\/init.d\/php-fpm<\/p>\n<p>[root@206089 discuz]# chmod 700 \/etc\/init.d\/php-fpm<\/p>\n<p>[root@206089 discuz]# chown www:www\u00a0 \/etc\/init.d\/php-fpm<\/p>\n<p>[root@206089 php-5.3.5]# cp\u00a0 php.ini-development \/usr\/local\/php\/lib\/php.ini<\/p>\n<p>\u5b89\u88c5eAccelerator<\/p>\n<p>[root@206089 php-5.3.5]# cd \/tmp<\/p>\n<p>[root@206089 tmp]# wget http:\/\/bart.eaccelerator.net\/source\/0.9.6.1\/eaccelerator-0.9.6.1.zip<\/p>\n<p>[root@206089 tmp]# unzip eaccelerator-0.9.6.1.zip<\/p>\n<p>[root@206089 tmp]# cd eaccelerator-0.9.6.1<\/p>\n<p>[root@206089 eaccelerator-0.9.6.1]# \/usr\/local\/php\/bin\/phpize<\/p>\n<p>[root@206089 eaccelerator-0.9.6.1]# .\/configure -enable-eaccelerator=shared -with-php-config=\/usr\/local\/php\/bin\/php-config<\/p>\n<p>[root@206089 eaccelerator-0.9.6.1]# make<\/p>\n<p>[root@206089 eaccelerator-0.9.6.1]# make test<\/p>\n<p>[root@206089 eaccelerator-0.9.6.1]# make install<\/p>\n<p>\u5b89\u88c5nginx<\/p>\n<p>[root@206089 fpm]# yum -y install nginx<\/p>\n<p>[root@206089 nginx]# touch \/tmp\/php-cgi.sock<\/p>\n<p>[root@206089 nginx]# chmod 777 \/tmp\/php-cgi.sock<\/p>\n<p>[root@206089 nginx]# service httpd stop<\/p>\n<p>[root@206089 nginx]# yum -y remove httpd<\/p>\n<p>\u8986\u76d6\u4ee5\u4e0b\u914d\u7f6e\u6587\u4ef6<\/p>\n<p>\/etc\/rc.d\/rc.local<\/p>\n<p>\/etc\/nginx\/nginx.conf<\/p>\n<p>\/etc\/nginx\/fastcgi.conf<\/p>\n<p>\/usr\/local\/php\/lib\/php.ini<\/p>\n<p>\/usr\/local\/php\/etc\/php-fpm.conf<\/p>\n<p>\uff08 \u914d\u7f6e\u6587\u4ef6\u7684\u53c2\u6570\u8bf7\u6839\u636e\u4e3b\u673a\u6027\u80fd\u8fdb\u884c\u914d\u7f6e\uff0c\u5177\u4f53\u5185\u5bb9\u53ef\u4ee5\u8054\u7cfbsupport@myhz.com\u8fdb\u884c\u7d22\u53d6\u3002\uff09<\/p>\n<p>\u5b89\u88c5\u7f51\u7ad9\u7a0b\u5e8f\u8fdb\u884c\u6d4b\u8bd5<\/p>\n<p>[root@206089 nginx]# cd \/tmp<\/p>\n<p>[root@206089 tmp]# wget http:\/\/download.comsenz.com\/DiscuzX\/1.5\/Discuz_X1.5_SC_GBK.zip<\/p>\n<p>[root@206089 tmp]# unzip Discuz_X1.5_SC_GBK.zip<\/p>\n<p>[root@206089 tmp]# mv\u00a0 upload \/root\/htdocs<\/p>\n<p>[root@206089 tmp]# chown -R www:www \/root<\/p>\n<p>[root@206089 tmp]# chmod -R 777 \/root<\/p>\n<p>[root@206089 tmp]# chmod -R 700 \/root<\/p>\n<p>[root@206089 tmp]# echo \"kernel.shmmax = 134217728\" &gt;&gt; \/etc\/sysctl.conf<\/p>\n<p>[root@206089 tmp]# echo 134217728 &gt; \/proc\/sys\/kernel\/shmmax<\/p>\n<p>[root@206089 tmp]# \/etc\/init.d\/php-fpm start<\/p>\n<p>[root@206089 tmp]# nginx<\/p>\n<p>\u542f\u52a8\u7f51\u7ad9\u6d4b\u8bd5\uff0c\u7f51\u7ad9\u767b\u9646\u7528\u6237\u540d\u548c\u5bc6\u7801\u90fd\u662fadmin\uff0c\u6570\u636e\u5e93\u767b\u5f55\u7528\u6237\u540d\u548c\u5bc6\u7801\u90fd\u662froot\uff0c\u5b89\u88c5discuz x1.5\uff0c\u5728\u540e\u53f0\u4fee\u6539rewrite\u548c\u6c34\u5370\u8bbe\u7f6e\uff0c\u6d4b\u8bd5\u8fd9\u4e24\u4e2a\u529f\u80fd\uff0c\u6ca1\u6709\u95ee\u9898\u7684\u8bdd\u91cd\u542f\u4e3b\u673a<\/p>\n<p>[root@206089 tmp]# reboot<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6ce8\u610f\u51e0\u4e2a\u95ee\u9898\uff1a 1\u3001memcached\u548clibmemcached\u6bd4memcache\u6548\u679c\u8981\u597d\uff0c\u9002\u5408\u96c6\u7fa4 2\u3001eA...<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-2083","post","type-post","status-publish","format-standard","hentry","category-9"],"_links":{"self":[{"href":"https:\/\/ivan.xin\/index.php?rest_route=\/wp\/v2\/posts\/2083","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ivan.xin\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ivan.xin\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ivan.xin\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/ivan.xin\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2083"}],"version-history":[{"count":0,"href":"https:\/\/ivan.xin\/index.php?rest_route=\/wp\/v2\/posts\/2083\/revisions"}],"wp:attachment":[{"href":"https:\/\/ivan.xin\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2083"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ivan.xin\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2083"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ivan.xin\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2083"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}