1.官网安装实例地址。https://www.gitlab.cc/downloads/#centos6
2.添加gitlab仓库,并安装到服务器上
curl -sS http://packages.gitlab.cc/install/gitlab-ce/script.rpm.sh | sudo bash
sudo yum install gitlab-ce
3.启动gitlab
sudo gitlab-ctl reconfigure
4.访问
直接访问ip地址即可。首次访问GitLab,系统会让你重新设置管理员的密码,设置成功后会返回登录界面.从新设置后密码后,然后再让你设置用户名。这个顺序有点反。
5.配置发送邮件
配置文件位置为:/etc/gitlab/gitlab.rb
修改内容如下:
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.qq.com"
gitlab_rails['smtp_port'] = 25
gitlab_rails['smtp_user_name'] = "xxxxx@qq.com"
gitlab_rails['smtp_password'] = "xxxxxx"
gitlab_rails['smtp_domain'] = "smtp.qq.com"
gitlab_rails['smtp_authentication'] = :plain
gitlab_rails['smtp_enable_starttls_auto'] = true
##下面的貌似需要到腾讯服务上开通
gitlab_rails['gitlab_email_from'] = "xxxxx@qq.com"
user["git_user_email"] = "xxxxx@qq.com"
6.使配置生效
sudo gitlab-ctl reconfigure
7.重启
sudo gitlab-ctl restart
8.查看git的log
sudo gitlab-ctl tail