我想要说的,前人们都已经说过了:Pleroma Documentation
如果是用 OTP 方式安装的话,Pleroma 的操作基本上是:
bash
su pleroma -s $SHELL -lc "命令"
命令里面的内容,全都可以在 Pleroma 文档找到,遇事不决,先查文档。
基础操作
bash
# 查看pleroma情况systemctl status pleroma# 启动systemctl start pleroma# 或者:su pleroma -s $SHELL -lc "./bin/pleroma daemon"## 开机启动systemctl enable pleroma## 停止systemctl stop pleroma# 或者:su pleroma -s $SHELL -lc "./bin/pleroma stop"
数据库运维
Database maintenance tasks - Pleroma Documentation
bash
# safe to cancel:# Fullsu pleroma -s $SHELL -lc "./bin/pleroma_ctl database vacuum full"# Analyzesu pleroma -s $SHELL -lc "./bin/pleroma_ctl database vacuum analyze"
版本升级
Updating your instance - Pleroma Documentation
bash
su pleroma -s $SHELL -lc "./bin/pleroma_ctl update"systemctl stop pleromasu pleroma -s $SHELL -lc "./bin/pleroma_ctl migrate"systemctl start pleroma
Pleroma-fe 升级
bash
cd /tmp
版本链接:Commit -> Pipelines -> Download artifacts -> build(右键复制链接) 以kazv.moe infrastructure / pleroma-fe · GitLab 为例子
bash
sudo curl -L 复制的链接 -o pleroma-fe.zip# 如:sudo curl -L https://lily-is.land/infra/pleroma-fe/-/jobs/5430/artifacts/download?file_type=archive -o pleroma-fe.zip# 解压sudo busybox unzip pleroma-fe.zip -o -d /var/lib/pleroma
然后复制里面的内容到 static 文件夹
bash
cd /var/lib/pleromasudo cp -r dist/* static/
添加主题
Theming your instance - Pleroma Documentation
首先要确定 static 文件夹所在路径,可以在 admin-fe 里的这个位置: 然后进入这个路径,如:
bash
cd /var/lib/pleroma/static
然后ls
一下看路径下有没有 static 文件夹,如果没有的话就创建一个,如果有了就进入这个文件夹
bash
lscd static
同样的在路径下创建themes
和styels.json
文件
在 themes 文件夹下放主题 json 文档,然后在
Styles.json 默认下添加自定义主题路径:
json
{"pleroma-dark": ["Pleroma Dark", "#121a24", "#182230", "#b9b9ba", "#d8a070", "#d31014", "#0fa00f", "#0095ff", "#ffa500"],"pleroma-light": ["Pleroma Light", "#f2f4f6", "#dbe0e8", "#304055", "#f86f0f", "#d31014", "#0fa00f", "#0095ff", "#ffa500"],"classic-dark": ["Classic Dark", "#161c20", "#282e32", "#b9b9b9", "#baaa9c", "#d31014", "#0fa00f", "#0095ff", "#ffa500"],"bird": ["Bird", "#f8fafd", "#e6ecf0", "#14171a", "#0084b8", "#e0245e", "#17bf63", "#1b95e0", "#fab81e"],"ir-black": ["Ir Black", "#000000", "#242422", "#b5b3aa", "#ff6c60", "#FF6C60", "#A8FF60", "#96CBFE", "#FFFFB6"],"monokai": ["Monokai", "#272822", "#383830", "#f8f8f2", "#f92672", "#F92672", "#a6e22e", "#66d9ef", "#f4bf75"],"redmond-xx": "/static/themes/redmond-xx.json","redmond-xx-se": "/static/themes/redmond-xx-se.json","redmond-xxi": "/static/themes/redmond-xxi.json","breezy-dark": "/static/themes/breezy-dark.json","breezy-light": "/static/themes/breezy-light.json","mammal": "/static/themes/mammal.json","你的主题名字": "/static/themes/my-awesome-theme.json"}
主题参考:
加入中继
bash
su pleroma -s $SHELL -lc "./bin/pleroma_ctl relay follow 中继的网址"