How to install LAMP (Apache, MySQL and PHP in Linux) using Yum

There are many ways to install Lamp in Linux server but following is the easiest way to install using yum

First Go in http://www.centos.org/ and download latest copy of centos

Once you installed CentOS on server from shell type following commands
yum install httpd

Above command will install apache server then install php using following command.

yum install php

once you install php install MySql using following command

yum install mysql-server mysql

then restart services

service httpd start

service mysqld start

Once both services is running, you can check it by browser http://localhost and you should see a welcome page from CentOS

To test if php is running or not using phpinfo page

go to /var/www/html and create index.php and add following code

<?php phpinfo(); ?>

Once this done refresh your browser you will see the phpinfo page.

 

Both comments and pings are currently closed.

Comments are closed.