Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // To install
- # You need a database system! I recommed MySQL/MariaDB: https://pastebin.com/CxsPHAE7
- useradd -M -s /usr/sbin/nologin gitea
- mkdir /home/gitea
- cd /home/gitea
- # The version of you Gitea instance! To see all exists versions, got to https://dl.gitea.com/gitea
- version=1.20.0-rc2
- wget https://dl.gitea.com/gitea/$version/gitea-$version-linux-amd64
- mv gitea-$version-linux-amd64 gitea
- chmod -R 777 .
- sudo -u gitea screen -S Gitea ./gitea
- # Now we setup a service for Gitea
- cat << EOF > /etc/systemd/system/gitea.service
- [Unit]
- Description=Gitea
- After=network.target
- Wants=network-online.target
- [Service]
- Restart=always
- Type=simple
- ExecStart=sudo -u gitea /home/gitea/gitea
- Environment=
- [Install]
- WantedBy=multi-user.target
- EOF
- # Enable
- systemctl enable gitea
- # And start Gitea with
- systemctl start gitea
- // To uninstall
- sudo -u gitea screen -X gitea quit
- rm -r /home/gitea
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement