Five minutes to learn centos configuration gitlab

Download gitlab

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

Visit gitlab

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

Five minutes to learn centos configuration gitlab
Centos6 method steps to build gitlab
CentOS7.0 network configuration
CentOS7 basic configuration
CentOS 7 install Gitlab
Centos MySQL8 configuration
3 minutes to teach you to build gitea on Centos server
Linux (centos7) build gitlab
Xfs configuration on centos7
Centos 6.4 python 2.6 upgrade to 2.7
Centos kernel compilation configuration
CentOS6.5 upgrade kernel to 3.10.28
Mysql8.0.15 installation configuration (centos7)
CentOS 5 to CentOS 5.8 YUM source