码迷,mamicode.com
首页 > 其他好文 > 详细

centos 7部署gitlab

时间:2020-02-08 14:09:47      阅读:62      评论:0      收藏:0      [点我收藏+]

标签:首页   cli   dep   https   开启   code   51cto   client   class   

 

安装依赖

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

centos 7部署gitlab

标签:首页   cli   dep   https   开启   code   51cto   client   class   

原文地址:https://www.cnblogs.com/2186009311CFF/p/12276020.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!