centos 7部署gitlab

南笙酒味 提交于 2020-02-08 13:42:49

 

安装依赖

yum -y install policycoreutils openssh-server openssh-clients postfix

设置postfix开启自启并启动,postfix支持发信功能

systemctl enable postfix && systemctl start postfix

下载gitlab安装包,然后安装

wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-11.2.0-ce.0.el7.x86_64.rpm

rpm -i gitlab-ce-11.2.0-ce.0.el7.x86_64.rpm

报以下错:

warning: gitlab-ce-11.2.0-ce.0.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID f27eab47: NOKEY
error: Failed dependencies:
        policycoreutils-python is needed by gitlab-ce-11.2.0-ce.0.el7.x86_64

解决办法:

yum install -y policycoreutils-python

再安装

rpm -i gitlab-ce-11.2.0-ce.0.el7.x86_64.rpm

配置gitlab配置文件,指定服务器ip和端口

sudo vi /etc/gitlab/gitlab.rb

 

#配置首页地址(大约在第10行)
external_url 'http://ip:端口'

 

 

重新加载配置并重启

gitlab-ctl reconfigure #等待一会
gitlab-ctl restart

 

查看端口占用情况

netstat -tunlp | grep "8081"

浏览器输入http://ip:端口,首次登陆请用root,设置密码

 

参考链接: https://my.oschina.net/u/3962987/blog/3063213

     https://www.cnblogs.com/yybrhr/p/9988835.html

     https://blog.51cto.com/andyxu/2427190

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!