Installation environment requirements
MySQL: Version >= 5.7
Git : Version >= 1.7.1
Detailed installation steps
Create a non-root account
sudo adduser git
Copy after login
Switch to the git user and create an ssh directory
su git mkdir ~/.ssh
Copy after login
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
Copy after login
Unzip the installation package
tar -zxvf gogs_0.11.53_linux_amd64.tar.gz
Copy after login
Enter the decompression directory
cd gogs
Copy after login
Start gogs
./gogs web
Copy after login
Use pm2 to start as a background service
nohup ./gogs web &
Copy after login
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.