Pro test: centos6.5
Install dependent packages:
1: yum install curl policycoreutils policycoreutils-python openssh-server openssh-clients
After the dependency package is installed:
1: systemctl enable sshd
2: systemctl start sshd
3: yum install postfix
4: systemctl enable postfix
5: systemctl start postfix
6: firewall-cmd --permanent --add-service=http
7: systemctl reload firewalld
After the above dependencies are installed, download gitlab:
Download address of centos 6 system:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6
Download address of centos 7 system:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7
Download the rpm package of the corresponding system
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6/gitlab-ce-8.0.0-ce.0.el6.x86_64.rpm
Install the rpm package
rpm -i gitlab-ce-8.0.0-ce.0.el6.x86_64.rpm
After the installation is complete
vim /etc/gitlab/gitlab.rb
Modify the gitlab configuration file, access IP: port, if you do not modify the default port 80, after entering the file, find
external_url #This variable
Modify the external_url variable
external_url 'http://ip:port'
Exit and save after modification
esc + wq
Need to update and modify after saving
gitlab-ctl reconfigure
Restart gitlab
gitlab-ctl restart #Reboot
gitlab-ctl stop #stop
gitlab-ctl start #start up
gitlab-ctl status #Check status
Enter the one you defined in the /etc/gitlab/gitlab.rb file
external_The ip followed by the url can be accessed
This page will appear after the configuration is successful, the default account: root, password; password, if it is not right, please modify it yourself.
Modify gitlab administrator account password
gitlab-rails console production
# Will appear after pressing enter
Loading production environment(Rails 4.1.1)
# Enter sequentially
irb(main):001:0> user = User.where(id:1).first
irb(main):002:0> user.password='66668888' #root password
irb(main):003:0> user.save!
# return
true #Indicates successful modification
Ctrl+C can exit
After arriving here, gitlab is configured and ready to use. All the above methods, pro-test, all effective.
# Modify gitlab IP address
vim /etc/gitlab/gitlab.rb
external_url 'ip address'
Configuration complete
Reset command: gitlab-ctl reconfigure
Restart command: gitlab-ctl restart
Recommended Posts