我正在尝试在我的 Ubuntu VPS 中安装 php7-fpm。我试过
sudo apt-add-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.0
然后我就这么做了
服务 php7-fpm 状态
● php7-fpm.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
/etc/init.d/php-7.0.7-fpm 启动
-bash: /etc/init.d/php-7.0.7-fpm: No such file or directory
php-v 命令
PHP 7.0.8-4+deb.sury.org~xenial+1 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.8-4+deb.sury.org~xenial+1, Copyright (c) 1999-2016, by Zend Technologies
我该如何正确安装它?并测试它是否正在运行?
答案1
确认dpkg -l | grep fpm
是否已php7.0-fpm
安装。如果没有,请手动安装:
sudo apt install php7.0-fpm
答案2
php7.0-fpm
通过列出包的内容可以知道该服务的调用方式:
dpkg -L php7.0-fpm | grep -E "/etc/init|/lib/systemd"