Nginx-学习目录
1、下载软件【nginx和php服务器都要下载】
1.1、下载
自行到github获取
https://github.com/wecenter/wecenter
这里使用的版本:WeCenter_v3.2.1.zip
1.2、解压软件
mkdir /opt/wewenter && cd /opt/wewenter
unzip WeCenter_3.6.1.zip && rm -f WeCenter_3.6.1.zip
chown www -R /opt/wewenter
2、配置nginx
2.1、配置
cat >/etc/nginx/conf.d/wewenter.conf <<'EOF'
server {
listen 80;
server_name wewenter.cyc.com;
root /opt/wewenter;
index index.php index.html;
location ~ \.php$ {
try_files $uri =404;
root /opt/wewenter;
fastcgi_pass 192.168.10.5:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
EOF
2.2、重新加载nginx
3、配置MySQL数据库
3.1、数据库创建库和用户相关参考文章
3.2、创建相关的SQL
create database wewenter CHARACTER SET utf8;
grant all on wewenter.* to 'wewenter'@'%' identified by 'wewenter';
3.3、当前环境相关的参数
IP地址:192.168.10.6
端口:3306
用户名:wewenter
密码:wewenter
4、配置hosts
# 因为跟wordpress使用相同的端口,使用hosts配置区分开
192.168.10.4 wordpress.cyc.com
192.168.10.4 wewenter.cyc.com
5、访问测试
5.1、配置首页

5.2、配置数据库信息

5.3、增加管理员帐号

5.4、访问首页
