私有化部署or本地部署Qexo

分享
1003 2

什么是QEXO

Qexo 是一个快速、强大、美观的在线 静态博客编辑器。使用 GPL3.0 开源协议。支持包括且不限于在 Vercel 等平台部署, 为您的静态博客添加动态的元素

项目地址

https://github.com/Qexo/Qexo

安装环境

  • centos7
  • python3
  • 宝塔面板

    安装步骤

  • 在宝塔面板安装LNMP环境
  • 创建一个网站
  • 创建一个数据库
  • 在终端输入

    git clone https://github.com/Qexo/Qexo

    复制项目到服务器目录

    cd Qexo

    进入Qexo目录,建立configs.py文件,把一下内容复制进去

    import pymysql
    pymysql.install_as_MySQLdb()
    DOMAINS = ["127.0.0.1", "yoursite.com"]
    DATABASES = {
      'default': {
              'ENGINE': 'django.db.backends.mysql',
              'NAME': 'qexo',
              'USER': 'root',
              'PASSWORD': 'password',
              'HOST': '127.0.0.1',
              'PORT': '3306',
              'OPTIONS': {
                  "init_command": "SET sql_mode='STRICT_TRANS_TABLES'"
              }
      }
    }

    把以上的NAME USER PASSWORD yoursite.com修改为自己的
    依次执行以下命令

    pip3 install -r requirements.txt
    python3 manage.py makemigrations
    python3 manage.py migrate
    python3 manage.py runserver --noreload

    默认运行端口8000

  • 在创建好的网站设置中设置反代
  • 填入SSL证书

运行你的网址

友情链接

<div id="qexo-friends"></div>
<link rel="stylesheet" href="https://blog-1251893119.cos.ap-shanghai.myqcloud.com/Qstatic-main/hexo/friends.css"/>
<script src="https://blog-1251893119.cos.ap-shanghai.myqcloud.com/Qstatic-main/hexo/friends.js"></script>
<script>loadQexoFriends("qexo-friends", "https://cp.sunn.ee")</script>

友情链接申请API

<div id="friends-api"></div>
<link rel="stylesheet" href="https://unpkg.com/qexo-friends/friends.css"/>
<script src="https://unpkg.com/qexo-friends/friends-api.js"></script>
<script>qexo_friend_api("friends-api","https://cp.sgcd.net");</script>

说说

<script src="https://blog-1251893119.cos.ap-shanghai.myqcloud.com/Qstatic-main/hexo/talks.js"></script>

<link rel="stylesheet" href="https://blog-1251893119.cos.ap-shanghai.myqcloud.com/Qstatic-main/hexo/talks.css">
<div id="qexot"></div>
<script>showQexoTalks("qexot", "https://cp.sunn.ee", 15)</script>
最后更新 2023-04-27
评论 ( 2 )
OωO
隐私评论
  1. 李大顺

    好用啊

    10个月前广东省回复
  2. 李大顺

    就是这个好用

    10个月前广东省回复