安装完PHP后,自身有启动脚本,比如本人安装路径为:/usr/local/php
源码路径为:/usr/local/src/php-5.4.38
[root@lnmp ~]# cp /usr/local/src/php-5.4.38/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
[root@lnmp ~]# chmod +x /etc/init.d/php-fpm #赋予执行权限
[root@lnmp ~]# chkconfig --add php-fpm
[root@lnmp ~]# service php-fpm status
php-fpm is stopped
[root@lnmp ~]# service php-fpm start
Starting php-fpm done
本人由于之前是通过[root@lnmp ~]# /usr/local/php/sbin/php-fpm 已经开启php,此时如果报错
[root@lnmp ~]# /etc/init.d/php-fpm start
Starting php-fpm [23-Mar-2015 19:51:10] ERROR: unable to bind listening socket for address '127.0.0.1:9000': Address already in use (98)
[23-Mar-2015 19:51:10] ERROR: FPM initialization failed
failed
[root@lnmp ~]# /etc/init.d/php-fpm stop
Gracefully shutting down php-fpm . done
[root@lnmp ~]# /etc/init.d/php-fpm start
Starting php-fpm done
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。