linux系统contos7安装gitlab

204 阅读1分钟

访问gitlab下载地址

mirrors.tuna.tsinghua.edu.cn/gitlab-ce/y…

image.png

下载到opt目录

image.png

升级python

yum install -y curl policycoreutils-python openssh-server

image.png

使用命令默认安装

 

rpm -ivh

/opt/gitlab-ce-15.4.5-ce.0.el7.x86_64.rpm

image.png

打开配置文件/etc/gitlab/gitlab.rb

image.png

修改如下配置

32 行 external_url 'http://192.168.31.191:8080'

68 行 gitlab_rails['time_zone'] = 'Asia/Shanghai'

629 行

git_data_dirs({ "default" => { "path" => "/var/opt/gitlab/git-data" }, //默认存储目录 "alternative" => { "path" => " /home/gitlab-data" } //备用存储目录 })

978 行 最大并发量 sidekiq['max_concurrency'] = 20

1045 行 postgresql['shared_buffers'] = "128MB"

1129 行 最大工作进程 postgresql['max_worker_processes'] = 4

1332 行 端口 nginx['listen_port'] = 8080

1932 行 关闭监控 prometheus_monitoring['enable'] = false


gitlab-ctl reconfigure (生效配置)

gitlab-ctl start # 启动所有GitLab组件

gitlab-ctl restart(重启)

gitlab-ctl tail

image.png

打开防火墙端口

sudo firewall-cmd --zone=public --add-port=8080/tcp --permanent

sudo firewall-cmd --reload


出现如下

image.png

更换端口8081,重新加载配置,重启gitlab

image.png