测试环境页面php+nginx搭建

 测试环境页面php+nginx搭建

主机:192.168.25.223

 

Download packages:

Rpm –ivh epel-release-5-4.noarch.rpm

rpm -ivh remi-release-5-7.el5.remi.noarch.rpm

 

yum install php.x86_64 --enablerepo=remi –y

yum install php-fpm --enablerepo=remi

yum install php-pear --enablerepo=remi

yum install php-mbstring --enablerepo=remi

yum install php-ldap --enablerepo=remi

yum install php-devel --enablerepo=remi

yum install php-pecl-memcache --enablerepo=remi

yum install nginx

yum install mysql x86_64 --enablerepo=remi

yum install php-mysqlnd --enablerepo=remi

 

cd /etc/nginx/   将目标主机上的nginx下的配置拷过来

 

新建/data/htdocs  将对应的目录拷至本地

 

主要更改配置nginx.conf:

         Include conf.d/*.conf;

         Include conf.d/*.cn;

         Include conf.d/*.net;

         Include conf.d/*.com

         Include conf.d/*.org

更改php-fpm.d下的www.conf配置

listen = 127.0.0.1:9000(注释)

Listen = /tmp/php-cgi.sock

 

编辑memcache.ini ,去掉注释:

Session.save_handler=memcache;

Session.save_path=”tcp://192.168.92.223:11211?persistent=1&weight=1&timeout=1&retry_interval=15”,并将tcp改成192.168.25.223

重启fpm

/etc/init.d/php-fpm restart

 

从目标主机上找到hash8.so拷至本地对应目录

更改vim /etc/php.ini,在dynamic extensions这行下面添加extensionion=hash8.so

 

服务启动:

/etc/init.d/php-fpm start

/etc/init.d/nginx start

/etc/init.d/memcached start

 

你可能感兴趣的:(职场,休闲,测试环境,php+nginx)