Skip to main content
 首页 » 编程设计

php之如何在 127.0.0.1 :9000 上重新启动已编译的 php-fpm

2023年11月22日19952php

我的 ubuntu 上有 php 5.3.10。 现在我安装了 5.5.7 并想重新启动它但是在这样做时:

sudo  service php5-fpm restart 

它重启 php 5.3.10,而不是 5.7.7

通过做:

/usr/local/php5.5.7/sbin/php-fpm restart 

我得到:

Usage: php-fpm [-n] [-e] [-h] [-i] [-m] [-v] [-t] [-p <prefix>] [-g <pid>] [-c <file>] [-d foo[=bar]] [-y <file>] [-D] [-F] 
  -c <path>|<file> Look for php.ini file in this directory 
  -n               No php.ini file will be used 
  -d foo[=bar]     Define INI entry foo with value 'bar' 
  -e               Generate extended information for debugger/profiler 
  -h               This help 
  -i               PHP information 
  -m               Show compiled in modules 
  -v               Version number 
  -p, --prefix <dir> 
               Specify alternative prefix path to FastCGI process manager (default: /usr/local/php5.5.7). 
  -g, --pid <file> 
               Specify the PID file location. 
  -y, --fpm-config <file> 
               Specify alternative path to FastCGI process manager config file. 
  -t, --test       Test FPM configuration and exit 
  -D, --daemonize  force to run in background, and ignore daemonize option from config file 
  -F, --nodaemonize 
               force to stay in foreground, and ignore daemonize option from config file 
  -R, --allow-to-run-as-root 
               Allow pool to run as root (disabled by default) 

请您参考如下方法:

你可以通过使用服务来做到这一点

sudo service php5-fpm restart