remove default php 7 from fresh ubuntu 16.04 image

Posted September 23, 2017 2.3k views
PHPUbuntu 16.04

I’m trying to create an image so that others can install my server setup.

i used clone of my setup which does not include PHP 7 or Apache however when i upload the server setup file to a new server with fresh Ubuntu 16.04.

The problem is that my install image includes PHP 7.1 there is no mention of PHP 7.0 but when installing the cloned setup image the new fresh ubuntu 16.04 the server defaults to PHP 7.0. and also installs Apache. I would not be to bothered if it installed PHP 7.1 however it does not. PHP 7.1 is not installed.

I want to help others achieve the same setup as i am using to make it easy for them but its the first time i have done anything like this so i’m not even sure if apt-clone is the best solution. Please if anyone knows a better way I will also accept that as an answer.

Thanks in advance

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hi @dabber,

This sounds like a really cool idea. This seems it can be achieved by using orchestration tool like Puppet or Ansible.

I do feel like in this case Ansible would be a more desirable tool to use as Puppet is using for managing a lot of servers/droplet and it’s not really convenient to use it on a small scale. Ansible on the other hand is perfect for this kind of job. I’ll recommend digging more into it.

Ansible, will help with your exact problems, it can remove/add packages, change statuses of file etc etc.