https://about.gitlab.com/installation/#centos-7
1. Install and configure the necessary dependencies
On CentOS, 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 <button aria-label="Copy to clipboard" class="btn copy-btn js-copy-btn" data-clipboard-text="" sudo="" external_url=""http://gitlab.example.com"" yum="" install="" -y="" gitlab-ee"="" data-placement="top" data-toggle="tooltip" title="" type="button" data-original-title="Copy to clipboard" style="color: rgb(107, 79, 187); font-style: inherit; font-variant: inherit; font-stretch: inherit; font-size: 14px; line-height: 1.42857; font-family: inherit; margin: 5px; overflow: visible; cursor: pointer; vertical-align: middle; touch-action: manipulation; background-image: none; border-width: 1px; border-style: solid; border-color: transparent; white-space: nowrap; padding: 5px; border-radius: 4px; user-select: none;">
sudo yum install gitlab-ce(用这个)
Configure and start GitLab:
sudo gitlab-ctl reconfigure
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.
修改http端口
gitlab默认是80端口,修改下面3个文件,可以很容易看到端口修改的地方
vi /opt/gitlab/embedded/conf/nginx.conf
vi /var/opt/gitlab/gitlab-rails/etc/gitlab.yml
vi /var/opt/gitlab/nginx/conf/gitlab-http.conf
重启服务
gitlab-ctl restart
虚拟机安装Gitlab后出现“Whoops, GitLab is taking too much time to respond.” ->>>>加大内存。