After previously I made an article about how to install LEMP Stack on Ubuntu 18.04, now I will provide a guide for How to Install Lamp Stack on Ubuntu 18.04. What distinguishes between the two is the web server used, namely between Nginx and Apache server.
Between the two the best web server These have advantages and disadvantages of each, but both are the most popular web servers used around the world. For those of you who frequently use WordPress, you will see a lot web hosting You offer an Nginx or Apache server to run your website.
The term LAMP is an acronym for the names of four open-source components:
- L – Linux operating system
- A – Apache, HTTP and reverse proxy server
- M – MySQL or a relational database management system MariaDB
- P – Programming language PHP.
This series of tutorials will walk you through the steps required to install Apache, create an Apache virtual host, secure Apache with a free Let’s Encrypt SSL certificate, install and secure MySQL, and install PHP 7.2.
The detailed tutorials that are part of this series are listed at the end of this page.
If you want to quickly install a LAMP package and don’t want to read more detailed documentation, you can install LAMP Stack at Ubuntu 18.04 server You by following the Quick Guide article below.
Install LAMP Stack on Ubuntu 18.04 [Panduan Cepat]
This Quick Guide will show you the basic steps required to install the LAMP stack on an Ubuntu 18.04 server.
You will need to log into your Ubuntu using a user who has sudo privileges to be able to install the LAMP package. Read → How to Create a Sudo User and a Sudo Group on Ubuntu.
Step 1. Install Apache
Apache is available in the Ubuntu repositories. Please update the package index and install Apache with the following command:
$ sudo apt update
$ sudo apt install apache2
Step 2. Install MySQL
The next step is to install the MySQL package. For that please type the following command:
$ sudo apt install mysql-server
After the MySQL installation is complete, issue a command
mysql_secure_installation to increase the security of your MySQL installation:
$ sudo mysql_secure_installation
You will be prompted to set a root password, delete anonymous users, restrict root user access to the local machine and delete the test database. You must answer “Y” (yes) to all questions.
If you want to install MariaDB instead of MySQL, see my tutorial for instructions on how to install MariaDB on Ubuntu 18.04.
Step 3. Install PHP
Ubuntu 18.04 LTS ships with the latest and greatest PHP version 7.2. To install PHP and some of the most common PHP modules type the following command:
$ sudo apt install php libapache2-mod-php php-opcache php-cli php-gd php-curl php-mysql
After the PHP package is installed, restart Apache services by typing:
$ sudo systemctl restart apache2
And that’s a quick guide on how to install LAMP Stack (Linux, Apache, MySQL. For more detailed instructions on each step, please read the following tutorial:
And that’s a quick guide on how to install LAMP Stack (Linux, Apache, MySQL, PHP) on Ubuntu 18.04, I hope this article is useful and always follow the next linux tutorial just at verandalounge. Good luck 🙂