Loading...

用 yum 安装 Apache、Mysql、PHP

–>

1、安装Apache 

yum -y install httpd httpd-devel 
安装完成后,用/etc/init.d/httpd start 启动apache 
设为开机启动:chkconfig httpd on 

2、安装mysql

yum -y install mysql mysql-server mysql-devel 
同样,完成后,用/etc/init.d/mysqld start 启动mysql 

(1) 设置mysql密码

启动mysql控制台:mysql
mysql>; USE mysql; 
mysql>; UPDATE user SET Password=PASSWORD(‘newpassword’) WHERE user=’root’; 
mysql>; FLUSH PRIVILEGES; 

(2) 允许远程登录 

mysql -u root -p 
Enter Password: <your new password> 
mysql>GRANT ALL PRIVILEGES ON *.* TO ‘用户名’@’%’ IDENTIFIED BY ‘密码’ WITH GRANT OPTION; 
完成后就能用mysql-front远程管理mysql了。 

(3) 设为开机启动 
chkconfig mysqld on 

 

3、安装php 

yum -y install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml 
/etc/init.d/httpd start

 

转载:http://hi.baidu.com/yinhuama/item/1bc5e77ea7d60f376f29f67f

原文链接:https://www.cnblogs.com/adforce/archive/2013/04/23/3037922.html
本文来源 互联网收集,文章内容系作者个人观点,不代表 本站 对观点赞同或支持。如需转载,请注明文章来源,如您发现有涉嫌抄袭侵权的内容,请联系本站核实处理。

© 版权声明

相关文章