Hi..
Today I want to share tutorial installing PHP and mySQL on CentOS 5, actually this also for my note because I always forget to type it, so better I put this on my blog so when I need it, just open my blog and find it.
Ok the first thing you need to know, when you install CentOS from your server (I am using VPS) the apache also installed automatically, so you no need to install apache again, but just in case your server not automatically install apache, just install it using yum
yum install httpd
Oh in case you get trouble with fastmirror on yum read my post about yum problem.
Ok next installing php, use this command
yum install php php-soap php-xmlrpc php-imap php-mcrypt php-mhash php-mbstring php-mysql php-xml php-gd
It will install PHP and some addons that maybe you will need it in the future when u installing some php script or something else.
When it asks for yes or no just press “Y” and Enter.
Done for PHP, now move to mySQL, use this command
yum install mysql mysql-server mysql-devel
And again if it asks for yes or no just press “Y” and Enter.
DONE !! and for activate it you just need to install apache using this command
service httpd restart
Simple right?! now try it on your server and good luck !!
note: this is optional tuts that maybe u interest
1. To make mySQL autorun on startup type this
chkconfig --levels 235 mysqld on
After done restart mySQL with command
service mysqld restart
2. To make Apache autorun on startup type this
chkconfig --levels 235 httpd on
After done restart Apache with command
service httpd restart
3. Creating ROOT password on mySQL
mysqladmin -u root password yourpassword mysqladmin -h yourhostname -u root password yourpassword

