不用 1 分钟,从 0 搭建自己的轻博客

2019 年 4 月 24 日
 xyjtou

任意小机机都可以安装,在 Ubuntu 14/16/18 全系 和 Debian 8/9 主机上实测通过 😋

演示:liteBB


打开本机 Terminal 或 SSH 连上主机,输入下面 8 行命令就完成啦!

ubuntu@vm-ubuntu:~$ sudo -i
root@vm-ubuntu:~# apt update
root@vm-ubuntu:~# apt install git
root@vm-ubuntu:~# git clone https://github.com/225119/litebb
root@vm-ubuntu:~# cd litebb
root@vm-ubuntu:~/litebb# apt install python3-pip
root@vm-ubuntu:~/litebb# pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple/ -r requirements.txt
root@vm-ubuntu:~/litebb# /usr/local/bin/gunicorn -w 4 -b 0.0.0.0:80 "app:create_app('default')"

就酱,搞定!网速快的话只须 40 秒左右 😂😂😂 (非 root 用户加 sudo 执行命令)

本地就访问 http://127.0.0.1/ 如果是云服务器或 VPS,直接访问 IP 即可打开博客啦!默认用户名 /密码:admin/admin

8532 次点击
所在节点    分享创造
39 条回复
hello461380249
2019 年 4 月 24 日
liteBB... 小声 bb ? 🤣
xyjtou
2019 年 4 月 24 日
@hqdmy 只依赖一个 Python3 环境,应该没问题。

@yelah 有考虑写个一键 setup,发现省不了几下,总共就几行命令,抄抄其实更快😛

@hello461380249 #11 楼解释过啦😀
CallMeReznov
2019 年 4 月 24 日
大佬,牛皮.
正好看看代码学习学习.
wmui
2019 年 4 月 24 日
报个 bug,非公开文章添加标签后,标签文章数量统计不正确
hasaki1997
2019 年 4 月 24 日
这个项目开源吗?
xyjtou
2019 年 4 月 24 日
@CallMeReznov 欢迎提建议反馈 :)

@wmui 测试了下没有复现这个问题阿,是不是删除过了文章?(已知的情况是删除被标签过的文章,文章被删除后标签统计数量没有更新)。你可以截个图吗?发 info@litebb.com 这个邮箱

@hasaki1997 是的,github 上有。
strugglexiang
2019 年 4 月 24 日
关注一下,有时间搞搞
misaka19000
2019 年 4 月 24 日
楼主不如写个 shell 脚本然后支持远程下载该脚本,这样只要一行命令就可以安装了
xyjtou
2019 年 4 月 24 日
@strugglexiang 感谢,欢迎关注 ~

@misaka19000 哈哈 下次写个 setup 😄
ctD
2019 年 4 月 24 日
插眼
Ruan
2019 年 4 月 24 日
centos 支持吗
xyjtou
2019 年 4 月 24 日
@Ruan Linux 的各个发行版都是可以的。CentOS7 默认是 Python2 环境,所以要先装下 Python3 环境。启动命令 gunicorn 的路径和 Debian/Ubuntu 稍有不同,这样就可以了:
[root@VM_centos litebb]# /usr/bin/gunicorn -w 4 -b 0.0.0.0:80 "app:create_app('default')"
DJI360
2019 年 4 月 25 日
mark,明天看一下
ghos
2019 年 4 月 25 日
可以搞个 docker 镜像吗
xyjtou
2019 年 4 月 25 日
@ghos 会考虑,主要是 https 证书无法预先装进去,在考虑 nginx 要不要 build 进去。
leisunlove
2019 年 4 月 26 日
centos 麻烦老哥支持一下。
xyjtou
2019 年 4 月 26 日
@Ruan
@leisunlove

轻博客 1 分钟安装教程,在附言了增加了 -:)
record
2019 年 5 月 3 日
在 armbian 上未能正常搭建
root@Sakura_DNS:~/litebb# pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple/ -r requirements.txt
Collecting alembic==0.9.9 (from -r requirements.txt (line 1))
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/89/03/756d5b8e1c90bf283c3f435766aa3f20208d1c3887579dd8f2122e01d5f4/alembic-0.9.9.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named 'setuptools'

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-7bq_d0na/alembic/
xyjtou
2019 年 5 月 5 日
@record 这个看起来像是没有 Python3 环境。你 whereis Python 看下,是什么结果? 你可以直接在这里提交问题反馈:litebb.com/s/O85MKR

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/558183

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX