1. Install and configure the necessary dependencies sudo yum install curl policycoreutils openssh-server openssh-clients sudo systemctl enable sshd su
1. Install and configure the necessary dependencies
sudo yum install curl policycoreutils openssh-server openssh-clients sudo systemctl enable sshd sudo systemctl start sshd sudo yum install postfix sudo systemctl enable postfix sudo systemctl start postfix sudo firewall-cmd --permanent --add-service=http sudo systemctl reload firewalld
2. Add the GitLab package server and install the package
通過下麵鏈接下載『gitlab-ce-8.5.1-ce.0.el7.x86_64.rpm』:
http://pan.baidu.com/s/1qXeuiNq
有想法的同學可以下載『https://packages.gitlab.com/gitlab/gitlab-ce/』自己想要的版本
下載完成之後當然是安裝了:sudo rpm -i gitlab-ce-8.5.1-ce.0.el7.x86_64.rpm
3. Configure and start GitLab
sudo gitlab-ctl reconfigure
4. Browse to the hostname and login
Username:root
Password:5iveL!fe
通過瀏覽器訪問:http://localhost 或者 http://ip
登錄成功,首次登錄需修改密碼
配置:
sudo mkdir -p /etc/gitlab
sudo touch /etc/gitlab/gitlab.rb
sudo chmod 600 /etc/gitlab/gitlab.rb
Configuring the external URL for GitLab:
向:/etc/gitlab/gitlab.rb 文件中添加:
external_url "http://gitlab.example.com"
更改配置後,執行如下命令(載入配置生效):
sudo gitlab-ctl reconfigure
服務打開、關閉、重啟:
# Start all GitLab components
sudo gitlab-ctl start
# Stop all GitLab components
sudo gitlab-ctl stop
# Restart all GitLab components
sudo gitlab-ctl restart