Install LAMP on CentOS 5

=== Install LAMPĀ (Linux Apache MySQL and PHP) ===

yum install httpd php php-mysql mysql mysql-server
chkconfig httpd on
chkconfig mysqld on
/etc/init.d/httpd restart
/etc/init.d/mysqld restart

=== set MySQL root password ===
mysqladmin -u root -p password newpassword
mysqladmin -u root -p reload

=== change MySQL root password (just in case) ===
mysqladmin -u root -p’oldpass’ password ‘newpass’

=== install phpMyadmin ===
yum install phpmyadmin php-mysql php-mcrypt

config phpMyadmin
vi /usr/share/phpmyadmin/config.inc.php
#modify this line>> $cfg[‘blowfish_secret’] = ‘fgkswdflvjkasbvoiqweur’;

config apache for phpMyadmin
vi /etc/httpd/conf.d/phpmyadmin.conf

remark this line>> Deny from all
modify this line>> Allow from 127.0.0.1 192.168.0.0/24

reload apache
/etc/init.d/httpd reload