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



我的 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

最新更新