This repository has been archived on 2024-03-20. You can view files and clone it, but cannot push or open issues or pull requests.
thelinuxlist/scripts/giteainstall.sh

18 lines
740 B
Bash
Raw Normal View History

2022-10-18 21:38:54 -07:00
#!/bin/bash
2022-10-18 21:52:01 -07:00
sudo systemctl stop gitea
2022-10-18 22:35:02 -07:00
sudo ufw allow 3000
2022-10-18 21:38:54 -07:00
sudo wget -O /usr/local/bin/gitea https://dl.gitea.io/gitea/1.17.3/gitea-1.17.3-linux-amd64
sudo chmod +x /usr/local/bin/gitea
sudo adduser --system --shell /bin/bash --gecos 'Git Version Control' --group --disabled-password --home /home/git git
sudo mkdir -pv /var/lib/gitea/{custom,data,log}
sudo chown -Rv git:git /var/lib/gitea
sudo chmod -Rv 750 /var/lib/gitea
sudo mkdir -v /etc/gitea
2022-10-18 21:53:14 -07:00
sudo chown -Rv root:git /etc/gitea
2022-10-18 21:38:54 -07:00
sudo chmod -Rv 770 /etc/gitea
2022-10-18 22:35:02 -07:00
sudo wget -O /etc/systemd/system/gitea.service https://git.oldgate.org/Sophia/thelinuxlist/raw/branch/main/systemd/gitea.service
2022-10-18 21:38:54 -07:00
sudo systemctl enable --now gitea
sudo systemctl start gitea
2022-10-19 01:31:11 -07:00
sleep 3
2022-10-18 21:38:54 -07:00
sudo systemctl status gitea