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.
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.
1. Install MySQL, Apache and PHP :
[[email protected] ~]# yum install mysql mysql-server httpd php* -y
2. Start Apache and MySQL :
[[email protected] ~]# service httpd start
[[email protected] ~]# service mysqld start
3. Check Apache, MySQL and PHP version :
[[email protected] ~]# httpd -v Server version: Apache/2.2.15 (Unix) Server built: Aug 13 2013 17:29:28
[[email protected] ~]# mysql -V mysql Ver 14.14 Distrib 5.1.71, for redhat-linux-gnu (x86_64) using readline 5.1
[[email protected] ~]# 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 :
Create a page called phpinfo.php under web root directory /var/www/html.
[[email protected]tos6-05 ~]# vi /var/www/html/index.php
<?php phpinfo (); ?>
Restart Apache :
[[email protected] ~]# service httpd restart