Arduino (1) Brainf**k (1) Bugs (3) C (1) HTML (1) Install (3) Linux (27) Maths (1) Python (12) Raspberry Pi (4)

Thursday, 9 November 2017

How to install a LAMP stack on Ubuntu server 16.04

A LAMP stack is a Apache web server that runs on Linux and has PHP and MySQL capabilities.
Firstly, we need to update the package lists:
sudo apt-get update
Installing the Apache web server:
sudo apt-get install apache2
Testing the web server:
Find the local ip address of the server:
Now when you visit this ip address in a browser you should see a page that looks something like this:

Installing PHP:
sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql
Installing MySQL:
sudo apt-get install mysql-server
Setting up MySQL:
When installing mysql you will be asked for a root password for the MySQL-server.