php-fpm自動啟動方式

來源:互聯網
上載者:User

標籤:虛擬機器   service   作業系統   start   

實驗環境:

VM虛擬機器

CentOS作業系統

第一種方式:通過指令碼

[[email protected] ~]# cd  /etc/init.d

[[email protected] init.d]# pkill  php-fpm

[[email protected] init.d]# ps  -ef|grep php-fpm

root      1657  1629  0 23:11 pts/0    00:00:00 grep php-fpm

[[email protected] init.d]# vi  php-fpm      #指令碼見附件

[[email protected] init.d]# chmod  a+x  php-fpm  #添加執行許可權

[[email protected] init.d]# chkconfig  --add  php-fpm  #加入服務

 [[email protected] init.d]# chkconfig  php-fpm  on   #開機自動啟動服務

[[email protected] init.d]# service php-fpm start 

[[email protected] init.d]# ps -ef|grep php-fpm

root      1673     1  0 23:13 ?        00:00:00 php-fpm: master process (/application/php5.3.27/etc/php-fpm.conf)

nginx     1674  1673  0 23:13 ?        00:00:00 php-fpm: pool www           

nginx     1675  1673  0 23:13 ?        00:00:00 php-fpm: pool www           

root      1677  1629  0 23:13 pts/0    00:00:00 grep php-fpm

第二種方式:

[[email protected] ~]# vi /etc/rc.local

#追加到末尾

/application/php/sbin/php-fpm

本文出自 “sky9890” 部落格,請務必保留此出處http://sky9896.blog.51cto.com/2330653/1881203

php-fpm自動啟動方式

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.