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 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:///admin.php。默许账号为admin,暗码为123456。
我有话说: