CentOS 7 安装版本管理 GitLab

    xiaoxiao2022-07-02  106

    一、找到Gitlab -ce的安装页面(默认ee收费)

    gitlab官网:https://about.gitlab.com/install

    也可以直接跳转gitlab安装ce页面:(推荐使用)

    https://about.gitlab.com/install/#centos-7?version=ce

    二、Gitlab-ce安装流程

    1. 安装并配置gitlab必要的依赖项2. 添加GitLab软件包存储库3. 将加GitLab软件仓库更新改为清华大学开源软件镜像站4. 安装Gitlab软件5. 设置external_url(web访问地址)6. 重新加载Gitlab配置,并启动Gitlab7. 浏览器访问Gitlab8. 重新设置密码,用root用户登录
    1. 安装并配置gitlab必要的依赖项 sudo yum install -y curl policycoreutils-python openssh-server openssh-clients sudo systemctl enable sshd sudo systemctl start sshd sudo firewall-cmd --permanent --add-service=http sudo systemctl reload firewalld sudo yum install postfix sudo systemctl enable postfix sudo systemctl start postfix 2. 添加GitLab软件包存储库 curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash 3. 将加GitLab软件仓库更新改为清华大学开源软件镜像站 添加 清华大学开源软件镜像站中的仓库新建或者编辑/etc/yum.repos.d/gitlab-ce.repo,内容为 [gitlab-ce] name=Gitlab CE Repository baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever/ gpgcheck=0 enabled=1 4. 安装Gitlab软件 sudo yum makecache sudo yum install gitlab-ce

    5. 设置external_url(web访问地址) 编辑/etc/gitlab/gitlab.rb,设置external_url 编辑/etc/gitlab/gitlab.rb,设置external_url vim /etc/gitlab/gitlab.rb

    默认: 修改后:

    注:建议使用external_url ‘服务器ip’6. 重新加载Gitlab配置,并启动Gitlab 重新加载Gitlab配置,并启动服务 sudo gitlab-ctl reconfigure 7. 浏览器访问Gitlab 格式:IP+端口号(默认8080) 8. 重新设置密码,用root用户登录 在您第一次访问时,您将被重定向到密码重置屏幕。提供初始管理员帐户的密码,您将被重定向回登录屏幕。使用默认帐户的用户名root登录。

    gitlab常用命令:

    命令功能执行命令重启配置,并启动gitlab服务sudo gitlab-ctl reconfigure启动所有 gitlabsudo gitlab-ctl start重新启动GitLabsudo gitlab-ctl restart停止所有 gitlabsudo gitlab-ctl stop查看服务状态sudo gitlab-ctl status查看Gitlab日志sudo gitlab-ctl tail修改默认的配置文件sudo vim /etc/gitlab/gitlab.rb检查gitlabgitlab-rake gitlab:check SANITIZE=true --trace

    想学习更多微服务、分布式、中间件、数据库、项目快速构建等系列技术 请访问Gblfy主页:https://blog.csdn.net/weixin_40816738 让我们一起进步!!!

    最新回复(0)