All for Joomla All for Webmasters

LAMP Linux | Installation of LAMP on Linux Server

LAMP Linux, You may have heard of a server system called LAMP, and wondered what it is. Well, the answer is that LAMP isn’t any one thing on its own – it’s actually a combination of four technologies. Together, the LAMP technologies form the most popular overall server system on the web today. LAMP is short for Linux, Apache, MySQL, PHP. This will guide you to install LAMP server on your Linux System.
Note: I assume that, we have with IP on CentOS 5.x. You might have to replace them where appropriate.

STEP 1: Installation of Apache on Linux, LAMP Linux.

# yum install httpd -y
# chkconfig – -levels 235 httpd on
# service httpd restart
Basic Apache Installation is done…! LAMP Linux.
# firefox
You will see Apache Test page.
Note: Apache’s default configuration file is located at /etc/httpd.conf/httpd.conf. You can do changes as per your requirement.

STEP 2: Install MySQL,

# yum install mysql* -y
This command will install all required rpms for MySQL. Start MySQL,
# service mysqld start ; chkconfig mysqld on
If you want to change root password, follow below steps:
# mysqladmin -u root password mysqlpwd
# mysqladmin -h -u root password mysqlpwd

STEP 3: Install PHP with MySQL support

# yum install php* -y
This will install all required rpms along with PHP-GD, MySQL support. Finally test PHP with Apache,
# cd /var/www/html
# cat > index.php
# service httpd restart
# firefox

LAMP on linux

Don’t Miss to read  Step by step installation of Ubuntu on VirtualBox with pictures

If you have installed all required packages with correct configuration, you will see PHP version information.
phpMyAdmin is one of my favorite web interface for MySQL or you can install MySQL Workbench to manage Database.
To Install phpMyAdmin, you need to first install RPMforge repository as it is not available in CentOS repository.

For 64bit

# wget
# rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm

For 32 bit

# wget
# rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.i386.rpm
Now, you can Install phpMyAdmin using, LAMP Linux.
# yum install phpmyadmin -y
So, we have installed phpMyAdmin but need to configure Apache to use phpMyAdmin.
# vim /etc/httpd/conf.d/phpmyadmin.conf
#  Web application to manage MySQL
<Directory “/usr/share/phpmyadmin”>
Order Deny,Allow
Deny from all
Allow from
Alias /mysqlweb         /usr/share/phpmyadmin
Save and exit the file.
# service httpd restart
Open /usr/share/phpmyadmin/ and edit
# vim /usr/share/phpmyadmin/
$cfg[‘Servers’][$i][‘auth_type’] = ‘http’;
# /etc/init.d/httpd restart
Afterwards, you can access phpMyAdmin at



LAMP Linux | Installation of LAMP on Linux Server

log in

Become a part of our community!

reset password

Back to
log in
Choose A Format
Personality quiz
Trivia quiz