安装部署

2026-01-07 0

一、准备工作

1、确保您有一台运行Linux系统的服务器,支持CentOS、Ubuntu、Debian等主流发行版等操作系统。(从我司购买的云服务器/主机可以免费为你安装部署网站)

2、确保您拥有一个自己的域名,并且将域名解析到你的服务器ip上面。(域名可以从阿里云、Godaddy 等网站购买)

3、下载QMShop源码程序文件。下载地址:https://www.xmqimi.com/download/shopcms/

4、PuTTY下载地址:https://the.earth.li/~sgtatham/putty/0.83/w64/putty.exe

注:以下部署教程基于以Debian-13系统为例

二、安装和部署 QMShop

1、登陆SSH 以root用户身份运行一键安装脚本,自动完成1Panel的下载和安装。

apt install curl -y && bash -c "$(curl -sSL https://resource.fit2cloud.com/1panel/package/v2/quick_start.sh)"

2、项目运行启动命令

pip install -r requirements.txt && python manage.py install && python manage.py runserver 5000

3、配置文件添加内容,静态访问指定路径及反向代理 (记得修改路径和端口号)

    location ^~ /style/ {  
        alias /www/sites/xmqimi.com/index/static/style/;  
        try_files $uri =404;
        expires 24h;
    }
    location ^~ /admin/ {  
        alias /www/sites/xmqimi.com/index/static/admin/;  
        try_files $uri =404;
        expires 24h;
    }
    location ^~ /uploads/ {  
        alias /www/sites/xmqimi.com/index/static/uploads/;  
        try_files $uri =404;
        expires 24h;
    }
    location ~* ^/(favicon\.ico|robots\.txt)$ {
        root /www/sites/xmqimi.com/index/static;
        expires 30d;
        try_files $uri =404;
    }
    # 反向代理 
    location / {
        proxy_set_header Host $host; 
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
        proxy_set_header X-Forwarded-Host $server_name; 
        proxy_set_header X-Real-IP $remote_addr; 
        proxy_set_header X-Forwarded-Proto $scheme; 
        proxy_set_header Connection upgrade; 
        proxy_set_header Upgrade $http_upgrade; 
        proxy_http_version 1.1; 
        proxy_pass http://127.0.0.1:8081; 
    }

详细视频教程

 

抖音:https://www.douyin.com/

哔哩哔哩:https://www.bilibili.com/

联系电话

+86 15750767897

QQ咨询

6860592

82062600

客服微信

7*24小时售后服务
云产品
解决方案
个人
案例
博客
学院
关于
分享