LAMP is a combination of operating system and open-source software stack. The acronym of LAMP is derived from first letters of Linux, Apache HTTP Server, MySQL/MariaDB database, and PHP/Perl/Python.
In this tutorial, let us see how to setup LAMP server on CentOS / RHEL 7.
Setup Hostname and point it to your server ip
edit your hostname at
point your hostname to your ip address
reboot the server
in my case my site is registered through godaddy so i need to add an A Record to my dns follow the below steps
test the ping result
Installing LAMP with phpMyAdmin all together
but before and EPEL to your repo
yum install epel-release yum update
yum install httpd mariadb-server mariadb php php-mysql php-gd php-pear phpmyadmin
Configuring LAMP Server
1) for MariaDB
start and enable mariadb
systemctl start mariadb systemctl enable mariadb
set password for mariadb
2) php is already installed and configured autometically
3) Configure phpMyAdmin
By default, phpMyAdmin can only be accessed from the localhost itself. To make it to accessible globally, do the following steps.
edit the following configuration
comment line no 17, 18 and add Require all granted after line no 18
<IfModule mod_authz_core.c> # Apache 2.4 <RequireAny> # Require ip 127.0.0.1 # Require ip ::1 Require all granted </RequireAny>
Restart all the lamp service and enable it
systemctl start httpd systemctl enable httpd systemctl restart mariadb
Create a sample index.php” file in Apache document root folder and append the lines as shown below:
Add the following lines.
<?php phpinfo(); ?>
and open your ip or hostname in browser her mine is 220.127.116.11 and hostname lamp.guesslinux.com
open http://hostname/phpmyadmin i.e http://lamp.guesslinux.com/phpmyadmin or http://your-ip/phpmyadmin