# 参考官网
# 1. Install and configure the necessary dependencies
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo yum clean all
sudo yum makecache
sudo yum install -y postfix curl policycoreutils-python openssh-server
sudo systemctl enable sshd
sudo systemctl start sshd
# sudo firewall-cmd --permanent --add-service=http
# sudo systemctl reload firewalld
sudo systemctl disable firewalld
sudo systemctl stop firewalld
# Next, install Postfix to send notification emails. If you want to use another solution to send emails please skip this step and configure an external SMTP server after GitLab has been installed.
sudo systemctl enable postfix
sudo systemctl start postfix
# 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 -s 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.
vi /etc/gitlab/gitlab.rb
标签:sudo,gitlab,systemctl,yum,install,安装,GitLab
From: https://www.cnblogs.com/dengliang356a/p/17740799.html