I needed to upgrade my Ubuntu 14.04 LAMP (Linux, Apache, MySql, PHP5) stack development machine to a LEMP (Linux, Nginx, MySQL, PHP7). My first instinct was to turn to the internet and consult the millions of blog posts and forum posts, but they all seem to be lacking vital bit of information I was after in my particular situation.
I have detailed the complete steps I undertook to complete the upgrade.
Remove PHP 5
I wanted to completely remove PHP5 from my workstation. I found by using the bash command was the best approach
Although this command is not necessarily for removing phpMyAdmin, it appears when you remove php5-mcrypt it removes phpmyadmin.
Once complete ensure all is clean by executing an autoremove
Our workstation should now be ready for re-configuring it for LEMP.
It seems that PHP7 is not currently in the default ubuntu repository, so we will need to add a private repository .
Now install all the PHP modules required
Update NGINX Default site configuration
I just used Gedit to open the file and copied and pasted the configuration over.
Save and close Gedit and now we can test our configuration
We also edit the PHP.ini file
cgi.fix_pathinfo without quotation mark. change its value to 0 like this:
cgi.fix_pathinfo=0 and save it
Install the new PHP-FPM package
A unique background as business owner, marketing, software development and business development ensures that he can offer the optimum business consultancy services across a wide spectrum of business challenges.
Latest posts by Gary Woodfine (see all)
- How to convert Word Documents to Text Files with Python - May 22, 2019
- How to start a new project using Vue.js - April 29, 2019
- How to install DynamoDb on local Ubuntu Development - April 17, 2019