2

I'm trying to install php7-fpm in my Ubuntu VPS. I've tried

sudo apt-add-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.0

Then, I did

service php7-fpm status

● php7-fpm.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

/etc/init.d/php-7.0.7-fpm start

-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

How do I properly install it ? and test if it is running ?

3
  • Are you sure php7.0 installs php7.0-fpm? I would assume you also need to install php7.0-fpm. – Rinzwind Aug 2 '16 at 18:40
  • I'm not sure, but php -v show that I have/using the 7 one. php7.0-fpm is what I am trying to install correct. – cyb3rZ Aug 2 '16 at 18:44
  • Why are you running PHP 7 from a third party repository? What Ubuntu are you on? (PHP 7 is default PHP version in Ubuntu) Note that php7.0-fpm is what you need to install, not php7.0 and nothing else. – Thomas Ward Jul 12 '17 at 0:33
3

do dpkg -l | grep fpm to confirm if you have php7.0-fpm installed. If not, install it manually:

sudo apt install php7.0-fpm

0

The service is called php7.0-fpm as you would get by listing the contents of the package:

dpkg -L php7.0-fpm | grep -E "/etc/init|/lib/systemd"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.