日期:2014-05-17  浏览次数:21082 次

yum 一次性安装 apache php mysql

yum -y install httpd php mysql mysql-server php-mysql httpd-manual mod_ssl mod_perl mod_auth_mysql php-mcrypt php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc mysql-connector-odbc mysql-devel libdbi-dbd-mysql

?

安装完后,给mysql 授权

chgrp -R mysql /var/lib/mysql
chmod -R 770 /var/lib/mysql

service mysqld start

mysqladmin -u root password ‘新密码’ [引号内填密码]

?

如果yum安装的php版本太低的话,更新php

http://www.webtatic.com/packages/php53/

?

rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm

?

yum --enablerepo=webtatic install php

?

OK~