看了下上次发学习的记录的日期是 8 月 22 日, 今天 11 月 25 日. 一转眼 3 个月时间过去了. 本应该 7 月底结束的学习, 拖了 4 个月.
自学 需要坚持, 三天打鱼, 两天晒网的, 会让自己对自己失去信心.
以下为 8 月 23 日左右记录的, 没有发布. 今日整理大概记录下.
首先需要找到符合自己系统版本的 rpm 安装包, 地址如下.
https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/
找到后复制下载链接.
- wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-12.1.6-ce.0.el7.x86_64.rpm
- # 升级所有包
- yum update
- # 用于 SSH 远程 (非必须)
- yum install openssh
- #selinux 设置为 disabled
- VIM /etc/selinux/config selinux=disabled
- yum install curl policycoreutils openssh-server openssh-clients postfix
- systemctl start postfix
- # 在编辑器中输入如下内容保存
- VIM /etc/yum.repos.d/GitLab-ce.repo
- [GitLab-ce]
- name=GitLab-ce
- baseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7
- repo_gpgcheck=0
- gpgcheck=0
- enabled=1
- gpgkey=https://packages.gitlab.com/gpg.key
- yum clean all
- yum makecache
- # 安装 GitHub
- yum install GitLab-ce
- # ip 端口自己定义 也可以是域名.
- VIM /etc/GitLab/GitLab.rb
- external_url 'http://git.example.com'
修改为
- external_url 'http://192.168.2.200:8060'
- # 执行以下命令. 使配置生效.
- GitLab-ctl reconfigure
- # 重启服务
- GitLab-ctl start
安装完成后 访问 http://192.168.2.200:8060 502 错误
netstat -ntpl
kill -9 端口号
VIM /etc/GitLab/GitLab.rb
添加行:
- Unicorn['port'] = 8061
- GitLab-ctl reconfigure
常用的命令:
启动服务: GitLab-ctl start
查看状态: GitLab-ctl status
停掉服务: GitLab-ctl stop
重启服务: GitLab-ctl restart
让配置生效: GitLab-ctl reconfigure
来源: http://www.bubuko.com/infodetail-3303172.html