GitLab社区版安装及配置

CentOS7上安装GitLab社区版的教程

主要参照以下官网内容:https://about.gitlab.com/installation/#centos-7


1. Install and configure the necessary dependencies

On CentOS 7 (and RedHat/Oracle/Scientific Linux 7), the commands below will also open HTTP and SSH access in the system firewall.
sudo yum install -y curl policycoreutils-python openssh-server 
sudo systemctl enable sshd 
sudo systemctl start sshd 
sudo firewall-cmd --permanent --add-service=http 
sudo systemctl reload firewalld 

During Postfix installation a configuration screen may appear. Select 'Internet Site' and press enter. Use your server's external DNS for 'mail name' and press enter. If additional screens appear, continue to press enter to accept the defaults.

2. Add the GitLab package repository and install the package

Add the GitLab package repository.

curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash 

Next, install the GitLab package. Change `http://gitlab.example.com` to the URL at which you want to access your GitLab instance. Installation will automatically configure and start GitLab at that URL. HTTPS requires additional configuration after installation.

sudo EXTERNAL_URL="http://gitlab.example.com" yum install -y gitlab-ee

3. Browse to the hostname and login

On your first visit, you'll be redirected to a password reset screen. Provide the password for the initial administrator account and you will be redirected back to the login screen. Use the default account's username root to login.

See our documentation for detailed instructions on installing and configuration.

4. Set up your communication preferences

Visit our email subscription preference center to let us know when to communicate with you. We have an explicit email opt-in policy so you have complete control over what and how often we send you emails.

Twice a month, we send out the GitLab news you need to know, including new features, integrations, docs, and behind the scenes stories from our dev teams. For critical security updates related to bugs and system performance, sign up for our dedicated security newsletter.

IMPORTANT NOTE: If you do not opt-in to the security newsletter, you will not receive security alerts.

当出现502错误的时候,通过以下办法解决:

1.可能是因为8080端口已经被暂用,修改GitLab的默认端口。(/etc/gitlab/gitlab.rb)

2.重启CentOS,通过以下命令重新配置GitLab

sudo gitlab-ctl reconfigure

猜你喜欢

转载自blog.csdn.net/jimmyyutian/article/details/80287241