1. Download the wind is coming. Fox
Http://gogs.io/docs/installation/install_from_binary.html
Download the latest version of
wget Https://github.com/gogits/gogs/releases/download/v0.6.1/linux_amd64.zip
2. Create a new user
AddUser git
Enter the password yourself
3. Unzip
Unzip Linux_amd64.zip
Mobile storage location, stored in/www/directory
MV Gogs/www/gogs
4. Database
The database must have been installed first, this is MySQL.
Execute the import of the following file (or the SQL statement that you manually execute the file):
/www/gogs/scripts/mysql.sql
5. Execution of commands
/www/gogs/gogs Web
If you need to customize the port
/www/gogs/gogs Web-port 3001
3001: Indicates access port 6. Open Browser settings
Here the server address is:
Note: To set some parameters for the first time
http://192.168.1.11:3001
7. Set the relevant parameters in the page
To set some parameters, such as Administrator, database, warehouse address, warehouse user,
Slightly.
localhost to 192.168.1.11
8. Set Boot to boot 8.1 modify boot file
/www/gogs/scripts/init/debian/gogs
put:
Workingdir=/home/git/gogs
Modified to:
Workingdir=/www/gogs/gogs
Put
Usage: $SCRIPTNAME
Modified to:
Usage: $WORKINGDIR
8.2 Setting up the service
Vim/lib/systemd/system/gogs.service
The file contents are as follows
[Unit] Description=gogsafter=network.target[service]type=forkingexecstart=/www/gogs/scripts/init/debian/gogs Startexecreload=/www/gogs/scripts/init/debian/gogs Restartexecstop=/www/gogs/scripts/init/debian/gogs Stopprivatetmp=true[install]wantedby=multi-user.target
8.3 Setup Commands
#启用开机启动systemctl enable gogs.service# to start (if not, start with the following command) systemctl start Gogs.service
Ubuntu 15.04 gogs (git repository) binary installation