Install GitLab and related environment configuration under Linux

Preface

GitLab is an open source application developed by Ruby on Rails, which implements a self-hosted Git project repository, which can access public or private projects through a web interface

 

installation steps

1. Install ssh

sudo yum install -y curl policycoreutils-pythonopenssh-server

2. Set the SSH service to start automatically after booting

sudo systemctl enable sshd

3. Start the SSH service

sudo systemctl start sshd

 4. Next, install Postfix to send notification emails

sudo yum install postfix

5. Start postfix

sudo systemctl start postfix

6. Add gitlab mirror

wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm

7. Install Pyhthon environment

yum install policycoreutils-python

8. Install gitlab 

rpm -i gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm

9. Modify the gitlab configuration file to specify the server ip and custom port

vim  /etc/gitlab/gitlab.rb

   In English input state, press i to enter insert mode, modify the following configuration 

external_url 'http://81.119.144.127:7666'

   Press esc to enter  : wq  save and exit

10. Reset and start GitLab

sudo gitlab-ctl reconfigure
sudo gitlab-ctl restart

image.png

11. Access

http://url:7666

In case of inaccessibility, firewall problems, the security group can configure the access port

Initial account: root Password: 5iveL!fe

Modify password (at least 8 characters) rootroot

Create user suiyun 12345678 (set permissions)

image.png

 

12. Extension

Turn off the registration mechanism

image.png

 

Guess you like

Origin blog.csdn.net/javanbme/article/details/113725080
Recommended