Tuesday, January 27, 2009

Install LAMP on CentOS 5.2

1. Install CentOS 5.2 on the system.

2. Download http://packages.sw.be/packages/rpmforce-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm. From a terminal window run "rpm -ivh rpmforge-release-0.3.6-1.el5.rf.i386.rpm".

3. From terminal terminal window, run "yum install httpd php php-mysql php-gd php-mbstring php-mcrypt mysql mysql-server phpmyadmin" as root.

4.To setup Apache server, System-> Administration -> Server Settings -> HTTP, Fill in the server name for the Apache server cwsuch as "localhost" for testing.

5. To setup mysql server System-> Administration -> Server Settings -> Services. Select mysqld, then reboot.

6. To make sure Apache server is up and running, start up Firefox, entre "http://localhost" as URL, the Apache 2 Test Page should be displayed.

7. Modify the line "$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */" in
/usr/share/phpmyadmin/config.inc.php to "$cfg['blowfish_secret'] = 'secret'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */".

8. Create a new file phpinfo.php at /var/www/html with following:
<?php phpinfo(); ?>.

9. From the Firefox, check http://localhost/phpinfo.php. The PHP information page should be displayed if the installation is correct.

10. TO assign the password for root, from the terminal window, run "mysqladmin -u root password "new password".

11. To check phpmyadmin installation, from Firefox, check http://localhost/phpmyadmin. From Welcome to phpMyAdmin page, type in the password for root
login to make sure the phpMyAdmin is installed without problem.

12. Done. LAMP server is up and running.

No comments: