Home >Operation and Maintenance >CentOS >How to set up Gitlab server in CentOS7
The following tutorial column of centos system introduction will introduce to you how to build a Gitlab server in CentOS7. I hope it will be helpful to friends in need!
CentOS7 to build Gitlab server
CentOSInstall the necessary Dependencies
Step 1: Install ssh
yum install -y curl policycoreutils-pythonopenssh-server
sudo systemctl enable sshd sudo systemctl start sshdStep 3: Install and start the firewall (if installed and started, you can skip this step);
yum install firewalld systemd -y service firewalld startStep 4: Add the http service to firewalld (--permanent means permanent);
firewall-cmd --permanent --add-service=http
systemctl reload firewalldStep 6: Set the postfix service to start automatically at boot and start postfix;
systemctl enable postfix systemctl start postfixStep 7: Check whether wget has been installed in the system (if not, use yum to install wget);
wget -V --检查wget版本 yum -y install wget --yum安装wgetCentOS installation necessary dependenciesThe first step: wget download gitlab (community version);
wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-11.2.1-ce.0.el7.x86_64.rpm
rpm -i gitlab-ce-11.2.1-ce.0.el7.x86_64.rpmIf the following error occurs, you need to install policycoreutils-python;
yum -y install policycoreutils-python
vi /etc/gitlab/gitlab.rbModify the URL: external_url 'http://192.168.2.121:8081'
firewall-cmd --zone=public --add-port=8081/tcp --permanentReload firewall list:
firewall-cmd --reload
The above is the detailed content of How to set up Gitlab server in CentOS7. For more information, please follow other related articles on the PHP Chinese website!