1. Install the VMwart vm first. Use centos-7-x86_64-DVD or other centos-7
Vm 15 installation package and cracking toolPan.baidu.com/s/1-LPfHif8…
Password: QQQQ
2. Install base dependencies
sudo yum install -y curl policycoreutils-python openssh-server
3. Enable the SSH service & Set it to boot upon startup
sudo systemctl enable sshd
sudo systemctl start sshd
Copy the code
PostfixPostfix is a mail server that GitLab uses to send mail
Postfix sudo yum install postfix sudo yum install postfix sudo yum install postfix sudo yum install postfix sudo yum install postfix sudo yum install postfix sudo yum install postfix // There was an error when opening the mail service. The cause was not found, but it did not affect anything. You can go to the next stepCopy the code
5. Enable SSH and HTTP services (port 80).
Sudo firewall-cmd --add-service= SSH --permanent sudo firewall-cmd --add-service= HTTP --permanent Sudo firewall-cmd --reloadCopy the code
6. Deployment process: Community version: Gitlab-CE is deployed. If necessary, please replace it by yourself
//Yum install GitLab, Add GitLab community edition Package curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash Sudo yum install -y gitlab-ce sudo yum install -y gitlab-ceCopy the code
7. Configure the GitLab site UrlGitLab. The default configuration file path is /etc/gitlab/gitlab.rb
The default site Url configuration items are: External_url 'http://gitlab.example.com' can use IP add command to check how much is your current IP, and then replace gitlab.example.com with your current found out the IP address The modification process: 1. Enter vi /etc/gitlab/gitlab.rb 2. Find: external_url 'http://gitlab.example.com' 3. Press I to change to your own IP address, such as external_url 'http://127.0.0.1' 4. Press ESC, shift+:, and enter wq to save and exit. Sudo gitlab-ctl reconfigure <! Running Handlers complete Chef Client finished 432/613 resources updated in 03 minutes 43 seconds gitlab Reconfigured!Copy the code
8. Go to the GitLab page
2. When entering the page, enter your account and password, usually your Linux account and passwordCopy the code
9. Configure the mailbox
Vi /etc/gitlab/gitlab.rb add the following to /etc/gitlab.rb Gitlab_rails ['smtp_enable'] = true gitlab_rails['smtp_address'] = "smtp.qq.com" gitlab_rails['smtp_port'] = 465 Gitlab_rails [' smtp_user_name] = "* * * @ qq.com" gitlab_rails [' smtp_password] = "* * * / / qq" authorization code, Gitlab_rails ['smtp_domain'] = "smtp.qq.com" gitlab_rails['smtp_authentication'] = "login" gitlab_rails['smtp_enable_starttls_auto'] = true gitlab_rails['smtp_tls'] = true gitlab_rails['gitlab_email_from'] = Gitlab_rails ['gitlab_email_enabled'] = true Restart gitlab-ctl reconfigure debug console Test_email ('***@qq.com', 'test ',' this is a test. Brother '). Deliver_now exit() exits the consoleCopy the code