centos 7 部署gitlab

1、 更新yum源

curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
完毕!
Generating yum cache for gitlab_gitlab-ce...
导入 GPG key 0xE15E78F4:
 用户ID     : "GitLab B.V. (package repository signing key) <packages@gitlab.com>"
 指纹       : 1a4c 919d b987 d435 9396 38b9 1421 9a96 e15e 78f4
 来自       : https://packages.gitlab.com/gitlab/gitlab-ce/gpgkey
Generating yum cache for gitlab_gitlab-ce-source...

The repository is setup! You can now install packages.
[root@zouxuan ~]# yum search gitlab
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
===================================================================== N/S matched: gitlab =====================================================================
gitlab-ce.x86_64 : GitLab Community Edition (including NGINX, Postgres, Redis)

2、安装gitlab

yum install gitlab-ce.x86_64

3、 配置gitlab

gitlab默认端口为8080,但是可能被占用,nginx一般占用80,nuicorn默认为8080,查看端口是否被占用。

指令:netstat -npl

修改gitlab默认端口

vi /etc/gitlab/gitlab.rb

修改:

nginx['listen_port'] = 8070

unicorn['port'] = 8090

修改gitlab nginx web服务器的监听端口

vi /var/opt/gitlab/nginx/conf/gitlab-http.conf

修改:

4、重新加载配置 

 gitlab-ctl reconfigure

5、启动服务

gitlab-ctl start
ok: run: alertmanager: (pid 60088) 0s
ok: run: gitaly: (pid 60097) 0s
ok: run: gitlab-exporter: (pid 60116) 0s
ok: run: gitlab-workhorse: (pid 60118) 1s
ok: run: grafana: (pid 60128) 1s
ok: run: logrotate: (pid 60138) 0s
ok: run: nginx: (pid 60146) 1s
ok: run: node-exporter: (pid 60152) 0s
ok: run: postgres-exporter: (pid 60160) 1s
ok: run: postgresql: (pid 60171) 1s
ok: run: prometheus: (pid 60181) 0s
ok: run: redis: (pid 60188) 0s
ok: run: redis-exporter: (pid 60201) 0s
ok: run: sidekiq: (pid 60330) 0s
ok: run: unicorn: (pid 60345) 0s

6、配置clone地址

vi /opt/gitlab/embedded/service/gitlab-rails/config/gitlab.yml

修改:

7、访问gitlab

地址: 192.168.12.35:8070

账号root,密码自己设置

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
要在CentOS 7上部署GitLab CI持续集成,您可以按照以下步骤进行操作: 1. 安装GitLab的依赖项,包括curl、openssh-server、openssh-clients、postfix和policycoreutils。您可以使用以下命令进行安装: ``` yum install -y curl openssh-server openssh-clients postfix policycoreutils ``` 2. 下载GitLabyum源并进行安装。您可以使用以下命令下载并安装yum源: ``` curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash ``` 3. 安装GitLab CE: ``` yum install -y gitlab-ce ``` 4. 进行GitLab配置。这一步可能需要一些时间,请耐心等待: ``` gitlab-ctl reconfigure ``` 5. 安装GitLab插件。进入系统管理页面,点击"管理插件",并选择安装gitlab-plugin和gitlab hook-plugin。如果找不到这些插件,只需安装gitlabgitlab hook即可。 完成上述步骤后,您的CentOS 7系统就可以部署GitLab CI持续集成了。 <span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [Cento7部署基于Jenkins和Gitlab的持续集成与部署架构](https://blog.csdn.net/xixixilalalahaha/article/details/106546320)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* *3* [CentOS 7 部署Gitlab+Jenkins持续集成(CI)环境](https://blog.csdn.net/a790308/article/details/102258147)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值