gitlab安装

su-per-man su-per-man     2023-03-21     552

关键词:

GitLab的安装及使用教程
GitLab简介
GitLab,是一个利用 Ruby on Rails 开发的开源应用程序,实现一个自托管的Git项目仓库,可通过Web界面进行访问公开的或者私人项目安装。 
它拥有与GitHub类似的功能,能够浏览源代码,管理缺陷和注释。可以管理团队对仓库的访问,它非常易于浏览提交过的版本并提供一个文件历史库。 
团队成员可以利用内置的简单聊天程序(Wall)进行交流。它还提供一个代码片段收集功能可以轻松实现代码复用,便于日后有需要的时候进行查找。

安装
1.配置yum源

vim /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
2.更新本地yum缓存

yum makecache

技术图片

3.安装GitLab社区版

yum install gitlab-ce #自动安装最新版本

注:若需安装指定版本,则添加版本号即可,即yum install gitlab-ce-x.x.x

 技术图片

4.开启GitLab

gitlab-ctl start

GitLab常用命令

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

gitlab-ctl stop # 停止所有 gitlab 组件;

gitlab-ctl restart # 重启所有 gitlab 组件;

gitlab-ctl status # 查看服务状态;

gitlab-ctl reconfigure # 启动服务;(重新加载配置文件,在GitLab初次安装后可以使用,但是在业务环境中不可随意使用,reconfigure会把一些过去的config还原,导致修改的端口以及域名等都没有了。)

vim /etc/gitlab/gitlab.rb # 修改默认的配置文件;

gitlab-rake gitlab:check SANITIZE=true --trace # 检查gitlab;

sudo gitlab-ctl tail # 查看日志;

GitLab使用
1.登录GitLab

在浏览器的地址栏中输入服务器的公网IP即可显示GitLab的界面。首次登录会强制用户修改密码。密码修改成功后,输入用户名和密码进行登录。

注:若无法访问,则可以使用ps -ef命令查看服务是否正常启动,若未启动, 则重新开启,若仍然启动不了,则可使用gitlab-ctl reconfigure(仅限初始环境下使用)命令启动服务, 然后再访问GitLab。

技术图片

2.创建Project

登录成功后会出现如下页面:

 技术图片

3.修改域名

由于没有DNS服务器,无法进行域名解析,所以需要将域名修改为主机名,进入终端修改一下文件即可。

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

  ## GitLab settings

  gitlab:

    ## Web server settings (note: host is the FQDN, do not include http://)

    host: 10.0.0.210

    port: 8888

    https: false

技术图片

重启GitLab

gitlab-ctl restart

刷新GitLab页面查看是否修改成功

 

gitlab安装

 Gitlab安装指南  Gitlab安装教程参考:        https://doc.gitlab.cc/ce/administration/high_availability/README.html1、 下载gitlab包https://about.gitlab.com/ 查看详情

gitlab安装

centos7下安装gitlab1、首先按官网提示先安装依赖,然后执行下面命令添加yum源,选择gitlab-ce社区版curl-shttps://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh|sudobash2、更新本地yum缓存sudoyummakecache3、安装gitlab-cesudoyuminstall-ygi... 查看详情

gitlab的安装和配置

1使用omnibusgitlab来安装gitlab也就是说,将gitlab和它所需要的组件打一个包,即打一个bundle进行安装。第一步,安装gitlab的源。curlhttps://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh|sudobash将源改成镜像的源。apt-getupdate第... 查看详情

gitlab安装教程

gitlab安装教程  安装教程官网安装方法https://about.gitlab.com/downloads/#centos71.准备sudoyuminstallcurlpolicycoreutilsopenssh-serveropenssh-clientssudosystemctlenablesshdsudosystemctlstartsshdsudoyuminstall 查看详情

gitlab安装

GitLab的安装方式GitLab的两种安装方法:编译安装优点:可定制性强。数据库既可以选择MySQL,也可以选择PostgreSQL;服务器既可以选择Apache,也可以选择Nginx。缺点:国外的源不稳定,被墙时,依赖软件包难以下载。配置流程繁琐、复... 查看详情

gitlab安装(代码片段)

gitlab下载地址:http://mirrors.zju.edu.cn/gitlab-ce/yum/el6/#我下载的包为gitlab-ce-9.5.3-ce.0.el6.x86_64.rpm#gitlab安装:rpm–qa|grepgitlab#查看有没有安装过gitlab软件包.rpm–egitlab#删除原来安装的gitlab包rpm–ivhgitlab-ce-9.5.3-ce.0.el6 查看详情

