1 换源:
# curl https://packages.gitlab.com/gpg.key 2> /dev/null | sudo apt-key add - &>/dev/null
# echo ‘deb https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu trusty main‘ >> /etc/apt/sources.list.d/gitlab-ce.list
# apt-get update
# apt-get install gitlab-ce
2 配置域名和邮箱
vi /etc/gitlab/gitlab.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
gitlab_rails[‘smtp_enable‘] = true gitlab_rails[‘smtp_address‘] = "smtp.qq.com" gitlab_rails[‘smtp_port‘] = 465 gitlab_rails[‘smtp_user_name‘] = "[email protected]" gitlab_rails[‘smtp_password‘] = "your_smtp_user_password" gitlab_rails[‘smtp_authentication‘] = "login" gitlab_rails[‘smtp_ssl‘] = true gitlab_rails[‘smtp_enable_starttls_auto‘] = true gitlab_rails[‘smtp_tls‘] = true # If your SMTP server does not like the default ‘From: [email protected]‘ you # can change the ‘From‘ with this setting. gitlab_rails[‘gitlab_email_from‘] = ‘[email protected]‘ gitlab_rails[‘gitlab_email_reply_to‘] = ‘[email protected]‘ |
3 修改服务器地址:
external_url ‘http://your_domain_or_ip.com‘ |
4 之后执行 gitlab-ctl reconfigure 生效配置
5 打开external_url 的地址,修改密码后即可访问,默认root
原文地址:https://www.cnblogs.com/legend-song/p/8286780.html