Monday, October 11, 2010

Easiest way to get LAMP

Easiest way to get LAMP (Linux, Apache, MySQL, PHP) up and running on Linux

I guess most of the people already know how to set up LAMP (Linux Apache MySQL PHP) envirnment on Linux still most of us face issues while trying to install it.





Steps:

1. MYSQL5


To install MySQL, we do this:
yum install mysql mysql-server

Start the MySQL server:
/etc/init.d/mysqld start

Run
mysql -h hostname -p password -u username -P port

2. Apache


To Install
yum install httpd;

Start the Apache
/etc/init.d/httpd start

3. Php-5


To Install
yum install php

We must restart Apache afterwards:
/etc/init.d/httpd restart

4. Php Admin

To Install
yum install phpmyadmin

Now we configure phpMyAdmin.
We change the Apache configuration so that phpMyAdmin allows connections not just from localhost
vi /etc/httpd/conf.d/phpMyAdmin.conf

We must restart Apache afterwards:
/etc/init.d/httpd restart

** I USE ONE LINE INSTALL **
yum -y install mysql mysql-server;yum -y install httpd;yum -y install php;yum -y install phpmyadmin;/etc/init.d/httpd restart;




2 comments: