首页 > 编程知识 正文

linux gitlab安装,gitlab安装

时间:2023-05-06 07:13:32 阅读:239301 作者:4264

1、下载地址

https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/?C=N&O=A

2、安装

#使用yum命令安装会自动安装依赖,如果用rpm -ivh则要先安装依赖yum -y install gitlab-ce-13.12.0-ce.0.el7.x86_64.rpm

3、配置GitLab

vi /etc/gitlab/gitlab.rb   #这个地址安装成功后会提示,修改以下这行为自己的域名地址external_url 'http://gitlab.test.com' #记得配置域名映射gitlab-ctl reconfigure #每次修改完配置文件后应该执行此命令,用于重新加载配置,第一次很慢#执行完reconfigure命令后gitlab也启动起来了, gitlab-ctl status 可以查看状态

使用上面的域名访问,输入初始密码。

 用户名为:root

4、常用命令

systemctl start gitlab-runsvdirsystemctl stop gitlab-runsvdirsystemctl restart gitlab-runsvdirgitlab-ctl stopgitlab-ctl startgitlab-ctl restartgitlab-ctl status#以上命令针对的都是gitlab全家桶,如果只需要操作其中一个工具,后面接工具名称即可。如 gitlab-ctl start nginx

5、安装异常处理

5.1 gitlab-ctl reconfigure命令:ruby_block[authorize Grafana with GitLab] (monitoring::grafana line 101) had an error: Mixlib::ShellOut::CommandTimeout: Command timed out after 600s

 虚拟机内存不足导致的。加大虚拟机内存并重启后再次执行命令。

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。