安装PHP
apt-get install php5apt-get install php5-fpmapt-get install php5-curlapt-get install libmcrypt4 php5-mcryptapt-get install php5-gdapt-get install php5-xmlrpcapt-get install php5-xslapt-get install libapache2-mod-php5apt-get install php5-mysql/etc/init.d/php5-fpm start查看php5运行进程
ps -waux 打开关闭php5进程
sudo service php5-fpm stopsudo service php5-fpm startsudo service php5-fpm restartsudo service php5-fpm status配置php5监听端口 /etc/php5/fpm/pool.d/www.conf把
listen = /var/run/php5-fpm.sock 改为
重新运行php进程
二、安装Nginx
安装最新的稳定版的nginx需要修改apt的源文件连接,修改完成后update,在安装即可
调试nginx与php的配合,修改default.conf文件 接触如下行注释 并把第34行的/var/www和root根目录对应
30 location ~ \.php$ {
31 root html;
32 fastcgi_pass 127.0.0.1:9000;
33 fastcgi_index index.php;
34 fastcgi_param SCRIPT_FILENAME /var/www$fastcgi_script_name;
35 include fastcgi_params;
36 }
热门评论
ubuntu 安装php5-fpm报错:
E: Package 'php5-fpm' has no installation candidate