Brief introduction
GitLab Community Edition can provide many of the same functionality as GitHub, and is deployed on their own machines, we will be because the network and a number of other issues inconvenient to use GitHub, then deploy a GitLab is the best choice.
Download and install GitLab
My environment is deployed under Operation Ubuntu 16.04.
GitLab Download: https://about.gitlab.com/downloads/#ubuntu1604
Other versions Please choose their own different systems.
1. The first is to install some dependent services
sudo apt-get install curl openssh-server ca-certificates postfix
2. The official advice is to use a script to perform the installation directly
sudo curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
sudo apt-get install gitlab-ce
If you can install over the way, congratulations on your network well, but generally because of the large walls of this approach often does not succeed, so we have to manually download the installation package of the way.
nohup wget -LJO https://packages.gitlab.com/gitlab/gitlab-ce/packages/ubuntu/xenial/gitlab-ce_8.17.3-ce.0_amd64.deb/download.deb &
sudo dpkg -i gitlab-ce_8.17.3-ce.0_amd64.deb
These are examples of the specific version needs to be replaced, in https://packages.gitlab.com/gitlab/gitlab-ce find in their own GitLab version, available from the Download to download address.
I chose GitLab 8.17.3 version
Using wget or curl to download this package to the server. Slow, then the server downloads available tool to download and then up through the SCP or ftp to the server locally.
sudo dpkg -i gitlab-ce_8.17.3-ce.0_amd64.deb
Use the above command to install.
Open /etc/gitlab/gitlab.rb, will external_url = ' modify http://git.example.com' for their own domain address: http: //example.com, the default is port 80, to use later in other ports plus port number, such as: HTTP: //127.0.0.1: 8080 .
Then execute:
sudo gitlab-ctl reconfigure
After startup browser to access the configured address, interface reset the administrator password should appear.
Speaking [OPTIONAL]
1. Download the finished package provided by the community, in https://gitlab.com/xhang/gitlab/ find the Chinese branch.
sudo wget wget -cO gitlab-9.0_zh.tar.gz https://gitlab.com/xhang/gitlab/repository/archive.tar.gz?ref=9-0-stable-zh
2. Unzip the package
sudo tar zxvf gitlab-9.0_zh.tar.gz
3. Stop GitLab Service
sudo gitlab-ctl stop
4. Backup gitlab-rails directory, the directory is the main part of a web application, but also the beginning of the current version of the warehouse project, as well as the finished package directory to be covered.
sudo tar zcvf /opt/gitlab/embedded/service/gitlab-rails-bak.tar.gz gitlab-rails
5. The finished patch covering the decompressed original
sudo cp -rf gitlab-9-0-stable-zh/* gitlab-rails/
6. Start Services
sudo gitlab-ctl start
7. Re-execute the configuration command
sudo gitlab-ctl reconfigure
Speaking complete
Some interface settings
After entering the interface might turn off some of our less than the setting, change the setting to "management area" in
"Open Gravatar Avatar" closed, can not access domestic, over the wall in order to get access to
"open registration" closed, our own warehouse system does not require public registration, account assignment like