Install script for PHP and Nginx latest versions

I need to create the environment for my PHP code (Laravel) with latest nginx and latest PHP. The script should be optionally the single file able to update the PHP version or Nginx version if these are old.

Let me show you what I found:

But in there you are specifically set to a version php7.1

service php7.1-fpm restart

I know that Nginx configuration should mention the version of PHP used, so if the latest PHP is 7.1 or tomorrow 7.2 is it possible for this script to adopt.

What I liked in this script is:

apt-add-repository ppa:nginx/development -y
apt-add-repository ppa:ondrej/php -y

So just based on that you can always tell what is the latest version on Nginx and latest version of PHP in these repos.

My target platform is Ubuntu 16.04 LTS


Source : Link , Question Author : prosti , Answer Author : Community

Leave a Comment