gitlab安装(centos 8)


1、安装依赖:sudo dnf install policycoreutils openssh-server postfix
2、下载gitlab:wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el8/gitlab-ce-13.1.1-ce.0.el8.x86_64.rpm
其它版本可通过以下链接查找下载:
Gitlab官网:https://packages.gitlab.com/gitlab/gitlab-ce/
清华大学镜像:https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el8/
3、安装gitlab:rpm -i gitlab-ce-13.1.1-ce.0.el8.x86_64.rpm

4、修改配置:

注:对应的端口需授权开放,参考https://www.cnblogs.com/54hsh/p/13355413.html

vim /etc/gitlab/gitlab.rb
unicorn['port'] = 对应的端口
external_url "http://ip或者域名:port"

5、编译配置:gitlab-ctl reconfigure
6、启动Gilab:gitlab-ctl start

/** 常用命令 **/
#启动所有 gitlab 组件:gitlab-ctl start
#停止所有 gitlab 组件:gitlab-ctl stop
#重启所有 gitlab 组件:gitlab-ctl restart

#修改 gitlab 配置:vim /etc/gitlab/gitlab.rb
#编译 gitlab 配置:gitlab-ctl reconfigure

#查看日志:gitlab-ctl tail
#查看状态:gitlab-ctl status
#检查gitlab:gitlab-rake gitlab:check SANITIZE=true --trace
#查看版本:cat /opt/gitlab/embedded/service/gitlab-rails/VERSION

posted @ 2021-03-25 17:38  聚散彡流沙  阅读(199)  评论(0编辑  收藏  举报