1. 程式人生 > >Jenkins與gitlib實現自動化部署

Jenkins與gitlib實現自動化部署

QQ 服務 yum cal install log 垃圾 then 3.6

1、配置gitlab的步驟

hostnamectl set-hostname gitlib-server
yum install jdk-8u111-linux-x64.rpm 
rpm -ivh gitlab-ce-8.13.5-ce.0.el7.x86_64.rpm 
vim /etc/gitlab/gitlab.rb
    external_url ‘http://192.168.43.61‘
    gitlab_rails[‘smtp_enable‘] = true 
    gitlab_rails[‘smtp_address‘] = "smtp.qq.com"
    gitlab_rails[‘smtp_port‘] = 25 
    gitlab_rails[‘smtp_user_name‘] = "[email protected]"
    gitlab_rails[‘smtp_password‘] = "gnjvecpnnmcvfibc"  qq郵箱開通smtp服務時設置的密碼
    gitlab_rails[‘smtp_domain‘] = "qq.com" 
    gitlab_rails[‘smtp_authentication‘] = :login 
    gitlab_rails[‘smtp_enable_starttls_auto‘] = true
    gitlab_rails[‘gitlab_email_from‘] = "[email protected]"
    user[‘git_user_email‘] = "[email protected]"
qq郵箱的設置:
    1、在設置-->賬戶中將smtp郵件服務開啟
    2、設置-->反垃圾-->設置郵件地址白名單,將[email protected]添加到白名單
gitlab-ctl --help
gitlab-ctl reconfigure  重讀配置文件
http://172.18.62.61/        訪問頁面,設置密碼後以root登錄,如下頁面
![](http://i2.51cto.com/images/blog/201806/22/7aafca20f007f942004e7eb69cb3e47a.png?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)

Jenkins與gitlib實現自動化部署