centos6.5PHP啟動指令碼

技術小阿哥發表於2017-11-27

安裝完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

本文轉自 yawei555 51CTO部落格,原文連結:http://blog.51cto.com/huwei555/1623297,如需轉載請自行聯絡原作者


相關文章