Install MySQL, Apache and PHP on CentOS 6.5

LAMP stand for Linux, Apache, MySQL and PHP which is group of software used to run an web applications. The combination of these software is called LAMP stack. This document will walk you through the steps to install MySQL, Apache and PHP on CentOS 6.5.

What is Apache ?

Apache httpd is one of the most popular web servers and has a lot of features that make it very extensible and useful for many different types of websites.

What is MySQL?
MySQL Database server is one of the most popular used database in the internet especially for content management and blogging site.

See also  How to Search for Available PHP5 Modules on Fedora 16

What is PHP?
PHP is a widely-used and open-source server-side scripting language that was especially designed for web development to produce dynamic web pages and can be embedded into HTML.

Steps :
1. Install MySQL, Apache and PHP :

[root@centos6-05 ~]# yum install mysql mysql-server httpd php* -y

2. Start Apache and MySQL :

[root@centos6-05 ~]# service httpd start
[root@centos6-05 ~]# service mysqld start

3. Check Apache, MySQL and PHP version :

[root@centos6-05 ~]# httpd -v
Server version: Apache/2.2.15 (Unix)
Server built:   Aug 13 2013 17:29:28


[root@centos6-05 ~]# mysql -V
mysql  Ver 14.14 Distrib 5.1.71, for redhat-linux-gnu (x86_64) using readline 5.1


[root@centos6-05 ~]# php -v
PHP 5.3.3 (cli) (built: Dec 11 2013 03:29:57)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

4. Verifying Apache, MySQL and PHP :

See also  How to Install Iptables on CentOS 5.8

Create a page called phpinfo.php under web root directory /var/www/html.

[root@centos6-05 ~]# vi /var/www/html/index.php

     phpinfo ();

Restart Apache :

[root@centos6-05 ~]# service httpd restart



1 Comment

  • Avatar máy làm mát không khí says:

    I think the admin of this website is really working hard in support of his web page,
    as here every material is quality based stuff.

Leave a Reply

Your email address will not be published. Required fields are marked *