首先关闭防火墙
关闭selinux
yum install -y httpd
yum install -y php安装mysql
yum install -y mysql-server mysql mysql-devel
设置mysql密码 mysqladmin -u root -password '123456'
设置mysqld和httpd为开机启动服务
chkconfig httpd on
chkconfig mysqld on
安装php支持mysql yum install -y php-mysql