赞
踩
在 Ubuntu 上安装 Gitea 的步骤如下:
sudo apt update sudo apt install git
sudo adduser --system --group --disabled-password --shell /bin/bash --home /home/git git
wget -O gitea https://dl.gitea.io/gitea/1.15.6/gitea-1.15.6-linux-amd64
sudo mv gitea /usr/local/bin/gitea sudo chmod +x /usr/local/bin/gitea
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
sudo nano /etc/systemd/system/gitea.service
然后将以下内容粘贴到文件中: [Unit] Description=Gitea (Git with a cup of tea) After=syslog.target After=network.target Requires=mysqld.service [Service] RestartSec=2s Type=simple User=git Group=git WorkingDirectory=/var/lib/gitea/ ExecStart=/usr/local/bin/gitea web -c /etc/gitea/app.ini Restart=always Environment=USER=git HOME=/home/git GITEA_WORK_DIR=/var/lib/gitea [Install] WantedBy=multi-user.target
保存并关闭文件。sudo systemctl enable gitea sudo systemctl start gitea
http://your-server-ip:3000
来访问 Gitea 的安装向导。Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。