In this tutorial we’ll install LAMP stack server on Ubuntu 18.04 LTS – LAMP Mean L=LINUX (OS) A=APACHE (Web Server) M=MySQL (Database) P=PHP (Language), LAMP stack is the minimal setup inorder to use php scripts (wordpress and other php based application) and best thing about LAMP stack is it will consume less resources than any other control panel.

Why we use LAMP setup and not the control panel ?

If you didn’t want any other services other than LAMP stack you should go with LAMP, if you need extended features like mail, integrated backup system etc you need to go with control panel.

Let’s get started with LAMP setup on ubuntu 18.04 LTS, Login as root onward :

4. Installing MySQL

Now at last we’ll install MySQL server via this command :

apt install mysql-server

then run this command to setup mysql root password :

mysql_secure_installation

eg. :

root@mysterdata:~# mysql_secure_installation
Securing the MySQL server deployment.
Connecting to MySQL using a blank password.
VALIDATE PASSWORD PLUGIN can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD plugin?
Press y|Y for Yes, any other key for No: no
Please set the password for root here.
New password:
Re-enter new password:
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.
Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
Success.
Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network.
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y
Success.
By default, MySQL comes with a database named 'test' that
anyone can access. This is also intended only for testing,
and should be removed before moving into a production
environment.
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y
- Dropping test database...
Success.
- Removing privileges on test database...
Success.
Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
Success.
All done!

5. Installing PHPMYADMIN (optional) :

This is the optional step to install PMA on your server :

apt install phpmyadmin

For the server selection, choose apache2.

Select yes when asked whether to use dbconfig-common to set up the database

You will be prompted for your database administrator’s password

You will then be asked to choose and confirm a password for the phpMyAdmin application itself