Remark42安装配置

安装 wget https://github.com/umputun/remark42/releases/download/v1.11.3/remark42.linux-amd64.tar.gz -O remark42.linux-amd64.tar.gz tar xzf remark42.linux-amd64.tar.gz mv remark42.linux-amd64 /usr/local/bin 添加用户设置权限 useradd -r remark42 mkdir -m 770 /var/www/remark42 chown :remark42 /var/www/remark42 mkdir -m 770 /etc/remark42 chown :remark42 /etc/remark42 设置配置文件/启动 nano /etc/remark42/remark42.conf REMARK_URL=https://comment.techlayman.com SECRET=some_secret_key_phrase_1234 SITE=techlayman AUTH_ANON=false EMOJI=true AUTH_GITHUB_CID=xxx AUTH_GITHUB_CSEC=xxx nano /etc/systemd/system/remark42.service [Unit] Description=remark42 comment engine After=network.target [Service] User=remark42 Group=remark42 EnvironmentFile=/etc/remark42/remark42.conf WorkingDirectory=/var/www/remark42 Restart=always RestartSec=5 ExecStart=/usr/local/bin/remark42.linux-amd64 server [Install] WantedBy=multi-user.target systemctl enable --now remark42 Hugo模板修改 comments.html模板 nano layouts/partials/comments.html {{- with .Site.Params.comments.remark42 -}} <div id="remark42"></div> <script> var remark_config = { host: '{{ ....

2023-07-09 · 1 min · TechLayman

V2ray手动安装和配置

前提条件 本文假设读者已经具备以下条件: 一台境外的vps,推荐BWG。 一个域名,无备案要求。先设置dns将域名解析到vps的ip。 为域名申请一个证书,可以从Let’s Encrypt获取免费证书;参考Caddy安装和配置。 V2ay服务端 校准时区 VMess 协议的认证基于时间,一定要保证服务器和客户端的系统时间相差要在 90 秒以内。 这里我们把时区设成上海 > timedatectl list-timezones | grep Shanghai Asia/Shanghai > timedatectl set-timezone Asia/Shanghai 服务端安装 bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh) # /etc/systemd/system/v2ray.service [Unit] Description=V2Ray Service Documentation=https://www.v2fly.org/ After=network.target nss-lookup.target [Service] User=nobody CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE NoNewPrivileges=true ExecStart=/usr/local/bin/v2ray run -config /usr/local/etc/v2ray/config.json Restart=on-failure RestartPreventExitStatus=23 [Install] WantedBy=multi-user.target # /etc/systemd/system/v2ray.service.d/10-donot_touch_single_conf.conf # In case you have a good reason to do so, duplicate this file in the same directory and make your customizes there....

2023-04-03 · (updated: 2023-05-02) · 3 min · TechLayman

Caddy安装和配置

安装前准备 go安装和环境配置 apt install wget software-properties-common apt-transport-https wget https://golang.google.cn/dl/go1.20.2.linux-amd64.tar.gz tar -zxvf go1.20.2.linux-amd64.tar.gz -C /usr/local/ nano ~/.bashrc export GO_HOME=/usr/local/go/ export GO_PATH=$HOME/go export PATH=${GO_HOME}/bin:$GO_PATH/bin:$PATH source ~/.bashrc #运行go进行测试 go version #改为国内加速地址 go env -w GOPROXY=https://goproxy.cn/,direct 安装Caddy 安装xcaddy,编译alidns插件。 apt install -y curl git jq apt install -y debian-keyring debian-archive-keyring apt-transport-https curl -1sLf 'https://dl.cloudsmith.io/public/caddy/xcaddy/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-xcaddy-archive-keyring.gpg curl -1sLf 'https://dl.cloudsmith.io/public/caddy/xcaddy/debian.deb.txt' | tee /etc/apt/sources.list.d/caddy-xcaddy.list apt update apt install xcaddy xcaddy --help xcaddy build --output ....

2023-04-02 · (updated: 2023-07-26) · 3 min · TechLayman