1, preparation:
sudo apt-get update sudo apt-get install -y curl openssh-server ca-certificates sudo apt-get install -y postfix
2, GPG public key GitLab of trust:
curl https://packages.gitlab.com/gpg.key 2> /dev/null | sudo apt-key add - &>/dev/null
3, the path mirror configuration
As foreign download speed is too slow, so the configuration path Tsinghua University mirroring.
sudo vim /etc/apt/sources.list.d/gitlab-ce.list
write therein:
deb https: // mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu great main
4, the installation gitlab-ce
sudo apt-get update sudo apt-get install gitlab-ce
5, to perform configuration
sudo gitlab-ctl reconfigure
6, start gitlab
sudo gitlab-ctl start
7, browser access
HTTP: // IP address of the computer
The first entry, you need to enter an administrator account password in order to facilitate the latter part of management.
After entering good, you can log on as an administrator, the account is root, password is the password you just entered.
So far, gitlab has been successfully installed, after use, and there is not much difference github, were not introduced.
8, additional configuration (This step is not necessary): Modify the port and address gitlab
Edit gitlab.rb
sudo gedit /etc/gitlab/gitlab.rb
The following data changes
external_url 'http://gitlab.example.com'
For example, change
external_url 'http://ubuntu:9900'
Which, "ubuntu" is gitlab host name of this computer is installed, it can also be replaced by IP address, or other can, because there are nginx proxy port as long as no conflict on the line, I readily dubbed 9900
After the change, we need to execute the following code to re-initialize the configuration takes effect:
sudo gitlab-ctl reconfigure
Finally, access gitlab in the browser, found to have been modified successfully, you needubuntu:9900
to access, instead of the host name through IP address to access, but you need to add mapping and IP host name in the hosts file
9, Other
gtilab part of the command
Stop sudo gitlab-ctl stop open sudo gitlab-ctl start confirm the configuration (after modifying the configuration, you must perform) sudo gitlab-ctl reconfigure view the log sudo gitlab-ctl tail view GitLab version cat / opt / gitlab / embedded / service / gitlab- rails / VERSION
Uninstall gitlab
Perform the following four steps:
sudo gitlab-ctl uninstall sudo dpkg -r gitlab-ce sudo rpm -e gitlab-ce reboot(重启)
Native code library path
/ Var / opt / gitlab / Go-data
Reference links:
https://www.cnblogs.com/helios-fz/p/10932562.html
https://mirror.tuna.tsinghua.edu.cn/help/gitlab-ce/