对原文经过部分的修改
mysql使用mysql5.5而不是自带的mysql5.1
php使用php5.3而不是php5.1
#!/bin/bash# Script Name: One-key Automatic Install LAMP ServerDOMAIN_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 stopchkconfig iptables offsetenforce 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.confservice httpd startchkconfig 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.cnfmv /etc/init.d/mysql55-mysqld mysqldservice mysqld startchkconfig mysqld onmysqladmin -uroot password $MYSQL_ROOT_PASSWORD) &> /dev/null && echo 'Completed!' || exit echo -n '--Installing PHP...'(yum -y install php53 php53-mbstring php53-mysql --nogpgcheckservice httpd restart) &> /dev/null && echo 'Completed!' || exit echo 'Completed!'
安装phpmyadmin之后显示正常