How to avoid installing Apache when installing php7.1 on Ubuntu 16.04?

Asked

Viewed 102 times

0

I have the following code that installs php7.1 on Ubuntu 16.04:

sudo apt-get install -y software-properties-common
sudo add-apt-repository -y ppa:ondrej/php
sudo apt-get update

sudo apt-get install -y php7.1
#Modules
sudo apt-get install -y php7.1-cli 
sudo apt-get install -y php7.1-common 
sudo apt-get install -y php7.1-json 
sudo apt-get install -y php7.1-opcache 
sudo apt-get install -y php7.1-mysql 
sudo apt-get install -y php7.1-mbstring 
sudo apt-get install -y php7.1-mcrypt 
sudo apt-get install -y php7.1-zip 
sudo apt-get install -y php7.1-fpm
sudo apt-get install -y php7.1-xml
sudo apt-get install -y php7.1-xmlrpc
#sudo apt-get install -y php-token-stream

As noted below, it also installs Apache, and offers no options.

inserir a descrição da imagem aqui

My interest is to use NGINX, not Apache.

So I would like to know if there is any way to install php7.1 without going through apache installation?

  • Tried to install each module separately to see which one is adding Apache?

  • Simple, just install the Nginx sudo apt install nginx, if not installed, and do not execute the command sudo apt-get install -y php7.1 and ready.

1 answer

0

The php7.1, by default, already comes with apache, you can remove it, but...

  1. You can use the apt-get remove apache2* && apt-get purge apache2

  2. You can "build" the PHP manually.

But you can install the php7.1-fpm also.

  • Hi Valdeir, I think q a . best way will be to disable Apache. Thanks

Browser other questions tagged

You are not signed in. Login or sign up in order to post.