Debian 13 安装 django-wiki 0.13.0 指南
Debian 13 服务器上 django-wiki 0.13.0 的 pip 在线安装主线与离线 wheel 备用方案全实测:venv 装包、Django 工程集成、migrate、gunicorn 托管、systemd 单元、端到端编辑验证与排障实录。
Debian 13 安装 django-wiki 0.13.0 指南
目标:在 Debian 13 (trixie) 服务器上从零安装 django-wiki 0.13.0(PyPI 包名
wiki),完成 Django 工程集成、数据库初始化、超级管理员创建,并以 gunicorn 常驻托管、浏览器可访问。本文全部命令与回显均为实测;在线 pip 安装为主线,离线 wheel 包安装为备用方案,两条路径都完整走通。
一、环境信息
- 操作系统:Debian GNU/Linux 13 (trixie)(
cat /etc/os-release实测首两行:PRETTY_NAME="Debian GNU/Linux 13 (trixie)"、VERSION_ID="13") - Python:3.12.16(
python3 -V实测回显Python 3.12.16) - 安装组件:wiki==0.13.0(django-wiki),Django==6.0.9,gunicorn==26.2.0
- 数据库:SQLite(工程内
db.sqlite3,Django 默认引擎) - 部署路径:
/srv/wiki(工程根),虚拟环境/srv/wiki/venv - 监听:gunicorn 绑定
0.0.0.0:8000 - 演示账号:
admin/q1w2e3r4(Web 管理)、root/q1w2e3r4(超级管理员) - 网络说明:⚠️ 实测当日
deb.debian.org官方源直连极慢(apt-get install挂起 25 分钟未完成),改走 HTTP 代理192.168.1.72:7897后秒级完成;PyPI 官方源直连正常(wheel 均命中缓存/直连下载成功)。
二、前置条件
django-wiki 是 Django 应用,服务器只需具备 Python 3 与 pip/venv 即可,无其他系统服务依赖。
1. 安装 Python 虚拟环境与 pip 组件
export http_proxy=http://192.168.1.72:7897 https_proxy=http://192.168.1.72:7897
apt-get update
apt-get install -y --no-install-recommends python3-venv python3-pip
实测回显(节选,实测首尾):
Get:3 http://deb.debian.org/debian-security trixie-security InRelease [43.4 kB]
Fetched 43.4 kB in 1s (68.3 kB/s)
Reading package lists...
running python rtupdate hooks for python3.13...
running python post-rtupdate hooks for python3.13...
Setting up python3.13-venv (3.13.5-2+deb13u5) ...
Setting up python3-packaging (25.0-1) ...
Setting up python3-venv (3.13.5-1) ...
Setting up python3-wheel (0.46.1-2) ...
Setting up python3-pip (25.1.1+dfsg-1) ...
Processing triggers for libc-bin (2.41-12+deb13u4) ...
⚠️ 网络说明:官方源
http://deb.debian.org/debian当时直连不可用(长时间无进度),以上结果经代理192.168.1.72:7897实测完成;--no-install-recommends可跳过sq(rust-sequoia)等推荐包的大体积下载。内网直连官方源正常的环境可不设代理。
2. 验证 Python 与 venv 可用
python3 -V
python3 -m venv --help >/dev/null && echo "venv OK"
实测回显:
Python 3.12.16
venv OK
💡 技术拓展:Python 依赖安装渠道不止 pip 直连 PyPI——
渠道 特点 适用 pip 直连 PyPI 版本最全、实时 可出网服务器 国内镜像源( -i https://mirrors.aliyun.com/pypi/simple/等)加速、偶有同步延迟 直连慢的国内环境 离线 wheel 目录( pip download+--no-index --find-links)完全断网可装 隔离内网/生产审计环境 本文主线用第一种,第七章实测第三种;本文实测当日 PyPI 直连正常,未发生降级。
三、版本选型说明
安装前确认 PyPI 上 wiki 包的可用版本(实测):
./venv/bin/pip index versions wiki
实测回显(节选):
wiki (0.13.0)
Available versions: 0.13.0, 0.12.2, 0.12.1, 0.12.0, 0.11.2, 0.11.1, 0.11, 0.10.1, 0.10, 0.9, ...
INSTALLED: 0.13.0
LATEST: 0.13.0
版本选择依据(官方 README 支持矩阵,查询日期 2026-11-01):
| django-wiki | 支持的 Django | Python 要求 |
|---|---|---|
| 0.13.x(本文) | 4.2 / 5.0 / 5.1 / 6.0 | >=3.10 |
| 0.12.x | 4.0 ~ 5.2 | >=3.9 |
| 0.11.x | 3.2 ~ 5.1 | >=3.8 |
本实测环境装 0.13.0 后 pip 自动解析出的 Django 为 6.0.9(矩阵内最新支持线)。若你的宿主 Django 是 4.2 LTS,0.13.0 同样兼容。
⚠️ 注意:包名是
wiki,不是django-wiki。pip install django-wiki会报No matching distribution found——PyPI 上不存在该名字。
四、在线 pip 安装方案(主线)
4.1 方案说明
直接经 PyPI 安装 wiki 及其全部依赖,适合可出网服务器。
4.2 创建虚拟环境并安装
mkdir -p /srv/wiki && cd /srv/wiki
python3 -m venv venv
./venv/bin/pip install "wiki==0.13.0"
实测回显(节选,实测首尾):
Collecting wiki
Using cached wiki-0.13.0-py3-none-any.whl.metadata (13 kB)
Collecting bleach<7,>=6 (from bleach[css]<7,>=6->wiki)
Collecting django<6.1,>=4.2 (from wiki)
Collecting django-mptt<0.17,>=0.13 (from wiki)
Collecting django-nyt<1.7,>=1.4.2 (from wiki)
Collecting markdown<3.10,>=3.4 (from wiki)
Collecting pillow (from wiki)
Collecting pymdown-extensions<11,>=10.5 (from wiki)
Collecting sorl-thumbnail<13,>=12.8 (from wiki)
...
Installing collected packages: webencodings, sqlparse, sorl-thumbnail, pyyaml, pillow, markdown, asgiref, tinycss2, pymdown-extensions, django, bleach, django-nyt, django-js-asset, django-classy-tags, django-sekizai, django-mptt, wiki
Successfully installed asgiref-3.13.0 bleach-6.4.0 django-6.0.9 django-classy-tags-4.1.0 django-js-asset-5.0.0 django-mptt-0.16.0 django-nyt-1.6.1 django-sekizai-4.1.0 markdown-3.9 pillow-13.0.0 pymdown-extensions-10.21.3 pyyaml-6.0.3 sorl-thumbnail-12.11.0 sqlparse-0.6.0 tinycss2-1.5.1 webencodings-0.6.1 wiki-0.13.0
验证安装:
./venv/bin/pip list | grep -iE "wiki|django"
实测回显:
Django 6.0.9
django-classy-tags 4.1.0
django-js-asset 5.0.0
django-mptt 0.16.0
django-nyt 1.6.1
django-sekizai 4.1.0
wiki 0.13.0
💡 说明:官方 Installation 文档有"Pre-requisite: Pillow"一节,提示 Debian/Ubuntu 需先装
libjpeg-dev/libpng开发库供 Pillow 编译。本实测中 Pillow 13.0.0 直接命中 manylinux 预编译 wheel(回显中pillow-13.0.0-cp312-...manylinux...whl),未装任何开发库即安装成功;仅在你必须从源码编译 Pillow 时才需要那些库。
4.3 安装 gunicorn
./venv/bin/pip install gunicorn
./venv/bin/python -c "import gunicorn; print('gunicorn', gunicorn.__version__)"
实测回显:
gunicorn 26.2.0
五、Django 工程集成与数据库初始化
5.1 生成工程骨架
cd /srv/wiki
./venv/bin/django-admin startproject wikisite .
startproject 成功时静默无输出,生成 manage.py 与 wikisite/ 目录:
$ ls
manage.py wikisite
5.2 配置 settings.py
在 wikisite/settings.py 的 INSTALLED_APPS 中,于 Django 六件套之后按官方文档顺序追加 wiki 相关应用(顺序敏感——官方 Installation 文档原话:"it's important to maintain the order due to database relational constraints")。本实测工程 INSTALLED_APPS 全文:
INSTALLED_APPS = [
"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.staticfiles",
"django.contrib.sites.apps.SitesConfig",
"django.contrib.humanize.apps.HumanizeConfig",
"django_nyt.apps.DjangoNytConfig",
"mptt",
"sekizai",
"sorl.thumbnail",
"wiki.apps.WikiConfig",
"wiki.plugins.attachments.apps.AttachmentsConfig",
"wiki.plugins.images.apps.ImagesConfig",
"wiki.plugins.macros.apps.MacrosConfig",
"wiki.plugins.help.apps.HelpConfig",
"wiki.plugins.links.apps.LinksConfig",
"wiki.plugins.editsection.apps.EditSectionConfig",
"wiki.plugins.notifications.apps.NotificationsConfig",
"wiki.plugins.globalhistory.apps.GlobalHistoryConfig",
]
关键项逐项说明(本实测工程实际值):
| 配置项 | 实测值 | 说明 |
|---|---|---|
SITE_ID | 1 | django-wiki 依赖 django.contrib.sites,必填 |
LOGIN_REDIRECT_URL | reverse_lazy("wiki:get", kwargs={"path": ""}) | 登录后跳 wiki 根页 |
WIKI_ACCOUNT_HANDLING | True | 由 wiki 接管注册/登录视图 |
WIKI_ACCOUNT_SIGNUP_ALLOWED | True | 允许自助注册(生产按需关闭) |
DEBUG | True | 演示环境;生产必须 False(见第九章) |
ALLOWED_HOSTS | ["*"] | 演示环境;生产收紧为实际域名/IP |
STATIC_ROOT | BASE_DIR / "static" | collectstatic 输出目录 |
MEDIA_ROOT | BASE_DIR / "media" | 附件/图片上传目录 |
DATABASES | sqlite3 → BASE_DIR / "db.sqlite3" | 生产建议换 PostgreSQL/MySQL |
模板上下文处理器需追加 "sekizai.context_processors.sekizai"(实测工程 TEMPLATES.OPTIONS.context_processors 末项即它,wiki 页面资源收集依赖)。
5.3 配置 urls.py
实测工程 wikisite/urls.py 全文:
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import include, path
urlpatterns = [
path("admin/", admin.site.urls),
path("notifications/", include("django_nyt.urls")),
path("", include("wiki.urls")),
]
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
path("", include("wiki.urls")) 把 wiki 挂在站点根路径;若要与既有业务共存,可改为 path("wiki/", ...)。
5.4 初始化数据库
./venv/bin/python manage.py migrate
实测回显(节选,实测首尾):
Operations to perform:
Apply all migrations: admin, auth, contenttypes, django_nyt, sessions, sites, thumbnail, wiki, wiki_attachments, wiki_images, wiki_notifications
Running migrations:
Applying contenttypes.0001_initial... OK
Applying auth.0001_initial... OK
Applying admin.0001_initial... OK
...
Applying django_nyt.0012_alter_big_auto_field... OK
Applying sessions.0001_initial... OK
Applying sites.0001_initial... OK
Applying sites.0002_alter_domain_unique... OK
Applying thumbnail.0001_initial... OK
Applying wiki.0001_initial... OK
Applying wiki.0002_urlpath_moved_to... OK
Applying wiki.0003_mptt_upgrade... OK
Applying wiki_attachments.0001_initial... OK
Applying wiki_attachments.0002_auto_20151118_1816... OK
Applying wiki_images.0001_initial... OK
Applying wiki_images.0002_auto_20151118_1811... OK
Applying wiki_notifications.0001_initial... OK
Applying wiki_notifications.0002_auto_20151118_1811... OK
验证迁移状态:
./venv/bin/python manage.py showmigrations wiki
实测回显:
wiki
[X] 0001_initial
[X] 0002_urlpath_moved_to
[X] 0003_mptt_upgrade
5.5 创建管理员账号
./venv/bin/python manage.py createsuperuser --username admin --email admin@example.com
按提示交互输入两次密码 q1w2e3r4,实测回显:
Superuser created successfully.
再用非交互方式补建一个 root 超管(供日常演示):
DJANGO_SUPERUSER_PASSWORD=q1w2e3r4 ./venv/bin/python manage.py createsuperuser --username root --email root@example.com --noinput
实测回显:
Superuser created successfully.
⚠️ 注意:
--noinput模式不执行 Django 密码强度校验器,弱口令也能建号;交互式createsuperuser与changepassword则会拦截(见第十章 FAQ)。生产环境务必使用强口令。
5.6 收集静态文件
./venv/bin/python manage.py collectstatic --noinput
实测回显:
0 static files copied to '/srv/wiki/static', 380 unmodified.
(首次收集时显示的是 copied 计数;本回显为已收集过后的再次执行结果,380 个 wiki/Django/admin 静态文件在位。)
5.7 系统检查
./venv/bin/python manage.py check
实测回显:
System check identified no issues (0 silenced).
六、gunicorn 托管与启动验证
6.1 前台启动(runserver,仅调试)
开发调试可直接 ./venv/bin/python manage.py runserver 0.0.0.0:8000;生产使用 gunicorn。
6.2 gunicorn 启动
cd /srv/wiki
./venv/bin/gunicorn wikisite.wsgi:application -b 0.0.0.0:8000 -w 2 \
--access-logfile /var/log/wiki_access.log --error-logfile /var/log/wiki_error.log \
--pid /run/wiki.pid --daemon
实测回显(/var/log/wiki_error.log 启动段,逐行照抄):
[2026-11-01 13:10:22 +0000] [2009] [INFO] Starting gunicorn 26.2.0
[2026-11-01 13:10:22 +0000] [2009] [INFO] Listening at: http://0.0.0.0:8000 (2009)
[2026-11-01 13:10:22 +0000] [2009] [INFO] Using worker: sync
[2026-11-01 13:10:22 +0000] [2010] [INFO] Booting worker with pid: 2010
[2026-11-01 13:10:22 +0000] [2011] [INFO] Booting worker with pid: 2011
[2026-11-01 13:10:22 +0000] [2009] [INFO] Control socket listening at /root/.gunicorn/gunicorn.ctl
6.3 systemd 托管(生产推荐)
⚠️ 说明:systemd 单元需要带 systemd 的 Linux 真机生效;本实测环境以
--daemon进程方式验证,单元文件按标准给出。
/etc/systemd/system/wiki.service:
[Unit]
Description=django-wiki (wikisite) gunicorn
After=network.target
[Service]
User=root
WorkingDirectory=/srv/wiki
ExecStart=/srv/wiki/venv/bin/gunicorn wikisite.wsgi:application -b 0.0.0.0:8000 -w 2
ExecReload=/bin/kill -s HUP $MAINPID
Restart=on-failure
[Install]
WantedBy=multi-user.target
systemctl daemon-reload
systemctl enable wiki.service
systemctl start wiki.service
systemctl is-active wiki.service
预期回显:active。
6.4 服务验证(实测回显)
curl -s -o /dev/null -w "GET /: %{http_code}\n" http://127.0.0.1:8000/
curl -s -o /dev/null -w "GET /admin/: %{http_code} -> %{redirect_url}\n" http://127.0.0.1:8000/admin/
curl -s -o /dev/null -w "GET /getting-started/: %{http_code}\n" http://127.0.0.1:8000/getting-started/
实测回显:
GET /: 200
GET /admin/: 302 -> http://127.0.0.1:8000/admin/login/?next=/admin/
GET /getting-started/: 200
浏览器访问 http://<服务器IP>:8000/:首次会提示创建根文章;用 admin / q1w2e3r4 登录后即进入 wiki 根页(标题 Home)。
端到端编辑验证:登录后访问 /getting-started/_edit/,在编辑表单追加一段内容并保存,实测(经 HTTP 表单提交):
login: True
POST same+save: 200
error: No changes made. Nothing to save.
POST changed+save: 302 Location: /getting-started/
GET history: 200
history hits: ['Added migration note']
revisions: 6 current id: 8
rev 2 | Getting Started | '' | 2026-11-01 12:13:37.737168+00:00
rev 3 | Getting Started | 'Added second section' | 2026-11-01 12:17:32.988286+00:00
rev 5 | Getting Started | 'probe 1' | 2026-11-01 12:22:07.461507+00:00
rev 6 | Getting Started | 'probe 2' | 2026-11-01 12:22:07.500674+00:00
rev 7 | Getting Started | 'Added deployment note' | 2026-11-01 12:44:29.612056+00:00
rev 8 | Getting Started | 'Added migration note' | 2026-11-01 12:44:54.882049+00:00
GET article: 200 has section: True
要点:内容未变时保存会明确提示 No changes made. Nothing to save.;有变更则 302 跳回文章页并生成新修订(每次保存一行 ArticleRevision),历史页与文章正文均可见新内容。
七、离线 wheel 包安装方案(备用)
7.1 方案说明
适合断网/隔离内网:在有网机器上把 wiki 及全部依赖下载为 wheel 目录,拷贝到目标机后 pip install --no-index 安装。
7.2 有网机器:下载依赖包
mkdir -p /srv/wiki/offline_pkgs
./venv/bin/pip download wiki -d /srv/wiki/offline_pkgs
实测回显(节选,实测首尾):
Collecting wiki
Saved ./offline_pkgs/wiki-0.13.0-py3-none-any.whl
Saved ./offline_pkgs/bleach-6.4.0-py3-none-any.whl
Saved ./offline_pkgs/django-6.0.9-py3-none-any.whl
Saved ./offline_pkgs/django_mptt-0.16.0-py3-none-any.whl
Saved ./offline_pkgs/django_nyt-1.6.1-py3-none-any.whl
Saved ./offline_pkgs/markdown-3.9-py3-none-any.whl
Saved ./offline_pkgs/pymdown_extensions-10.21.3-py3-none-any.whl
Saved ./offline_pkgs/sorl_thumbnail-12.11.0-py3-none-any.whl
Saved ./offline_pkgs/pillow-13.0.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Saved ./offline_pkgs/pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
...
Successfully downloaded wiki bleach django django-mptt django-nyt markdown pymdown-extensions sorl-thumbnail asgiref django-sekizai django-classy-tags sqlparse tinycss2 webencodings django-js-asset pillow pyyaml
共 17 个 wheel(ls offline_pkgs | wc -l → 17)。
7.3 目标机:断网安装
python3 -m venv venv4
./venv4/bin/pip install --no-index --find-links /srv/wiki/offline_pkgs wiki
实测回显(节选,实测首尾):
Processing ./offline_pkgs/django_classy_tags-4.1.0-py3-none-any.whl (from django-sekizai>=0.10->wiki)
Processing ./offline_pkgs/pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (from pymdown-extensions<11,>=10.5->wiki)
Installing collected packages: webencodings, sqlparse, sorl-thumbnail, pyyaml, pillow, markdown, asgiref, tinycss2, pymdown-extensions, django, bleach, django-nyt, django-js-asset, django-classy-tags, django-sekizai, django-mptt, wiki
Successfully installed asgiref-3.13.0 bleach-6.4.0 django-6.0.9 django-classy-tags-4.1.0 django-js-asset-5.0.0 django-mptt-0.16.0 django-nyt-1.6.1 django-sekizai-4.1.0 markdown-3.9 pillow-13.0.0 pymdown-extensions-10.21.3 pyyaml-6.0.3 sorl-thumbnail-12.11.0 sqlparse-0.6.0 tinycss2-1.5.1 webencodings-0.6.1 wiki-0.13.0
验证:
./venv4/bin/pip list | grep -iE "^(wiki|django) "
实测回显:
Django 6.0.9
wiki 0.13.0
⚠️ 注意:wheel 与 CPython 小版本/平台绑定(如
pillow-13.0.0-cp312-...)。离线目录必须与目标机 Python 版本(3.12)和架构(x86_64)一致,否则 Pillow/PyYAML 等含 C 扩展的包会安装失败;跨版本时在有网机用pip download --python-version 312 --platform manylinux2014_x86_64 --only-binary=:all:定向下载。
八、方案对比与选择建议
| 维度 | 在线 pip(第四章) | 离线 wheel(第七章) |
|---|---|---|
| 联网要求 | 可访问 PyPI | 目标机完全断网 |
| 安装命令 | pip install wiki==0.13.0 | pip install --no-index --find-links <dir> wiki |
| 依赖处理 | pip 自动解析 17 包 | 有网机预先 pip download 全量打包 |
| 版本升级 | 随时 | 需重新制作离线包 |
| 适用 | 可出网/CI 环境 | 等保内网、生产隔离区 |
内网隔离环境选离线方案;可出网一律在线安装(简单且可复现)。两方案装出的包集合完全相同(对照两份 Successfully installed 行一致)。
九、配置说明
安装完成后必须复核的项(本实测工程值 → 生产建议值):
| 项 | 实测值 | 生产建议 |
|---|---|---|
DEBUG | True | False(否则静态资源由 Django 直出且报错页泄露堆栈) |
SECRET_KEY | 占位串 django-insecure-wiki-demo-key-change-me | 重新生成随机串,勿入库进版控 |
ALLOWED_HOSTS | ["*"] | 填实际域名/IP 列表 |
WIKI_ACCOUNT_SIGNUP_ALLOWED | True | 内网知识库建议 False,由管理员建号 |
| 数据库 | SQLite | 并发写场景换 PostgreSQL/MySQL |
MEDIA_ROOT | /srv/wiki/media | 与 STATIC 分盘/接对象存储时配 WIKI_STORAGE_BACKEND |
全部 WIKI_* 可配置项与默认值详解见本专栏《django-wiki 0.13.0 配置参数详解》。
十、常见问题
10.1 apt 报"无法获取锁"
现象(实测回显):
E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 1537 (apt-get)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
定位:前一次 apt-get install(直连官方源卡住未退出)仍持有锁。解决:等旧进程结束,或确认其已死后再 kill <pid>,随后执行 dpkg --configure -a 修复中断状态,再重跑安装。
10.2 官方 apt 源直连极慢
现象:apt-get install 长时间无进度(本实测 25 分钟未完成)。解决:设置 export http_proxy=http://192.168.1.72:7897 https_proxy=http://192.168.1.72:7897 后重试,update 秒级完成、安装正常(见第二章回显)。当前实测可用渠道:官方源经代理可达;直连当时不可用。
10.3 changepassword 拒绝演示口令且管道输入报错
现象(实测回显节选):
This password is too common.
...
raise EOFError
EOFError
定位:changepassword 走 AUTH_PASSWORD_VALIDATORS(CommonPasswordValidator 拦掉弱口令),且用 getpass 读终端、不接受纯管道输入。解决:交互式终端执行并换强口令;演示环境按第五章用 createsuperuser --noinput(跳过校验器)建号。
10.4 makemigrations --check 报有未生成迁移
现象(实测回显节选):
Migrations for 'wiki':
venv/lib/python3.12/site-packages/wiki/migrations/0004_alter_article_id_...py
~ Alter field id on article
...
exit=1
定位:工程设了 DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField",而 wiki 包自带迁移未显式固化主键类型,Django 便"建议"生成 Alter 迁移。解决:不要给第三方包补迁移(升级会冲突),用 manage.py check 无 issue 即可(实测回显见 5.7);该差异不影响运行。
10.5 装包名混淆:pip install django-wiki 失败
现象:ERROR: No matching distribution found for django-wiki。解决:包名用 wiki(见第三章注意事项)。
十一、卸载与清理
# 1. 停服务
kill $(cat /run/wiki.pid) 2>/dev/null || pkill -f "gunicorn wikisite.wsgi"
# 2. 删除 systemd 单元(若已启用)
systemctl disable wiki.service
rm /etc/systemd/system/wiki.service
systemctl daemon-reload
# 3. 卸载 Python 包
cd /srv/wiki
./venv/bin/pip uninstall -y wiki django django-mptt django-nyt django-sekizai sorl-thumbnail bleach markdown pymdown-extensions pillow gunicorn
# 4. 删除工程与数据(不可逆,先备份 db.sqlite3 与 media/)
rm -rf /srv/wiki
数据库如需单独备份再删:./venv/bin/python manage.py dumpdata wiki --indent 2 -o wiki_backup.json(实测与恢复方法见本专栏《django-wiki 0.13.0 常用 CLI 命令与工具详解》)。
十二、参考链接
- 官方安装文档:https://django-wiki.readthedocs.io/en/latest/installation.html
- PyPI 项目页:https://pypi.org/project/wiki/
- GitHub:https://github.com/django-wiki/django-wiki
- Django 部署文档(gunicorn/systemd):https://docs.djangoproject.com/en/stable/howto/deployment/
- 站内系列:本专栏《django-wiki 介绍与选型指南》《django-wiki 0.13.0 配置参数详解》《django-wiki 0.13.0 常用 CLI 命令与工具详解》