Installation environment requirements
MySQL: Version >= 5.7
Git : Version >= 1.7.1
Detailed installation steps
Create a non-root account
sudo adduser git
Switch to the git user and create an ssh directory
su git mkdir ~/.ssh
to Download the installation package in a custom directory
cd /home/git wget https://cdn.gogs.io/0.11.53/gogs_0.11.53_linux_amd64.tar.gz
Unzip the installation package
tar -zxvf gogs_0.11.53_linux_amd64.tar.gz
Enter the decompression directory
cd gogs
Start gogs
./gogs web
Use pm2 to start as a background service
nohup ./gogs web &
Originally I wanted to use pm2 for management, but pm2 always reported an error when starting up, saying that the current root user cannot start. Let's leave it like this for now.