分类 Ops 中的文章

部署 gitea

安装git 1 apt-get install git 添加git用户 1 2 adduser git sudo usermod -aG sudo git 添加gitea的目录结构 1 2 3 4 5 6 7 cd ~ sudo mkdir -p /var/lib/gitea/{custom,data,indexers,public,log} sudo chown git:git /var/lib/gitea/{data,indexers,log} sudo chmod 750 /var/lib/gitea/{data,indexers,log} sudo mkdir /etc/gitea sudo chown root:git /etc/gitea sudo chmod 770 /etc/gitea 下载gitea 1 2 3 sudo wget -O gitea https://dl.gitea.io/gitea/1.13.1/gitea-1.13.1-linux-amd64 sudo chmod +x gitea sudo cp gitea /usr/local/bin/gitea 配置nginx, 预期gitea进程在9000端口启动 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 # /etc/nginx/sites-enabled/git.aweffr.com server { listen 80; server_name git.aweffr.com; return 302 https://$host$request_uri; } # Default server configuration server { server_name git.aweffr.com; # SSL configuration listen 443 ssl; ssl_certificate certs/aweffr.……

阅读全文