Categories
All HowTo Linux Tips & Tricks

How to install LAMP Stack on Ubuntu 16.04 VPS

A quick guide on “How to install LAMP Stack on Ubuntu 16.04 VPS [PHP, MYSQL, APACHE2]

Done this yet? You should do it before you install LAMP stack on Ubuntu Ubuntu 16.04 VPS Setup

Update your package list and install Apache2

sudo apt-get update
sudo apt-get install apache2

Open up /etc/apache2/apache2.conf with your favorite text editor and set your Global ServerName

sudo nano /etc/apache2/apache2.conf

Add the following line somewhere to the file.

ServerName your_domain or ip_address

Save and close.

Check for syntax errors and restart apache

sudo apache2ctl configtest

If you see Syntax OK, continue

sudo systemctl restart apache2

Install MySQL

sudo apt-get install mysql

After installing and creating root password you should complete secure installation

mysql_secure_installation

Go through the installation and you’ve installed MySQL

Install PHP

sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql

Congrats! You have installed LAMP Stack! Feel free to ask questions or comment.

Check also these:

Upgrading Debian 8 “Jessie ” to Debian 9 “Stretch”
Cheap Europe VPS – As low as 1 euro a month

Leave a Reply

Your email address will not be published. Required fields are marked *