Installing LAMP on CentOS 6

Problem

The following document will outline the process for installing LAMP on CentOS 6. LAMP is an acronym for the archetypal webserver standing for: Linux, Apache, MySQL, and PHP. The installation process is fairly straightforward.

tl;dr

yum install -y httpd mysql-server php php-mysql php-gd php-mbstring php-mcrypt php-devel php-xml
service httpd start
service mysqld start
mysqladmin -u root password [New Password]
chkconfig httpd on
chkconfig mysqld on

Solution

First we need to install and start up Apache

yum install httpd
service httpd start
chkconfig httpd on

Next we need to install MySQL server

yum install mysql-server
service mysqld start
mysqladmin -u root password [New Password]
chkconfig mysqld on

Lastly, we need to install PHP

yum install php php-mysql php-gd php-mbstring php-mcrypt php-devel php-xml

You now have a fully functional LAMP server.


Was this article helpful?

mood_bad Dislike 0
mood Like 0
visibility Views: 3754