目录
1、在账号管理页面,单击创建账号,输入数据库账号名称选择普通账号,输入密码后确认创建
2、在创建数据库面板中,创建数据库,输入数据库名称,选择上一步创建的账号,选择要授予账号的权限为读写,确认创建
3、在配置白面板中,将白名单内IP地址区域的ip修改为0.0.0.0/0,单击确定
将安装包拷贝到Apache的网站的发布目录/var/www/html/下
在云数据库PolarDB的基本信息页面>数据库代理企业通用版>集群地址>私网中查看数据库连接地址
[重启 Apache服务](#重启 Apache服务)
在本机浏览器地址栏中,输入http://,进入门户网站首页。公网ip地址>
数据库配置
1、在账号管理页面,单击创建账号,输入数据库账号名称选择普通账号,输入密码后确认创建

2、在创建数据库面板中,创建数据库,输入数据库名称,选择上一步创建的账号,选择要授予账号的权限为读写,确认创建

3、在配置白面板中,将白名单内IP地址区域的ip修改为0.0.0.0/0,单击确定

ECS服务器操作
安装Apache服务及其扩展包
yum -y install httpd httpd-manual mod_ssl mod_perl mod_auth_mysql
启动Apache
systemctl start httpd
安装PHP环境
添加EPEL扩展源
yum -y install \
https://repo.ius.io/ius-release-el7.rpm \
https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
添加Webtatic源
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
安装PHP
yum -y install php70w-devel php70w.x86_64 php70w-cli.x86_64 php70w-common.x86_64 php70w-gd.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mcrypt.x86_64 php70w-pdo.x86_64 php70w-mysqlnd php70w-fpm php70w-opcache php70w-pecl-redis php70w-pecl-mongodb
查看php版本
php -v

启动php
systemctl start php-fpm
安装MySQL
下载并安装MySQL
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 --nogpgcheck
启动数据库
systemctl start mysqld
查看进程是否启动
ss -nplt

环境部署完成,以下操作为搭建门户网站
安装Git
yum -y install git
下载PbootCMS源码文件
cd /opt
git clone https://gitee.com/hnaoyun/PbootCMS.git
将安装包拷贝到Apache的网站的发布目录/var/www/html/下
cp -r PbootCMS/* /var/www/html/
修改站点根目录文件权限
chmod -R 777 /var/www/html
向数据库中导入CMS的初始数据
在云数据库PolarDB的基本信息页面>数据库代理企业通用版>集群地址>私网中查看数据库连接地址

mysql -h数据库连接地址 -u用户名 -p密码 -Dpbootcms </var/www/html/static/backup/sql/pbootcms_v324.sql

修改CMS系统数据库配置
cat > /var/www/html/config/database.php << EOF
<?php
return array(
'database' => array(
'type' => 'mysqli', // 数据库连接驱动类型: mysqli,sqlite,pdo_mysql,pdo_sqlite
'host' => '数据库连接地址', // PolarDB数据库集群私网地址
'user' => 'test_user', // PolarDB数据库的用户名
'passwd' => 'Password123', // PolarDB数据库的密码
'port' => '3306', // 数据库端口
'dbname' => 'pbootcms' //数据库名称
)
);
EOF
重启 Apache服务
systemctl restart httpd
测试
在本机浏览器地址栏中,输入http://<ECS公网IP地址>,进入门户网站首页。

在本机浏览器地址栏中,输入http://<ECS公网IP地址>/admin.php,进入系统后台。
默认账号为admin,密码为123456

希望能够帮助到大家!!
