yum -y install httpd httpd-manual mod_ssl mod_perl mod_auth_mysql yum -y install php php-mysql gd php-gd gd-devel php-xml php-common php-mbstring php-ldap php-pear php-xmlrpc php-imap wget http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm yum -y install mysql57-community-release-el7-10.noarch.rpm yum -y install mysql-community-server systemctl start mysqld yum -y install git cd ~ && git clone https://gitee.com/hnaoyun/PbootCMS.git cp -r PbootCMS/* /var/www/html/ chmod -R a+w /var/www/html sql_file="/var/www/html/static/backup/sql/"$(ls /var/www/html/static/backup/sql/) && mysql -h172.16.1.55 -utest_user -pPassword1213 -Dpbootcms < $sql_file cat > /var/www/html/config/database.php << EOF <?php return array( 'database' => array( 'type' => 'mysqli', // 数据库连接驱动类型: mysqli,sqlite,pdo_mysql,pdo_sqlite 'host' => '172.16.1.55', // PolarDB数据库链接地址 'user' => 'test_user', // PolarDB数据库的用户名 'passwd' => 'Password1213', // PolarDB数据库的密码 'port' => '3306', // 数据库端口 'dbname' => 'pbootcms' //数据库名称 ) ); EOF 安全组放行80 systemctl restart httpd 系统后台默认访问路径为http://<ECS公网IP地址>/admin.php。默认账号为admin,密码为123456。