how to install AMP on centos 5.5
i want to install Apache PHP MYSQL PhpMyAdmin Drupal in centos 5.5
i want to install last version of software I do not know Linux Professional i know a little of base Linux 开发者_Go百科
thank you
I don't mean to be a jerk, but this tutorial was * literally* the first result on google.
The main bits:
#install Apache
yum install httpd httpd-devel
/etc/init.d/httpd start
#install MySQL
yum install mysql mysql-server mysql-devel
/etc/init.d/mysqld start
#set MySQL pass
mysql
Here, "mysql>" means you're in the MySQL prompt.
mysql> USE mysql;
mysql> UPDATE user SET Password=PASSWORD('newpassword') WHERE user='root';
mysql>FLUSH PRIVILEGES;
Check to make sure that your password works:
mysql -u root -p
Enter Password: <your new password>
Install PHP:
yum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml
/etc/init.d/httpd restart
Create a file named /var/www/html/test.php
with the following:
<?php
phpinfo();
?>
You may want to install phpMyAdmin:
yum install phpmyadmin
If you want the latest STABLE version of php and mysql. You must install first the packages and update them. You can use groupinstall under yum command.
MySQL
#check the packages under MySQL group
yum groupinfo "MySQL Database"
#you will see the list of mandatory, default and optional packages
#install the group package
yum groupinstall "MySQL Database"
#after install, check installed packages
rpm -qa | grep -i mysql
For PHP
#check the packages under Web Server group
yum groupinfo "Web Server"
#install the group package
yum groupinstall "Web Server"
You can also install the additional/optional packages such as php-mysql. etc.
yum install php-mysql
Now, time to update the installed packages. I found this repository thru the net and it's quite reliable.
Update PHP and MySQL
#update remi and rpm
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
#update PHP and MySQL
yum --enablerepo=remi update php-\*
yum --enablerepo=remi update mysql-\*
#start the service
service httpd start
service mysqld start
#check the versions
php -v
mysql -v
Hope that helps.
精彩评论