CentOS Tutorial – Install LAMP Stack on CentOS 7

CentOS Tutorial – This quick tutorial will show you how to install LAMP on CentOS 7. LAMP stands for Linux Apache MySQL and PHP, a great combination to build a powerful web server and web applications on top of Linux system. 

Steps to install LAMP on CentOS 7

Step 1. Update CentOS

First we need to make sure our system is up to date.

Step 2. Install Apache web server

Now start and enable Apache

Test the web server

Open a web browser and point to the CentOS IP address and you should see something like this

Step 3. Install MariaDB

Now we can start install MariaDB Server using this command

Start MariaDB service and enable it during startup

Secure MariaDB installation

Follow on screen wizard to complete this step. You will be asked to enter the root password which is empty (simply press enter) and then you can specify a new password for root user.

Now make sure MariaDB is up and running

Output:

Step 4. Install PHP

Now we need to install PHP on our system use this command instead

Output

Restart Apache

Check if PHP correctly installed

Create new file called info.php under /var/www/html directory

Now paste this line to it

Now open web browser and type the server ip address with info.php. For example in my case:

http://10.34.0.215/info.php

Done, now we have a working LAMP Server on CentOS 7 server. Thanks for reading this how to install LAMP on CentOS 7 Server. Cheers

3 Trackbacks / Pingbacks

  1. How to install Owncloud 10 on CentOS 7.3 Server - Free Linux Tutorials
  2. CentOS Tutorial - How to install PHPMyAdmin on CentOS 7.3
  3. Arch Linux Tutorial to install LAMP Server on Arch Linux 2017 Server

Leave a Reply

Your email address will not be published.


*