Skip to content

Installing LAMP

Aravindh edited this page Dec 20, 2020 · 1 revision

As in the front page you are able to see the basic installation steps of Valainet server. In here you will see how to install the system with screenshots so you can understand and proceed with the installation better. Please raise an issue if you are in need of help. Please see the System Requirement page for minimum system requirement to run this software.

In this page we will see how to install LAMP stack in Ubuntu Server 20.04

1. Install Apache 2

sudo apt-get update

sudo apt-get install apache2

2. Set Global server name

sudo apache2ctl configtest
Output
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Syntax OK

Open the main configuration file in your text editor

sudo nano /etc/apache2/apache2.conf

Add the below text

ServerName server_domain_or_IP

Check for the error using

sudo apache2ctl configtest

Now the output should read

Output
Syntax OK

Now finally restart apache server to implement changes

sudo systemctl restart apache2

Add exception to firewall so you can access the application over the internet

sudo ufw allow in "Apache Full"

3. Install MySQL or other DB of your choice

sudo apt-get install mysql-server

optional : you can secure the mysql installation.

4. Install PHP

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

Finally restart Apache

sudo systemctl restart apache2

Creating Database

1. Sign in to MySQL

sudo mysql -u root

2. Create Database

Once inside MySQL. Enter the below command

CREATE DATABASE IF NOT EXISTS valai;