This article was tested in Ubuntu 16.04 in Win7+vmware.
Run the following command:
sudo Install git sudo adduser git # Create a separate user for Gogs
Official download Install file compression package, I am install from binary, I am currently released in 2017-11-22 version. Https://gogs.io/docs/installation/install_from_binary
Unzip the compressed package into the/home/git/gogs directory.
The Gogs service can be configured at this time, and I use the default settings. To configure the/home/git/gogs/scripts/init/debian/gogs that can be modified
Execute the following command:
sudo cp /home/git/gogs/scripts/init/debian/gogs/etc/init.d/sudochmod +x/etc/init.d/ Gogscp /home/git/gogs/scripts/systemd/gogs.service/etc/systemd/system/ # Copy Service sudo Systemctl Enable Gogs # Enable run at startup sudo systemctl start Gogs # start now
Access the Http://localhost:3000/install in the Win7 browser, where localhost will be changed to its own Ubuntu server IP.
All of which use the default settings except:
- Database, because I do not know how to configure MySQL, I choose SQLite.
- Change all localhost to the IP of your Ubuntu server.
After install, modify the configuration only by modifying the file/home/git/gogs/custom/conf/app.ini, if you want to modify, you can refer to Https://gogs.io/docs/advanced/configuration_cheat_sheet.
To access the Gogs service, you can pass http://localhost:3000/, where localhost is the IP of Ubuntu server
LocalHost can be modified in/home/git/gogs/custom/conf/app.ini so that the Git repository is used correctly.
At this point, you should basically use Gogs. There are some room for improvement, a bit lazy, and the network problem is not implemented, including:
- Use the MySQL database.
- Reverse proxy, realize the domain name landing. Nginx (HTTPS://WWW.JIANSHU.COM/P/D946314BCE2F), Apache2 (https://www.cnblogs.com/ddr888/archive/2016/01/14/5131028.html)
This article refers to the following:
https://www.jianshu.com/p/d946314bce2f
Https://www.cnblogs.com/ddr888/archive/2016/01/14/5131028.html
Https://gogs.io/docs/intro/faqs
Https://gogs.io/docs/advanced/configuration_cheat_sheet
Install, configure Gogs under VMware + ubuntu16.04 Linux