一、安装软件
pacman -U listmonk-bin-5.0.2-1-x86_64.pkg.tar.zst
二、配置 postgresql
创建目录并设置权限:
mkdir -p /srv/postgres
chown -R postgres:postgres /srv/postgres
chmod 700 /srv/postgres
用 postgres 用户初始化数据库群集
su -l postgres -c "initdb --locale=C.UTF-8 --encoding=UTF8 -D '/srv/postgres/data'"'"
告诉 systemd 使用新 PGDATA
nano -w /usr/lib/systemd/system/postgresql.service
会打开编辑器,写入以下内容:
[Service]
Environment=PGDATA=/srv/postgres
PIDFile=/srv/postgres/data/postmaster.pid
重新加载 systemd 并启动:
systemctl daemon-reload
systemctl start postgresql
systemctl enable postgresql # 若需要开机自启
三、初始化数据
$ sudo -u postgres psql
postgres=# CREATE USER listmonk WITH PASSWORD '<your_password>';
postgres=# CREATE DATABASE listmonk WITH OWNER listmonk;
postgres=# \q
编辑软件配置
nano -w /etc/listmonk/config.toml
password = "xxxx"
初始化数据
sudo -u listmonk listmonk --config /etc/listmonk/config.toml --install
四、启动服务
systemctl enable listmonk && systemctl start listmonk
五、访问
https://ip:9000 创建你的管理员账号和密码