WriteBash - Today, I will show you how to use the script to install LAMP (PHP 7) on Ubuntu 16. Installing LAMP stack on Ubuntu is pretty much used, this script will save you time. Installed quickly and successfully tested.
Server resource requirements
Server requirements are as follows:
- OS: Ubuntu 16.04.4 LTS 64bit.
- RAM: over 1GB memory.
- HDD: Minimum 1-2 GB of free space.
- IP: static IP, for example: 192.168.56.20
- User: root
Script to install LAMP on Ubuntu 16
Script will install the package in the LAMP stack as follows:
- Apache 2.4.18
- MariaDB 10.0.34
- PHP 7.0.25-0ubuntu0.16.04.1
The packages installed in this script are loaded from the official Ubuntu repository, without using any external repositories. You install the LAMP stack according to the following steps.
First, you download the script.
wget https://gitlab.com/Danny_Pham/WriteBash.com/raw/master/Install/04-Script_install_LAMP_PHP_7.0_on_Ubuntu_16.sh -O /home/install.sh
Next, you grant permission for the script.
chmod 700 /home/install.sh
And finally, execute the script using the following command.
Script will install in about 15 minutes, you can stand up to take a cup of coffee and come back.
Check the operation of LAMP
You can now open the browser and go to the page info.php for informations about PHP.
Next, type the following commands to check the status of the services.
To check Apache service, you type the below command.
systemctl status apache2
Check MariaDB service, you type the below command.
systemctl status mysql
To check the version of the installed software, you have the following commands.
Check Apache version.
To check MariaDB version.
And check PHP version.
So you have successfully installed LAMP stack on Ubuntu 16 quickly, now you can set up virtualhost for your website.If you liked this article, then please subscribe to our YouTube Channel for more video tutorials. You can also find us on Twitter and Facebook.
If you appreciate what we share in this blog, you can support us by:
- Stay connected to: Facebook | Twitter | Google Plus | YouTube
- Subscribe email to recieve new posts from us: Sign up now.
- Start your own blog with SSD VPS - Free Let's Encrypt SSL ($2.5/month).
- Become a Supporter - Make a contribution via PayPal.
- Support us by purchasing Ribbon Lite Child theme being using on this website.
We are thankful for your support.