Skip to main content

服务器配置

更新系统

sudo apt update
sudo apt upgrade

配置网络

sudo -i 
export url='https://fastly.jsdelivr.net/gh/juewuy/ShellCrash@master' && wget -q --no-check-certificate -O /tmp/install.sh $url/install.sh && bash /tmp/install.sh && source /etc/profile &> /dev/null

配置 ZSH

sudo apt install zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

plugins=(git z zsh-syntax-highlighting zsh-autosuggestions)

alias acme.sh=~/.acme.sh/acme.sh
alias dd=docker compose down
alias du=docker compose up -d
alias dps=sudo docker ps

https 配置

curl https://get.acme.sh | sh -s email=my@example.com
sudo apt install socat

export DP_Id="1234"
export DP_Key="sADDsdasdgdsf"
acme.sh --issue --dns dns_dp -d edtools.top -d "*.edtools.top"

acme.sh --install-cert -d edtools.top \
--cert-file /home/ubuntu/ssh/cert.pem \
--key-file /home/ubuntu/ssh/key.pem \
--fullchain-file /home/ubuntu/ssh/fullchain.pem \

Anaconda 恢复默认源

Mattermost 部署

  1. PostgreSQL 数据库安装、数据库创建、配置
  2. mattermost 安装配置
  3. nginx 安装配置
  4. mattermost 系统配置
    • 邮箱
    • 开放注册
    • 语言

Docker 安装

LobeChat

vim docker-compose.yaml
services:
lobe-chat:
image: lobehub/lobe-chat
container_name: lobe-chat
restart: always
ports:
- '3210:3210'
environment:
OPENAI_API_KEY:
OPENAI_PROXY_URL:
DEEPSEEK_API_KEY:
ENABLED_OLLAMA: 0
ZHIPU_API_KEY:
ACCESS_CODE:

Dify

sudo vim /etc/nginx/sites-available/?
sudo ln -s /etc/nginx/sites-available/? /etc/nginx/sites-enabled/?
server {
listen 80;
server_name dify.edtools.top;
return 301 https://$server_name$request_uri;
}

server {
listen 443 ssl;
server_name dify.edtools.top;

ssl_certificate /home/ubuntu/ssl/nginx/cert.pem;
ssl_certificate_key /home/ubuntu/ssl/nginx/key.pem;

ssl_prefer_server_ciphers on;
ssl_session_timeout 10m;
proxy_max_temp_file_size 0;
location / {
proxy_pass http://127.0.0.1:81;
}
}