php-fpm啟動指令碼

來源:互聯網
上載者:User

標籤:

1.安裝php時,在源碼目錄下預設有個指令檔,拷貝到/etc/init.d目錄下就可以直接用

[[email protected] ~]# cp /usr/local/src/php-5.6.20/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm

2.注意,php-fpm啟動指令碼依賴與php-fpm.pid檔案,此時需要在php-fpm.conf開啟pid參數

[[email protected] ~]# vim /usr/local/php/etc/php-fpm.conf  1 ;;;;;;;;;;;;;;;;;;;;;  2 ; FPM Configuration ;  3 ;;;;;;;;;;;;;;;;;;;;;  4   5 ; All relative paths in this configuration file are relative to PHP‘s install  6 ; prefix (/usr/local/php-5.6.20). This prefix can be dynamically changed by using the  7 ; ‘-p‘ argument from the command line.  8   9 ; Include one or more files. If glob(3) exists, it is used to include a bunch of 10 ; files from a glob(3) pattern. This directive can be used everywhere in the 11 ; file. 12 ; Relative path can also be used. They will be prefixed by: 13 ;  - the global prefix if it‘s been set (-p argument) 14 ;  - /usr/local/php-5.6.20 otherwise 15 ;include=etc/fpm.d/*.conf 16  17 ;;;;;;;;;;;;;;;;;; 18 ; Global Options ; 19 ;;;;;;;;;;;;;;;;;; 20  21 [global] 22 ; Pid file 23 ; Note: the default prefix is /usr/local/php-5.6.20/var 24 ; Default Value: none 25 pid = run/php-fpm.pid             # 注釋取消 26 

3.啟動測試

[[email protected] ~]# /etc/init.d/php-fpm stopGracefully shutting down php-fpm . done[[email protected]-node01 ~]# /etc/init.d/php-fpm startStarting php-fpm  done

 

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.