Review Board 8.1 Ubuntu 22.04 安装指南
在 Ubuntu 22.04.5 LTS 上以 venv 隔离安装 Review Board 8.1 的全流程实测指南:MySQL 8.0 建库授权、memcached 缓存、rb-site install 交互向导、Nginx + uWSGI 接入、systemd 托管,并沉淀 ALLOWED_HOSTS、目录属主等三个实际排障案例。
Review Board 8.1 Ubuntu 22.04 安装指南
目标:在 Ubuntu 22.04.5 LTS 服务器上以 Python venv 隔离方式安装 Review Board 8.1,使用 MySQL 8.0 作数据库、memcached 作缓存、Nginx + uWSGI 作 Web 接入层,并用 systemd 托管服务进程,最终完成 Web 登录与 API 验证。全部命令与回显均来自真实安装实录(2026-10-28),排障章节沉淀了安装过程中实际踩到的三个问题。组件定位与选型背景见 《Review Board 介绍与选型指南》。
一、环境信息
| 项目 | 值 |
|---|---|
| 操作系统 | Ubuntu 22.04.5 LTS(x86_64) |
| 服务器 IP | 192.168.1.100 |
| Review Board 版本 | 8.1(官方最新稳定版,PyPI 发布日期 2026-08-26,查询日期 2026-10-28) |
| Python | 3.10.12(系统自带,venv 隔离安装) |
| 数据库 | MySQL 8.0.46(本机部署) |
| 缓存 | memcached 1.6.14(本机部署,127.0.0.1:11211) |
| Web 接入 | Nginx 1.18.0 + uWSGI 2.0.20(Debian 发行版包) |
| Web 监听端口 | 8141(本指南约定端口,避免与服务器上已有 80 端口服务冲突;可按需改为 80/443) |
| 站点目录 | /opt/reviewboard/site |
| 虚拟环境 | /opt/reviewboard/venv |
| 管理员账号 | admin / q1w2e3r4 |
| 数据库账号 | reviewboard / q1w2e3r4(库名 reviewboard) |
本文所有命令均以 root 身份在服务器上执行。
二、软件版本说明
Review Board 8.1 官方发布形态是 Python 包(PyPI 包名 ReviewBoard),官方推荐用 venv 虚拟环境安装,Web 服务层(Nginx/uWSGI/Apache)与数据库、缓存由系统包提供,Review Board 安装向导(rb-site install)负责生成对应的接入配置样例。
核心组件版本(安装后实测):
| 组件 | 版本 | 安装方式 |
|---|---|---|
| ReviewBoard | 8.1 | pip(venv 内) |
| Django | 4.2.30 | pip(随 ReviewBoard 依赖自动安装) |
| Djblets | 6.1 | pip(Review Board 配套基础库) |
| ReviewBoardPowerPack | 6.1.1 | pip(官方扩展包,随装随用) |
| mysqlclient | 2.1.1 | pip(ReviewBoard[mysql] extra 引入) |
| Python | 3.10.12 | Ubuntu 22.04 系统包 |
| MySQL Server | 8.0.46 | Ubuntu 系统包(8.0.46-0ubuntu0.22.04.4) |
| memcached | 1.6.14 | Ubuntu 系统包(1.6.14-1ubuntu0.3) |
| Nginx | 1.18.0 | Ubuntu 系统包(1.18.0-6ubuntu14.22) |
| uWSGI | 2.0.20 | Ubuntu 系统包(2.0.20-4,含 python3 插件) |
版本核对回显(安装完成后实测):
# rb-site --version
Review Board/rb-site 8.1
# /opt/reviewboard/venv/bin/python -V
Python 3.10.12
# /opt/reviewboard/venv/bin/pip show ReviewBoard
Name: ReviewBoard
Version: 8.1
Summary: Extensible code review and document review built for Git, Perforce, Mercurial, and more
Home-page: https://www.reviewboard.org
三、系统准备与依赖安装
先更新索引,再安装系统层依赖。各包用途:mysql-server 数据库;memcached 缓存;nginx 反向代理;uwsgi 与 uwsgi-plugin-python3 应用服务器(Debian 打包的 uWSGI 以插件形式提供语言运行时);python3.10-venv 创建虚拟环境;build-essential、python3-dev、libmysqlclient-dev、libssl-dev、pkg-config 供 pip 源码编译扩展(mysqlclient 需要 mysqlclient 头文件与 pkg-config);patch 供 diff 解析;netcat-openbsd 用于验证 memcached。
apt-get update
apt-get install -y \
nginx uwsgi uwsgi-plugin-python3 \
memcached mysql-server \
python3.10-venv python3-dev \
build-essential libmysqlclient-dev libssl-dev pkg-config patch \
netcat-openbsd
安装完成后核对版本(实测回显):
# dpkg -l | grep -E "^ii +(nginx|uwsgi|memcached|mysql-server|python3\.10-venv) " | awk '{print $2, $3}'
nginx 1.18.0-6ubuntu14.22
memcached 1.6.14-1ubuntu0.3
mysql-server 8.0.46-0ubuntu0.22.04.4
python3.10-venv 3.10.12-1~22.04.18
uwsgi 2.0.20-4
四、数据库与缓存服务部署
4.1 启动 MySQL 并创建库与账号
Ubuntu 的 MySQL 安装后由 systemd 自动拉起,root 默认走 auth_socket 本机免密登录。启动并确认状态:
systemctl enable --now mysql
# systemctl is-active mysql
active
进入 MySQL 控制台,创建 Review Board 专用库与账号(库、账号名与密码将在后面 rb-site install 中用到):
mysql
CREATE DATABASE reviewboard CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'reviewboard'@'localhost' IDENTIFIED BY 'q1w2e3r4';
GRANT ALL PRIVILEGES ON reviewboard.* TO 'reviewboard'@'localhost';
FLUSH PRIVILEGES;
EXIT;
验证授权(实测回显):
# mysql -N -e "SHOW GRANTS FOR 'reviewboard'@'localhost'"
GRANT USAGE ON *.* TO `reviewboard`@`localhost`
GRANT ALL PRIVILEGES ON `reviewboard`.* TO `reviewboard`@`localhost`
# mysql -N -e "SHOW DATABASES LIKE 'reviewboard'"
reviewboard
再用新账号做一次真实登录验证(实测回显):
# mysql -u reviewboard -pq1w2e3r4 -e "SELECT CURRENT_USER(), 1+1 AS t;"
CURRENT_USER() t
reviewboard@localhost 2
4.2 启动 memcached
systemctl enable --now memcached
# systemctl is-active memcached
active
Ubuntu 的 memcached 默认配置(/etc/memcached.conf)即为本机监听、64MB 内存,与本指南需求一致,无需修改。关键字段实测如下:
-m 64
-p 11211
-l 127.0.0.1
验证服务连通(实测回显):
# printf "version\r\n" | nc 127.0.0.1 11211
VERSION 1.6.14
# ss -ltn | grep 11211
LISTEN 0 1024 127.0.0.1:11211 0.0.0.0:*
五、创建虚拟环境并安装 Review Board
5.1 创建 venv
把 Review Board 全套 Python 依赖隔离在 /opt/reviewboard/venv:
python3.10 -m venv /opt/reviewboard/venv
/opt/reviewboard/venv/bin/pip install --upgrade pip
pip 升级回显(实测):
Successfully installed pip-26.2.2
5.2 安装 Review Board
/opt/reviewboard/venv/bin/pip install ReviewBoard
安装完成时的关键回显(实测,依赖较长,保留主干):
Installing collected packages: Whoosh, pytz, mimeparse, django-pipeline, django-braces, zipp, webencodings, wcwidth, vine, urllib3, tzlocal, tzdata, typing-extensions, tqdm, sqlparse, six, pyyaml, pymemcache, Pygments, pycparser, publicsuffixlist, Pillow, packaging, oauthlib, markdown, kgb, jmespath, importlib-resources, idna, docutils, dnspython, diff-match-patch, click, charset-normalizer, certifi, billiard, bcrypt, annotated-types, typing-inspection, typelets, requests, python-ntlm3, python-dateutil, pymdown-extensions, pydiffx, pydantic-core, prompt_toolkit, importlib-metadata, housekeeping, exceptiongroup, django-assert-queries, click-plugins, click-didyoumean, cffi, bleach, asgiref, amqp, requests-toolbelt, pynacl, pydantic, kombu, Django, cryptography, click-repl, botocore, asana, s3transfer, python-gitlab, pyOpenSSL, pdfminer.six, paramiko, jwcrypto, Djblets, django-storages, django-haystack, django_evolution, django-cors-headers, celery, rbintegrations, django_oauth_toolkit, boto3, ReviewBoardPowerPack, ReviewBoard
Successfully installed Django-4.2.30 Djblets-6.1 Pillow-12.3.0 Pygments-2.19.2 ReviewBoard-8.1 ReviewBoardPowerPack-6.1.1 Whoosh-2.7.4 amqp-5.4.1 ... celery-5.6.3 ... paramiko-3.4.1 ... pymemcache-4.0.0 ...
5.3 补装 MySQL 驱动(关键步骤,勿跳过)
pip install ReviewBoard 默认不含数据库驱动。不装驱动时,后面 rb-site install 的数据库选单里只会出现 sqlite3(生产不受支持),见第十一章排障实例 1。生产使用 MySQL 必须补装 [mysql] extra:
/opt/reviewboard/venv/bin/pip install "ReviewBoard[mysql]"
实测回显:
Successfully installed mysqlclient-2.1.1
六、创建站点(rb-site install 交互实录)
执行安装向导(回答值直接写在问句后的冒号处,密码类输入不回显属正常行为):
/opt/reviewboard/venv/bin/rb-site install /opt/reviewboard/site
向导共 15 问,逐问实录如下(问句原文照抄):
Domain Name: 192.168.1.100
Root Path [/]: /
Database Type: 1
Database Name [reviewboard]: reviewboard
Database Server [localhost]: localhost
Database Username: reviewboard
Database Password:
Confirm Database Password:
Memcached Server [localhost:11211]: 127.0.0.1:11211
Username [admin]: admin
Password:
Confirm Password:
E-Mail Address: admin@example.com
Company/Organization Name (optional): Example Inc
Allow us to collect support data? [y/n]: N
各问说明:
| 问句 | 输入值 | 说明 |
|---|---|---|
| Domain Name | 192.168.1.100 | 站点访问域名或 IP(不含 https:// 与端口)。此处填服务器 IP |
| Root Path | / | URL 路径前缀,默认站点根 |
| Database Type | 1 | 选单 (1) mysql (2) sqlite3,选 1 即 mysql |
| Database Name | reviewboard | 4.1 节创建的库名 |
| Database Server | localhost | 数据库地址 |
| Database Username / Password | reviewboard / q1w2e3r4 | 4.1 节创建的账号 |
| Memcached Server | 127.0.0.1:11211 | 缓存地址,默认值即可 |
| Username / Password | admin / q1w2e3r4 | 站点管理员账号 |
| E-Mail Address | admin@example.com | 管理员邮箱 |
| Company/Organization Name | Example Inc | 组织名(可选,用于支持数据展示) |
| Allow us to collect support data? | N | 是否向官方发送支持统计,按需选择 |
向导开始安装时的进度回显(实测照抄):
Installing the site...
———————————————————————————————————————————————————————————————————————————————
Building site directories ... OK
Building site configuration files ... OK
Creating database ... OK
Creating administrator account ... OK
Saving site settings ... Saving site /opt/reviewboard/site to the sitelist /etc/reviewboard/sites
'/opt/reviewboard/site'
OK
Setting up support ... OK
Finishing the install ... OK
———————————————————————————————————————————————————————————————————————————————
The site has been installed
———————————————————————————————————————————————————————————————————————————————
The site has been installed in /opt/reviewboard/site
Sample configuration files for web servers and cron are available in the conf/
directory.
You need to modify the ownership of the following directories and their
contents to be owned by the web server:
* /opt/reviewboard/site/htdocs/media/uploaded
* /opt/reviewboard/site/htdocs/media/ext
* /opt/reviewboard/site/htdocs/static/ext
* /opt/reviewboard/site/data
If SELinux is enabled, you will also need to enable some additional policies.
For more information on these steps, visit:
https://www.reviewboard.org/docs/manual/8.1/admin/installation/creating-sites/
安装器同时在站点 conf/ 目录生成了 Web 服务器样例配置与定时任务配置:
# ls /opt/reviewboard/site/conf/webconfs/
apache-wsgi.conf nginx-to-gunicorn.conf nginx-to-uwsgi.conf run-gunicorn.sh uwsgi.ini
# cat /opt/reviewboard/site/conf/cron.conf
# Update search index every 10 minutes
0,10,20,30,40,50 * * * * "/opt/reviewboard/site/venv/bin/rb-site" manage "/opt/reviewboard/site" update_index -- -a 1
# Clear expired sessions once a day at 2am
0 2 * * * "/opt/reviewboard/site/venv/bin/rb-site" manage "/opt/reviewboard/site" clearsessions
💡
cron.conf两条任务建议加入系统 crontab(crontab -e粘贴即可),分别负责全文搜索索引增量更新与过期会话清理,不影响安装验证,可后置处理。
七、安装后修正:ALLOWED_HOSTS 与目录属主
这一章的两个动作都是官方向导输出没有直接覆盖、但实测必做的修正项。
7.1 把本机访问地址加入 ALLOWED_HOSTS
先查看向导生成的 conf/settings_local.py 中与本节相关的四段配置(实测内容):
DATABASES = {
"default": {
"ENGINE": "django.db.backends.mysql",
"NAME": "reviewboard",
"USER": "reviewboard",
"PASSWORD": "q1w2e3r4",
"HOST": "localhost",
"PORT": ""
}
}
CACHES = {
"default": {
"BACKEND": "django.core.cache.backends.memcached.PyMemcacheCache",
"LOCATION": "127.0.0.1:11211"
}
}
SITE_ROOT = "/"
DEBUG = False
ALLOWED_HOSTS = [
"192.168.1.100",
]
ALLOWED_HOSTS 初始只含向导问的 Domain Name。若要在服务器本机用 127.0.0.1 或 localhost 验证访问(第十章即这么做),必须把两者加进去,否则请求会被 Django 以 400 拒绝(复现过程见第十一章排障实例 2)。编辑 /opt/reviewboard/site/conf/settings_local.py:
ALLOWED_HOSTS = [
"192.168.1.100",
"127.0.0.1",
"localhost"
]
7.2 修改运行目录属主为 www-data
按向导提示修改 4 个目录属主;实测补充:logs/ 目录同样需要,否则 uWSGI 拉起后 Review Board 打不开日志文件、只能把日志写进 stderr(现象与修复见第十一章排障实例 3):
chown -R www-data:www-data \
/opt/reviewboard/site/htdocs/media/uploaded \
/opt/reviewboard/site/htdocs/media/ext \
/opt/reviewboard/site/htdocs/static/ext \
/opt/reviewboard/site/data \
/opt/reviewboard/site/logs
八、接入 Nginx 与 uWSGI
8.1 uWSGI 应用配置
在 /etc/uwsgi/apps-available/reviewboard.ini 写入以下内容(在向导生成的 conf/webconfs/uwsgi.ini 样例基础上,增加 plugins 行并核对路径;Debian 版 uWSGI 必须显式加载 python3 插件):
[uwsgi]
plugins = python3
module = reviewboard.wsgi:application
env = REVIEWBOARD_SITEDIR=/opt/reviewboard/site
chdir = /opt/reviewboard/site
master = true
processes = 6
threads = 30
socket = /opt/reviewboard/site/data/uwsgi.sock
chmod-socket = 660
chown-socket = www-data:www-data
vacuum = true
die-on-term = true
virtualenv = /opt/reviewboard/site/venv
要点说明:
env = REVIEWBOARD_SITEDIR=...:uWSGI 进程靠这个环境变量定位站点,缺失时启动即失败;socket+chmod-socket+chown-socket:uWSGI 在站点data/下创建 Unix socket,并授权给 www-data 组,Nginx 以该 socket 转发请求;virtualenv:指向第五章的 venv,uWSGI 自动激活其中的 Python 包。
启用该应用(Debian 的 uWSGI 包读取 apps-enabled/):
ln -s /etc/uwsgi/apps-available/reviewboard.ini /etc/uwsgi/apps-enabled/reviewboard.ini
8.2 Nginx 站点配置
在 /etc/nginx/sites-available/reviewboard 写入(基于向导生成的 conf/webconfs/nginx-to-uwsgi.conf 样例改端口与域名):
server {
server_name 192.168.1.100;
listen [::]:8141;
listen 8141;
access_log /opt/reviewboard/site/logs/nginx_access_log;
error_log /opt/reviewboard/site/logs/nginx_error_log;
location / {
include uwsgi_params;
uwsgi_pass unix:/opt/reviewboard/site/data/uwsgi.sock;
}
location /media/ {
alias /opt/reviewboard/site/htdocs/media/;
expires max;
add_header Cache-Control public;
}
location /static/ {
alias /opt/reviewboard/site/htdocs/static/;
expires max;
add_header Cache-Control public;
}
location /errordocs/ {
alias /opt/reviewboard/site/htdocs/errordocs/;
expires 5d;
}
location /robots.txt {
alias /opt/reviewboard/site/htdocs/robots.txt;
expires 5d;
}
}
启用站点、校验并重载 Nginx(实测回显):
ln -s /etc/nginx/sites-available/reviewboard /etc/nginx/sites-enabled/reviewboard
# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
# systemctl reload nginx
⚠️ Ubuntu 的 Nginx 默认站点监听 80 端口,与本指南无冲突可保留;若你把 Review Board 配到 80 端口,需先删除
/etc/nginx/sites-enabled/default。
九、systemd 服务托管
在 /etc/systemd/system/reviewboard.service 写入服务单元:
[Unit]
Description=Review Board uWSGI service
After=network.target mysql.service memcached.service
Wants=mysql.service memcached.service
[Service]
User=www-data
Group=www-data
WorkingDirectory=/opt/reviewboard/site
ExecStart=/usr/bin/uwsgi --ini /etc/uwsgi/apps-available/reviewboard.ini
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
要点说明:
User=www-data:与第 7.2 节的属主修正配套,站点内可写目录(data/、logs/、htdocs/media/uploaded/等)都归 www-data;After/Wants:先拉起数据库与缓存,再拉起应用;Restart=on-failure:uWSGI 异常退出时 5 秒后自动重启。
加载并启动(实测回显):
systemctl daemon-reload
systemctl enable --now reviewboard
# systemctl is-active reviewboard
active
# systemctl is-enabled reviewboard
enabled
启动后的服务状态(实测照抄):
● reviewboard.service - Review Board uWSGI service
Loaded: loaded (/etc/systemd/system/reviewboard.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2026-10-28 00:48:21 UTC; 1min 49s ago
Main PID: 3860 (uwsgi)
Tasks: 181 (limit: 2932)
Memory: 173.2M
CPU: 1.121s
├─3860 /usr/bin/uwsgi --ini /etc/uwsgi/apps-available/reviewboard.ini
├─3862 /usr/bin/uwsgi --ini /etc/uwsgi/apps-available/reviewboard.ini
├─3873 /usr/bin/uwsgi --ini /etc/uwsgi/apps-available/reviewboard.ini
├─3893 /usr/bin/uwsgi --ini /etc/uwsgi/apps-available/reviewboard.ini
十、安装验证
10.1 Web 入口
在服务器本机请求首页(实测回显,302 跳转到登录页属预期):
# curl -sI http://127.0.0.1:8141/ | head -n 6
HTTP/1.1 302 Found
Server: nginx/1.18.0 (Ubuntu)
Date: Wed, 28 Oct 2026 00:46:44 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 0
Connection: keep-alive
浏览器访问 http://192.168.1.100:8141/,用 admin / q1w2e3r4 登录即可进入 Dashboard。
10.2 Web API
用管理员账号请求 Web API 根资源(实测回显):
# curl -s -o /dev/null -w "HTTP %{http_code}\n" -u admin:q1w2e3r4 http://127.0.0.1:8141/api/
HTTP 200
10.3 应用日志
确认 Review Board 已把日志落到站点 logs 目录(实测回显):
# tail -n 2 /opt/reviewboard/site/logs/reviewboard.log
2026-10-28 00:48:35,978 - DEBUG - - reviewboard.scmtools.clearcase - Using cleartool cleartool
2026-10-28 00:48:35,978 - DEBUG - - rbpowerpack.scmtools.versionvault - Using cleartool cleartool
三关(Web 302、API 200、日志落盘)全部通过,安装完成。rb-site / manage 命令行的日常运维用法见 《Review Board 8.1 常用 CLI 与运维命令详解》,settings_local.py 各配置段与站点配置项的逐项解释见 《Review Board 8.1 配置参数详解》。
十一、常见问题与排障
以下三个问题均在本次安装过程中实际踩到,现象与修复过程全部实录。
11.1 安装向导数据库选单只剩 sqlite3
现象:未装 MySQL 驱动时直接运行 rb-site install,Database Type 选单缺少 mysql 项;强行输入 1 被拒绝:
You can type either the name or the number from the list below.
(1) sqlite3 (not supported for production use)
Database Type: 1
[!] '1' is not a valid option.
原因:pip install ReviewBoard 默认不装任何数据库驱动,向导检测不到驱动就只列 sqlite3。
解决:补装 extra 后重新运行向导:
/opt/reviewboard/venv/bin/pip install "ReviewBoard[mysql]"
# Successfully installed mysqlclient-2.1.1
重新执行 rb-site install,选单恢复正常:
(1) mysql
(2) sqlite3 (not supported for production use)
11.2 访问返回 Bad Request (400)
现象:ALLOWED_HOSTS 不含请求所用主机名/IP 时,所有请求返回 400。实测把 127.0.0.1、localhost 从配置中移除并重启服务后请求:
# curl -s http://127.0.0.1:8141/
<!doctype html>
<html lang="en">
<head>
<title>Bad Request (400)</title>
</head>
<body>
<h1>Bad Request (400)</h1><p></p>
</body>
</html>
注意 DEBUG = False 时 Django 只给简短的 400 页,不带原因说明,容易误判为服务故障。
原因:Django 安全机制——请求头里的 Host 不在 ALLOWED_HOSTS 白名单内直接拒绝。
解决:把实际访问该站的主机名/IP 全部补进 /opt/reviewboard/site/conf/settings_local.py 的 ALLOWED_HOSTS(含本机验证用的 127.0.0.1、localhost),然后 systemctl restart reviewboard。恢复后实测回到 302 正常跳转。
11.3 应用日志不生成,日志输出走 stderr
现象:服务正常启动、页面正常,但 /opt/reviewboard/site/logs/ 下没有 reviewboard.log,journalctl -u reviewboard 里出现:
Oct 28 00:46:55 <主机名> uwsgi[3716]: 2026-10-28 00:46:55,053 - WARNING - - root - Could not open logfile /opt/reviewboard/site/logs/reviewboard.log. Logging to stderr
原因:服务以 www-data 运行,而 logs/ 目录属主是 root;Review Board 打不开日志文件时自动降级写 stderr。向导结尾列出的待授权目录只有 4 个,不含 logs/,容易漏掉。
解决:
chown -R www-data:www-data /opt/reviewboard/site/logs /opt/reviewboard/site/data
systemctl restart reviewboard
重启后触发一次访问,日志文件正常生成(实测):
# ls -l /opt/reviewboard/site/logs/
total 12
-rw-r--r-- 1 www-data www-data 195 Oct 28 00:48 reviewboard.log
11.4 排障通用入口
- 服务没起来或反复重启:
journalctl -u reviewboard -n 50 --no-pager看 uWSGI 启动日志; - 请求 5xx:
tail -n 50 /opt/reviewboard/site/logs/reviewboard.log看应用异常栈; - Nginx 层 502:多为 Unix socket 不存在或权限不通,检查
ls -l /opt/reviewboard/site/data/uwsgi.sock与 uWSGI 是否在跑。
十二、卸载与清理
完全移除 Review Board(rb-site 没有卸载子命令,按层手工清理):
# 1. 停服务
systemctl disable --now reviewboard
rm -f /etc/systemd/system/reviewboard.service
systemctl daemon-reload
# 2. 摘除 Web 接入层
rm -f /etc/nginx/sites-enabled/reviewboard /etc/uwsgi/apps-enabled/reviewboard.ini
systemctl reload nginx
# 3. 删除站点目录与虚拟环境
rm -rf /opt/reviewboard/site /opt/reviewboard/venv
# 站点登记清单若不再需要也一并删除
rm -f /etc/reviewboard/sites
# 4. 删除数据库与账号(确认不再要数据后执行)
mysql -e "DROP DATABASE IF EXISTS reviewboard; DROP USER IF EXISTS 'reviewboard'@'localhost';"
memcached、Nginx、uWSGI 若为其他服务共用则保留,仅本机专用时可用 apt-get purge 移除。
十三、参考链接
- 官方安装手册(Creating Sites):https://www.reviewboard.org/docs/manual/8.1/admin/installation/creating-sites/
- 官方下载页:https://www.reviewboard.org/downloads/
- PyPI 项目页(8.1,2026-08-26 发布):https://pypi.org/project/ReviewBoard/8.1/
- MySQL 8.0 参考手册(CREATE USER / GRANT):https://dev.mysql.com/doc/refman/8.0/en/create-user.html
本系列其余篇目:组件定位与同类对比见 《Review Board 介绍与选型指南》;配置参数逐项解释见 《Review Board 8.1 配置参数详解》;
rb-site全家桶与备份升级实操见 《Review Board 8.1 常用 CLI 与运维命令详解》。