六、安装spawn-fcgi来运行php-cgi
yum install spawn-fcgi
七、下载spawn-fcgi 的启动脚本
wget http://bash.cyberciti.biz/dl/419.sh.zip
unzip 419.sh.zip
mv 419.sh /etc/init.d/php_cgi
chmod +x /etc/init.d/php_cgi
启动php_cgi
/etc/init.d/php_cgi start
查看进程
netstat -tulpn | grep :9000
若出现如下代表一切正常
tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 4352/php-cgi