安装 gitlab-ce 社区版
依赖
sudo apt-get install curl openssh-server ca-certificates postfix
添加gitlab包服务并安装
curl -sS http://packages.gitlab.com.cn/install/gitlab-ce/script.deb.sh | sudo bash sudo apt-get install gitlab-ce
配置并重启gitlab
sudo gitlab-ctl reconfigure
检查是否安装成功
sudo gitlab-ctl status
更改配置
1、sudo vim /etc/gitlab/gitlab.rb
1、external_url 'http://localhost'
2、smtp
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = “smtp.exmail.qq.com”
gitlab_rails['smtp_port'] = 25
gitlab_rails['smtp_user_name'] = “allen@cloudminds.com“
gitlab_rails['smtp_password'] = "smtp password"
gitlab_rails['smtp_authentication']= “plain"
gitlab_rails['smtp_enable_starttls_auto']= true
gitlab_rails['gitlab_email_from']= 'allen@cloudminds.com'
gitlab_rails['gitlab_email_reply_to']= ‘noreply@cloudminds.com'
3、unicorn['port']
2、sudo vim /var/opt/gitlab/gitlab-rails/etc/unicorn.rb
listen "127.0.0.1:8080" 改成你要的ip + port
sudo gitlab-ctl reconfigure
通过wget http://*.*.*.*:port测试访问。
查看日志
sudo gitlab-ctl tail
初始化账号密码
Username: root
Password: 5iveL!fe