自行部署Isso评论系统(服务器端)
Le Thu 13 February 2025
Isso是评论系统,可以自行部署服务器端,也可以使用第三方提供的服务。
此处自行搭建。
isso是Python程序,发布于PyPI,使用pip安装即可。
建立相关目录。
mkdir /opt/isso
mkdir /opt/isso/myenv
mkdir /opt/isso/conf
mkdir /opt/isso/db
安装Python虚拟环境,并安装isso。
python3 -m venv /opt/isso/myenv
/opt/isso/myenv/bin/pip install isso
单服务器配置文件:
[general]
dbpath = /opt/isso/db/comments.db
host = 127.0.0.1
port = 8080
logfile = /opt/isso/log/isso.log
loglevel = info
多服务器配置文件:
touch /opt/isso/conf/site1.conf
touch /opt/isso/conf/site2.conf
touch /opt/isso/conf/site3.conf
[general]
dbpath = /opt/isso/db/comments.db
host = 127.0.0.1
port = 8080
logfile = /opt/isso/log/isso.log
loglevel = info
使用合适的应用服务器,启动isso。
单服务器:
多服务器:
$ export ISSO_SETTINGS="/etc/isso.d/foo.example.cfg;/etc/isso.d/other.bar.cfg"
$ gunicorn isso.dispatch -b localhost:8080
这里需要注意ISSO_SETTINGS变量。
这个变量中,多个配置文件之间使用;分隔。
如果只有一个配置文件,则不使用;。如果将;加入变量中,程序会不当处理,给出难以理解的出错信息。导致浪费时间。
将web服务器反向代理到isso应用服务器。
参考了以下资料,特此致谢:
(访问于2025年2月)
- https://oktomus.com/posts/2020/add-comments-to-a-static-blog-with-isso/
- https://stanislas.blog/2018/02/add-comments-to-your-blog-with-isso/
- https://hiob.fr/isso-docker/
- https://www.brunoparmentier.be/blog/getting-isso-to-work-on-centos-6-and-nginx/
- https://stanislas.blog/2020/02/migrate-dated-permalinks-ghost-isso/
- https://blog.saintic.com/blog/275.html
- https://stanislas.blog/2020/02/migrating-comments-from-isso-to-disqus/
- https://isso-comments.de/docs/guides/tips-and-tricks/
- https://isso-cn.rtfd.vip/zh_CN/latest/docs/setup/multiple-sites/
Par 纳兰风来, Catégorie : my-ops
Tags : my-ops /
Autres articles
给Pelican驱动的博客添加上Isso评论系统
Le Thu 13 February 2025
Pelican是静态博客系统,Isso是评论系统。
要让Pelican支持Isso,需要一个支持Isso的Pelican主题。 如果主题不支持,则需要修改主题。
Pelican的默认主题是notmyidea,这个主题没有加入Isso的支持。
pelicanconf.py配置文件中加入:
ISSO_SERVER = "https://isso.example …Par 纳兰风来, Catégorie : my-ops
Lire la suite …dpkg --listfiles用法
Le Fri 07 February 2025
dpkg --listfiles some-pkg
# or
dpkg -L some-pkg
列出已经安装的某个包的所拥有的文件列表。
比如列出nginx-light的文件列表:
root@ws-cfkazs-0 /workspace# dpkg -L nginx-light
/.
/usr
/usr/sbin
/usr/sbin/nginx
/usr/share
/usr/share/doc
/usr/share …Par 纳兰风来, Catégorie : my-ops
Lire la suite …/tmp目录及其持久性
Le Fri 07 February 2025
一些工作空间启动时,不会挂载/tmp目录。
➜ /workspace df -h
Filesystem Size Used Avail Use% Mounted on
overlay 3.3G 305M 2.8G 10% /
overlay 985G 332G 613G 36% /run
tmpfs 64M 0 64M 0% /dev
tmpfs 10M 4.0K 10M …Par 纳兰风来, Catégorie : my-ops
Lire la suite …启动博客
Le Thu 06 February 2025
创建python ven环境。仅需创建一次。
python -m venv myenv
启用python venv环境。需要在每次使用fish shell时启用。
source myenv/bin/activate.fish
安装pelican
pip install pelican markdown
使用pelican-quickstart创建博客
(myenv) root@ws-cfkazs-0 /workspace# pelican-quickstart
Welcome to pelican-quickstart …Par 纳兰风来, Catégorie : my-ops
Lire la suite …站点证书观测
Le Thu 06 February 2025
https://crt.sh?q=cloudstudio.icu
Par 纳兰风来, Catégorie : my-ops
Lire la suite …磁盘空间
Le Thu 06 February 2025
➜ /workspace df -h
Filesystem Size Used Avail Use% Mounted on
overlay 3.3G 293M 2.8G 10% /
tmpfs 10M 4.0K 10M 1% /.PlnPyKFp4CRfFtgC1_run
overlay 689G 396G 258G 61% /tmp
tmpfs 64M 0 64M 0% /dev
shm 64M 84K 64M 1% /dev/shm
cgroup 1.0M 0 1.0M 0 …Par 纳兰风来, Catégorie : my-ops
Lire la suite …Site Domains
Le Thu 06 February 2025
主站域名:
- cloudstudio.icu
- www.cloudstudio.icu
博客站域名:
- blog.cloudstudio.icu
文件托管域名:
- p.cloudstudio.icu
Cloud Studio跳转域名:
- costs.cloudstudio.icu
- dash.cloudstudio.icu
- docs.cloudstudio.icu
腾讯云跳转域名:
- coding.cloudstudio.icu
- dns.cloudstudio.icu …
Par 纳兰风来, Catégorie : my-ops
Lire la suite …Nginx之安装
Le Thu 06 February 2025
(myenv) root@ws-cfkazs-0 /workspace# cat /etc/debian_version
bullseye/sid
(myenv) root@ws-cfkazs-0 /workspace# cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.6 LTS"
(myenv) root@ws-cfkazs-0 /workspace#
apt update
apt install nginx-light
debian系统中,有nginx-light,nginx-full,nginx-extras三个包。
三个包的不同在 …
Par 纳兰风来, Catégorie : my-ops
Lire la suite …nginx start
Le Thu 06 February 2025
nginx
html目录位于/var/www/html。
(myenv) root@ws-cfkazs-0 /workspace [0|1]# ls /var/www/html
blog.cloudstudio.icu.zip blog.cloudstudio.icu.zip.md5 cloudstudio.icu.zip cloudstudio.icu.zip.md5 index.nginx-debian.html
Par 纳兰风来, Catégorie : my-ops
Lire la suite …nginx stop
Le Thu 06 February 2025
用pkill命令停止nginx
pkill nginx
nginx的停止命令
(myenv) root@ws-cfkazs-0 /workspace# nginx -s stop
nginx: [error] open() "/run/nginx.pid" failed (2: No such file or directory)
nginx的退出命令
(myenv) root@ws-cfkazs-0 /workspace [0|1]# nginx -s quit
nginx: [error] open() "/run/nginx.pid" failed (2: No such file or directory)
Par 纳兰风来, Catégorie : my-ops
Lire la suite …申请TLS证书
Le Thu 06 February 2025
以webroot方式申请证书。
sudo certbot certonly --webroot \
-w /srv/acme-challenge/ \
\
-d cloudstudio.icu \
-d blog.cloudstudio.icu \
-d coding.cloudstudio.icu \
-d costs.cloudstudio.icu \
-d dash.cloudstudio.icu \
-d dns.cloudstudio.icu \
-d docs.cloudstudio.icu \
-d domain.cloudstudio.icu \
-d lighthouse.cloudstudio.icu \
-d p.cloudstudio.icu \
-d tls …