Install LAMP on CentOS 6.4

LAMP is the short for Linux, Apache, MySQL, PHP. It is not a software, it’s actually a solution to run websites or servers on Linux.

 

1. Install Apache Server

Apache is free open source software which runs over 50% of the world’s web servers. To install apache, open terminal and type:

sudo yum install httpd

Once it installs, you may start the apache server:

sudo service httpd start

To check if Apache Server installed, direct the browser to the server’s IP address. (For example http://192.168.2.132/ or http://localhost ) You will see this:

 

How to find out your server’s IP Address

ifconfig eth0 | grep inet | awk '{ print $2 }'

 

2. Install MySQL

MySQL is a powerful database management system used for organizing and retrieving data on a virtual server. To install MySQL, open terminal and type:

sudo yum install mysql mysql-server php-mysql
sudo service mysqld start

Once it’s done, you may set a root MySQL password:

sudo /usr/bin/mysql_secure_installation

 

3. Install PHP

PHP is an open source web scripting language that is widely used to build dynamic webpages. To install PHP, open terminal and type:

sudo yum install php

 

You may set the processess run automatic when the server boots. (PHP will run automatically once Apache starts!)

sudo chkconfig httpd on
sudo chkconfig mysqld on

 

Congratulation! You have install LAMP on CentOS!

 

 

Leave a Comment.

Time limit is exhausted. Please reload CAPTCHA.