宝塔上安装微微CMS教程

发布时间:阅读数:647

注意:微微CMS最简单的安装方式只需要Nginx即可.其他的都可以不用安装.


安装宝塔后,进入到网站点击安装Nginx

在宝塔上安装微微CMS

最终安装 Nginx 版本为1.19

在宝塔上安装微微CMS


新建站点

在宝塔上安装微微CMS


配置站点

我们在中间加入匹配转发规则,将demo1.vvcms.cn的访问转发到微微CMS的8080来处理


在宝塔上安装微微CMS

server
{
    listen 80;
    server_name demo1.vvcms.cn;
    index index.php index.html index.htm default.php default.htm default.html;
    root /www/wwwroot/demo1.vvcms.cn;
    client_max_body_size 10M;

    access_log  /www/wwwlogs/demo1.vvcms.cn.log;
    error_log  /www/wwwlogs/demo1.vvcms.cn.error.log;
    
      location / {
        proxy_pass http://127.0.0.1:8000;
        proxy_set_header   Host             $host;
        proxy_set_header   X-Real-IP        $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    }
}



安装微微CMS

我们打开终端

root@1cbf0fb820d0:/www# cd wwwroot/  #进入到网站目录
root@1cbf0fb820d0:/www/wwwroot# ll
total 16
drwxr-xr-x 4 root root 4096 Mar  5 17:16 ./
drwxr-xr-x 7 root root 4096 Mar  5 17:14 ../
drwxr-xr-x 2 root root 4096 Mar  5 17:08 default/
drwxr-xr-x 2 www  www  4096 Mar  5 17:16 demo1.vvcms.cn/
root@1cbf0fb820d0:/www/wwwroot# cd demo1.vvcms.cn/ # 进入到demo1的目录
root@1cbf0fb820d0:/www/wwwroot/demo1.vvcms.cn# ll
total 24
drwxr-xr-x 2 www  www  4096 Mar  5 17:16 ./
drwxr-xr-x 4 root root 4096 Mar  5 17:16 ../
-rwxr-xr-x 1 www  www     1 Mar  5 17:16 .htaccess*
-rw-r--r-- 1 root root   47 Mar  5 17:16 .user.ini
-rwxr-xr-x 1 www  www   479 Mar  5 17:16 404.html*
-rwxr-xr-x 1 www  www   917 Mar  5 17:16 index.html*
root@1cbf0fb820d0:/www/wwwroot/demo1.vvcms.cn# wget https://www.vvcms.cn/link/vvcms.sh && chmod 755 ./vvcms.sh && ./vvcms.sh install #复制安装脚本
--2022-03-05 17:20:46--  https://www.vvcms.cn/link/vvcms.sh
Resolving www.vvcms.cn (www.vvcms.cn)... 49.234.210.97
Connecting to www.vvcms.cn (www.vvcms.cn)|49.234.210.97|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://oss.vvcms.cn/uploads/files/2021/12/27/0f70e3d0ad6b4485bcb6c03488b7a8d5.sh [following]
--2022-03-05 17:20:46--  https://oss.vvcms.cn/uploads/files/2021/12/27/0f70e3d0ad6b4485bcb6c03488b7a8d5.sh
Resolving oss.vvcms.cn (oss.vvcms.cn)... 124.156.150.231
Connecting to oss.vvcms.cn (oss.vvcms.cn)|124.156.150.231|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1143 (1.1K) [application/x-shellscript]
Saving to: 'vvcms.sh'

vvcms.sh                                100%[=============================================================================>]   1.12K  --.-KB/s    in 0s      

2022-03-05 17:20:46 (70.5 MB/s) - 'vvcms.sh' saved [1143/1143]

欢迎使用微微CMS快速安装脚本
PowerdBy www.vvcms.cn 微微CMS提供支持
正在下载微微CMS
--2022-03-05 17:20:46--  https://www.vvcms.cn/link/lcms
Resolving www.vvcms.cn (www.vvcms.cn)... 49.234.210.97
Connecting to www.vvcms.cn (www.vvcms.cn)|49.234.210.97|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://oss.vvcms.cn/uploads/files/2022/02/23/a09954518cc84d38b2499e07e3ba356a.zip [following]
--2022-03-05 17:20:47--  https://oss.vvcms.cn/uploads/files/2022/02/23/a09954518cc84d38b2499e07e3ba356a.zip
Resolving oss.vvcms.cn (oss.vvcms.cn)... 124.156.150.231
Connecting to oss.vvcms.cn (oss.vvcms.cn)|124.156.150.231|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11918364 (11M) [application/zip]
Saving to: './vvcms.zip'

./vvcms.zip                             100%[=============================================================================>]  11.37M  4.34MB/s    in 2.6s    

2022-03-05 17:20:50 (4.34 MB/s) - './vvcms.zip' saved [11918364/11918364]

微微CMS下载完成开始解压
......  inflating: vvcms/themes/default/views/topics.html  
开始启动微微CMS
<br/>


看到这样的消息表示微微CMS已经启动好了,查看微微CMS进程看是否真的启动好了

root@1cbf0fb820d0:/www/wwwroot/demo1.vvcms.cn# netstat -tlanp | grep 8000
tcp6       0      0 :::8000                 :::*                    LISTEN      3865/./linux-vvcms  
root@1cbf0fb820d0:/www/wwwroot/demo1.vvcms.cn# 


我们发现微微CMS已经启动并在后台运行了.现在接解析域名到你的服务器上,就可以访问了.

在宝塔上安装微微CMS




上一篇:没有了

下一篇:使用Supervisor来管理多个微微CMS