对原文经过部分的修改
mysql使用mysql5.5而不是自带的mysql5.1
php使用php5.3而不是php5.1
#!/bin/bash # Script Name: One-key Automatic Install LAMP Server DOMAIN_NAME='www.jwh5566.com' # You can change this. MYSQL_ROOT_PASSWORD='some_passwd' # You can change this. echo -n '--Stopping iptables and SELinux...' ( service iptables stop chkconfig iptables off setenforce 0 [ -f /etc/selinux/config ] && sed -i '/^SELINUX=/s/=.*/=disabled/' /etc/selinux/config ) &> /dev/null && echo 'Completed!' || exit echo -n '--Installing Apache...' ( yum -y install httpd sed -ri 's/^#(ServerName).*/\1 '$DOMAIN_NAME':80/' /etc/httpd/conf/httpd.conf service httpd start chkconfig httpd on ) &> /dev/null && echo 'Completed!' || exit echo -n '--Installing MySQL...' ( yum -y install mysql55-mysql mysql55-mysql-server /bin/cp -f /opt/rh/mysql55/root/usr/share/mysql/my-medium.cnf /etc/my.cnf mv /etc/init.d/mysql55-mysqld mysqld service mysqld start chkconfig mysqld on mysqladmin -uroot password $MYSQL_ROOT_PASSWORD ) &> /dev/null && echo 'Completed!' || exit echo -n '--Installing PHP...' ( yum -y install php53 php53-mbstring php53-mysql --nogpgcheck service httpd restart ) &> /dev/null && echo 'Completed!' || exit echo 'Completed!'
安装phpmyadmin之后显示正常
转载于:https://blog.51cto.com/jwh5566/1658119