gitlab安装配置

参考:

https://www.unixhot.com/article/48

原则:简单维护为准,故yum安装gitlab

1,gitlab安装

2,gitlab邮箱配置

1,gitlab安装

yum install curl policycoreutils openssh-server openssh-clients postfix

systemctl start postfix

配置清华大学的源

cat > /etc/yum.repos.d/gitlab-ce.repo << EOF

[gitlab-ce]

name=gitlab-ce

baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/

repo_gpgcheck=0

gpgcheck=0

enabled=1

gpgkey=https://packages.gitlab.com/gpg.key

EOF

cat /etc/yum.repos.d/gitlab-ce.repo

安装gitlab

yum clean all && yum makecache

yum install gitlab-ce

gitlab-ctl reconfigure #首次启动初始化

管理维护

gitlab-ctl stop

gitlab-ctl sart

gitlab-ctl restart

访问: http://IP

2,设置gitlab邮箱,域名等

参考:

https://ruby-china.org/topics/20450

http://blog.haohtml.com/archives/17059 含腾讯企业邮

https://yxnt.github.io/2015/12/15/gitlab-mail/

http://www.zrick.net/2015/04/08/1428493100/ 重度参考

复制邮箱配置文件:

find / -name smtp_settings.rb.sample

cp /opt/gitlab/embedded/service/gitlab-rails/config/initializers/smtp_settings.rb.sample \ /opt/gitlab/embedded/service/gitlab-rails/config/initializers/smtp_settings.rb

cat /opt/gitlab/embedded/service/gitlab-rails/config/initializers/smtp_settings.rb

address: "smtp.sina.com",

port: 25,

user_name: "test@sina.com",

password: "test",

domain: "sina.com",

authentication: :login,

enable_starttls_auto: false,

#openssl_verify_mode: 'peer' # See ActionMailer documentation for other possible options

设置邮箱信息

vim /var/opt/gitlab/gitlab-rails/etc/gitlab.yml

13 host: node2.ma.com

41 email_from: lannymxl@sina.com

42 email_display_name: GitLab CE

登录

root登录,修改这个邮箱,试试收到的邮件链接.

如果不设置,gitlab设置个人信息时候发的邮件让你确认,确认链接是gitlab.example.com很是蛋疼.而且比较恶心的是新建的项目

配置主配置文件域名:

vim /var/opt/gitlab/gitlab-rails/etc/gitlab.yml

13 host: node2.ma.com

35 time_zone: Asia/Shanghai

改完重启下:

gitlab-ctl restart

后期运维还需要考虑git仓库数据迁移备份等,后面再说吧.

测试:

gitlab web界面新建个仓库,并初始化个readme.md文件.

找台git客户端, 做个ssh-key互信.

git pull --- git add -- git commit -- git push origin 测测是否能正常拉取.

怎么访问起来巨慢捏, 我给了个gitlab server 2G的内存.

我用的版本是

9.0吧.

最新文章

  1. hadoop的学习
  2. .NET (上传的)文件下载
  3. CSS绝对定位的应用
  4. html/css基础篇——关于浏览器window、document、html、body高度的探究
  5. C语言 homework(4)
  6. dedecms获取栏目下的频道列表
  7. NDK开发之调用方法
  8. ECSHOP中ajax的调用原理
  9. IDEA 初始配置教程
  10. R画网络图
  11. JQuery 常用的那些东西
  12. Ubuntu本地文件上传至HDFS文件系统出现的乱码问题及解决方案
  13. java生成word
  14. Java的基础知识三
  15. TDG今日成立!
  16. node-sass 安装失败 Failed at the node-sass@4.9.2 postinstall script的解决
  17. iOS埋点统计
  18. GoLang之strings、buffers、bytes、binary包
  19. python scrapy解码方法和时间格式转换
  20. WLAN 802.11 a/b/g PHY Specification and EDVT Measurement III

热门文章

  1. 7、Django实战第7天:用form实现登录
  2. 【DFS】Codeforces Round #398 (Div. 2) C. Garland
  3. EF需要注意的virtual,懒加载,还有1对n更新
  4. 使用openssl生成密钥、加密和签名
  5. SpringMVC——redirect重定向跳转传值
  6. powerbuilder webbrowser 内嵌浏览器 select下拉框无法使用
  7. Linux FTP配置
  8. Key-Value Observing (键值监測)
  9. 手写一个死锁Demo
  10. Kubernetes概念介绍和v1版本部署过程