How to install LAMP in Scientific Linux 6

Scientific Linux 6.0 was released a few days ago, it is a powerfull  Linux distribution that is produced by Fermi National Accelerator Laboratory and the European Organization for Nuclear Research (CERN). The distribution is opensource and It is based on Red hat Enterprise Linux.

SL has been built from the source code for Red Hat Enterprise Linux versions, under the terms and conditions of Red Hat Enterprise Linux’s EULA and the GNU General Public License.

In this post will show you how to install LAMP in Sientific Linux 6.0:

1- Install Apache:

As root type the following command:

yum install httpd  

Now make apache start with computer boot

chkconfig httpd on 

start   the apache  services

 /etc/init.d/httpd start

to check that Apache has been installed without problems, go to your browser and type

http://localhost


2- MySQL  installation:

To install  Mysql, as root type the command

yum  install mysql mysql-server

Start the mysqld and configure it to boot  with computer start

/etc/init.d/mysqld start

Make it  starting with the  computer

chkconfig  mysqld on

Now  create MySQL admin password

mysql -u root
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('YOURPASSWORD');   

3- Install PHP5 and dependencies

You can install PHP and dependencies using the command

yum  install  php  php-mysql

Check if php is working by creating a php info page

vi  /var/www/html/test.php

Copy this code :

 

4- Install Phpmyadmin

– “PhpMyAdmin is a free graphical software tool to handle the administration of MySQL, this will make it easy for you to create, import/export and delete databases. Install phpmyadmin using the command:Now we will install phpmyadmin”.

4-1 Install Via yum (install first rpmfusion freeand non )then:

yum  install phpmyadmin 

4-2 install via source , download  the  phpmyadmin file from source and extract it to  /var/www/html

extract   the file :

 tar  -zxvf    phpMyAdmin-3.3.3-all-languages.tar.gz 
mv  phpMyAdmin-3.3.3-all-languages  phpmyadmin
cd  phpmyadmin
cp  config.sample.inc.php config.inc.php

You  should  edit  the  config.inc.php  for  your  web security
Now  start the  browser
http://ip/phpmyadmin

Â