centos7下安装gitlab

...rtpostfixsystemctlstatuspostfix.serviceYum安装使用这种方式安装的gitlab永远都是最新版的,也会比较慢curlhttps://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh|sudobashyum-yinstallgitlab-cerpm安装这里采用了 清华大学开源软件镜像站&... 查看详情

gitlab安装与配置(代码片段)

最近在学习gitlab并改善公司的代码托管和发布流程安装详细教程可以参考官网:https://about.gitlab.com/install/以下是我自己的安装流程#安装依赖yuminstall-ycurlpolicycoreutils-pythonopenssh-server#安装gitlabyum源(国外地址比较慢)curlhttps://packag... 查看详情

gitlab安装说明

GitLab,是一个使用RubyonRails开发的开源应用程序,与Github类似,能够浏览源代码,管理缺陷和注释,非常适合在团队内部使用。gitlab是基于RubyonRails的,安装和配置非常麻烦,不过有傻瓜安装包,https://about.gitlab.com/downloads/,或者... 查看详情

gitlab和git安装

**gitlab安装forcentos6.***添加yum源vim/etc/yum.repos.d/gitlab-ce.repo[gitlab-ce]name=gitlab-cebaseurl=http://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el6Enabled=1gpgcheck=0更新本地yum缓存yummakecache安装gitlab-c 查看详情

gitlab的安装

gitlab的安装一.安装依赖的安装包yuminstallcurlpolicycoreutilsopenssh-serveropenssh-clientssystemctlenablesshdsystemctlstartsshdyuminstallpostfixsystemctlenablepostfixsystemctlstartpostfixfirewall-cmd--permanent--a 查看详情

gitlab的安装和使用

gitlab的安装和使用(三)gitlab迁移从一台gitlab服务器迁移到另一台gitlab上((⊙o⊙)…为什么会有这样的需求,还好有办法)我用的是gitlab自身的back迁移(注意重要的事情说三遍:两边版本要一致两边版本要一致两边版本要一致)查看gitlab版... 查看详情

centos7安装gitlab

CentOS7安装GitLabCentOS7安装GitLabGitLab是一个利用RubyonRails开发的开源应用程序,实现一个自托管的Git项目仓库,可通过Web界面进行访问公开的或者私人项目.Gitlab中文网:https://www.gitlab.com.cn/Gitlab官网:https://about.gitlab.com/Gitlab官方文... 查看详情

gitlab介绍gitlab的工作流程gitlab安装配置环境ansible配合virtualenv安装配置(代码片段)

一、GitLab主要服务构成     二、GitLab的工作流程      三、Gitlab安装配置管理环境使用centos7的环境配置1.提前准备工作1.关闭防火墙systemctlstopfirewalld禁用防火墙开机启动systemctldisablefirewalld2.... 查看详情

centos安装gitlab

Centos安装gitlab安装gitlab在防火墙里开放http跟ssh端口yuminstall-ylokkityuminstallcurlopenssh-serveropenssh-clientspostfixcronie-yservicepostfixstart服务自启动设置chkconfigpostfixonlokkit-shttp-sssh添加gitlab仓库,并安装curl-sShttp://packages.gitlab.cc/install/gitlab-ce/s... 查看详情

gitlab安装手记

[[email protected]~]#rpm-igitlab-ce-7.10.4~omnibus-1.x86_64.rpmgitlab:ThankyouforinstallingGitLab!gitlab:ConfigureandstartGitLabbyrunningthefollowingcommand:gitlab:gitlab:sudogitlab-ctlreconfigur 查看详情

centos7安装gitlab

...官网提示先安装依赖,然后执行下面命令添加yum源,选择gitlab-ce社区版curl-shttps://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh|sudobash2、更新本地yum缓存sudoyummakecache3、安装gitlab-cesudoyuminstall-ygitlab-ce以上,即可安装完成... 查看详情

gitlab安装配置管理

◆安装Gitlab前系统预配置准备工作1.关闭firewalld防火墙#systemctlstopfirewalld#systemctldisablefirewalld2.关闭SELINUX并重启系统#:wqSELINUX=disabled#reboot#getenforce(查看策略是否被禁用)◆安装OmnibusGitlab-cepackage1.安装Gitlab组件#yum-yinstallcurlpolicycore... 查看详情