git和svn,gitlab git 安裝

 2023-11-19 阅读 25 评论 0

摘要:1.配置yum源 git和svn。vim /etc/yum.repos.d/gitlab-ce.repo [gitlab-ce] name=Gitlab CE Repository baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/ gpgcheck=0 enabled=1 2.更新本地yum 緩存 開源git,yum makecache 3.安裝gitlab yum

1.配置yum源

git和svn。vim /etc/yum.repos.d/gitlab-ce.repo

[gitlab-ce]
name=Gitlab CE Repository
baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/
gpgcheck=0
enabled=1

2.更新本地yum 緩存

開源git,yum makecache

3.安裝gitlab

yum install gitlab-ce

4.啟動 gitlab

gitlab-ctl reconfigure

?

5.訪問?

http://192.168.64.128

?

6.常用命令

gitlab-ctl start    # 啟動所有 gitlab 組件;
gitlab-ctl stop        # 停止所有 gitlab 組件;
gitlab-ctl restart        # 重啟所有 gitlab 組件;
gitlab-ctl status        # 查看服務狀態;
gitlab-ctl reconfigure        # 啟動服務;
vi /etc/gitlab/gitlab.rb        # 修改默認的配置文件;
gitlab-rake gitlab:check SANITIZE=true --trace    # 檢查gitlab;
gitlab-ctl tail        # 查看日志;

  

?7.gitlab默認使用的80端口,占用了nginx的默認端口,我們修改下gitlab的端口

vi /etc/gitlab/gitlab.rb

修改?external_url 訪問地址

external_url 'http://192.168.5.256'

?修改監聽端口 80 改為 9091

nginx['listen_port'] = 9091

修改監聽端口 8080 改為9092

unicorn['port'] = 9092

讓配置生效

gitlab-ctl reconfigure

  

重啟gitlab

gitlab-ctl restart

?訪問

curl http://localhost:9091

 日志,可能一次配置并不會成功,需要查看日志。

gitlab-ctl tail unicorn

  

 

?

轉載于:https://www.cnblogs.com/yun965861480/p/9416079.html

版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。

原文链接:https://hbdhgg.com/4/181384.html

发表评论:

本站为非赢利网站,部分文章来源或改编自互联网及其他公众平台,主要目的在于分享信息,版权归原作者所有,内容仅供读者参考,如有侵权请联系我们删除!

Copyright © 2022 匯編語言學習筆記 Inc. 保留所有权利。

底部版权信息