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.

READ  How to Setup NetHogs - Monitor Bandwidth Usage Per Process in Linux

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 :

READ  How to Enable Logging for Email Subject Fields in Postfix Maillog

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
  1. máy làm mát không khí
    máy làm mát không khí
    March 24, 2016 at 11:27 am

    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 *

A world leading hosting company that provides fully-managed innovative and secure solutions, suitable for hosting small to medium-sized websites

Built on the best available technologies combined with Google Cloud for strong redundancy and application availability. Backed by skilled experts to address web security threats, a devops team to create advanced custom security solutions, and 24/7 sysadmins to watch over the platform. This powerful, hands-on approach makes your sites faster, safer, and easier to manage. Starting from only $3.95/mo.


* up to 30 days money back guarantee