验主机3台:
server11:redis缓存服务器
server12:mysql服务器:client
serever13:ngnx+php-fpm,gearmand server,worker
server11:
首先安装redis服务器
server13:
rpm包安装nginx+php-fpm
vim /etc/php.ini
946 date.timezone = Asia/Shanghai
vim /etc/php-fpm.d/www.conf
#修改用户和组为nginx,原因是查看/etc/nginx/nginx.conf文件中记录了nginx默认以nginx用户身份启动
39 user = nginx
40 ; RPM: Keep a group allowed to write in log dir.
41 group = nginx
vim /etc/nginx/conf.d/default.conf
8 location / {
9 root /usr/share/nginx/html; 10 index index.php index.html index.htm; #添加php首页
11 }
30 location ~ \.php$ {
31 root html;
32 fastcgi_pass 127.0.0.1:9000;
33 fastcgi_index index.php;
34 fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html$fastcgi_script _name;
35 include fastcgi_params;
36 }
yum install -y