CentOS系统,会添加gitlab的yum //输出到文件里是为了看下下载的脚本内容 curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee /rpm.sh 安装gitlab //使用yum安装gitlab yum install -y gitlab-ee //可以看下gitlab-ee包的内容,看到gitlab安装在/opt/gitlab目录下 rpm -ql gitlab-ee | less 填写配置项 1,vim /etc/gitlab/gitlab.rb 修改external_url为自己对外的url; 2,使用sudo gitlab-ctl
六、Gitlab Server 部署 1、环境准备 1.系统版本:CentOS7.4 2.Gitlab版本:gitlab-ee 11.0.1 3.初始化系统环境 4.关闭防火墙 [root@localhost mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever/ gpgcheck=0 enabled=1 # vim gitlab-ee.repo [gitlab-ee ] name=Gitlab EE Repository baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ee/yum/el$releasever/ ca-bundle.crt metadata_expire=300 (3) 添加官方源 curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee .安装包下载 https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/ https://mirrors.tuna.tsinghua.edu.cn/gitlab-ee
1、根据GitLab官网提供的步骤一步一步执行命令即可,https://www.gitlab.com.cn/installation/#centos-7 2、上图中红框部分是指定的gitlab-ee的版本 ,GitLab有两个版本:gitlab-ce和gitlab-ee,分别是社区版和企业版,企业版是收费的,社区版是开源的,通常我们安装社区版就可以,所以此处需要将gitlab-ee修改为gitlab-ce 4、安装完成后修改/etc/gitlab/gitlab.rb文件进行域名绑定 5、重新配置GitLab使之生效 gitlab-ctl reconfigure 6、如果您之前根据官方的命令不小心安装了gitlab-ee 的版本,想要换成gitlab-ce,就需要将装好的gitlab-ee进行卸载,卸载方法如下: 6.1、首先停止GitLab gitlab-ctl stop 6.2、卸载gitlab-ee rpm -e gitlab-ee 6.3、查看GitLab进程 ps aux | grep gitlab 6.4、杀掉进程(应该为列表的第一个,带很多……的GitLab进程) kill -9 1278 6.5
postfix start sudo chkconfig postfix on curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee /script.rpm.sh | sudo bash sudo EXTERNAL_URL="http://gitlab.example.com" yum -y install gitlab-ee 实际问题 :yum 安装 gitlab-ee(或 ce)时,需要联网下载几百 M 的安装文件,非常耗 时,所以应提前把所需 RPM 包下载并安装好。
3.1.1 拉取 Gitlab 镜像 SH docker pull gitlab/gitlab-ee:latest 3.1.2 编写 docker-compose.yml 文件 创建一个 docker-compose.yml vim docker-compose.yml 内容如下: yml version: '3.3' services: web: image: 'gitlab/gitlab-ee image: 'gitlab/gitlab-ee:latest':指定要使用的 Docker 镜像。在这里,使用了 gitlab/gitlab-ee 镜像的最新版本。 test-group/passjava.git 提示输入密码,输入用户名和密码: 4.4 提交代码到 Gitlab 仓库 附录:离线安装 Gitlab sh docker pull gitlab/gitlab-ee 执行打包镜像命令: sudo docker save -o gitlab-ee.tar gitlab/gitlab-ee:latest 因为保存的 tar 包权限不够,所以设置下权限为 777。
官方镜像 gitlab/gitlab-ee(企业版) GitLab Enterprise Edition docker image based on the Omnibus package gitlab have been granted. export GITLAB_HOME=/srv/gitlab step2:拉取镜像 docker search gitlab docker pull gitlab/gitlab-ee -volume $GITLAB_HOME/logs:/var/log/gitlab \ --volume $GITLAB_HOME/data:/var/opt/gitlab \ gitlab/gitlab-ee
ubuntu@VM-0-7-ubuntu:~$ curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh ubuntu@VM-0-7-ubuntu:~$ sudo EXTERNAL_URL="http://gitlab.example.com" apt-get install gitlab-ee Reading Done The following NEW packages will be installed: gitlab-ee 0 upgraded, 1 newly installed, 0 to remove Get:1 https://packages.gitlab.com/gitlab/gitlab-ee/ubuntu xenial/main amd64 gitlab-ee amd64 11.4.0-ee .0 [514 MB] 1% [1 gitlab-ee 4,523 kB/514 MB 1%] 2,727 B/s 2d 3h 50min 54s 等系统自动安装完成后
systemctl start postfix 04 添加gitlab的仓库地址 curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee enabled=1 05 设置gitlab的域名和安装gitlab sudo EXTERNAL_URL="https://gitlab.congzhizhi.com" yum install -y gitlab-ee 此时要么买一个域名,要么在本地的hosts文件中设置一下 安装gitlab服务器的ip地址 gitlab.congzhizhi.com 假如不想设置域名,可以直接安装 yum install -y gitlab-ee
postfix 第二步,添加官方的 GitLab package repo源: curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee sudo EXTERNAL_URL="访问的URL地址" dnf install -y gitlab-ee 注* 截图时已正常安装。
添加gitlab仓库并且安装 curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash sudo EXTERNAL_URL="http://gitlab.example.com" yum install -y gitlab-ee 3.
# apt install -y postfix root@hello:~# curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee /script.deb.sh | sudo bash root@hello:~# apt install gitlab-ee 复制代码 02 — 修改配置文件 root@hello:~# vim /etc
Gitlab Server 部署 1、环境准备 1.系统版本:CentOS7.4 2.Gitlab版本:gitlab-ee 11.0.1 3.初始化系统环境 4.关闭防火墙 [root@localhost mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever/ gpgcheck=0 enabled=1 # vim gitlab-ee.repo [gitlab-ee ] name=Gitlab EE Repository baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ee/yum/el$releasever/ ca-bundle.crt metadata_expire=300 (3) 添加官方源 curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee .安装包下载 https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/ https://mirrors.tuna.tsinghua.edu.cn/gitlab-ee
start postfix 2.配置GitLab的仓库地址并下载安装包 添加仓库地址 curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee /script.rpm.sh | sudo bash 安装GitLab yum install -y gitlab-ee 正常来说,执行完这步之后,会帮我们安装和自动配置GitLab相关的信息的.如果没有启动
systemctl start postfix # 可能下载不下来,不过可以手动安装 curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee
添加 GitLab 软件源 curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | sudo EXTERNAL_URL="https://gitlab.example.com" apt-get install gitlab-ee 设置默认 root 密码。
gitlab-ce-12.3.0-ce.0.el7.x86_64 添加仓库地址 curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee /script.rpm.sh | sudo bash 安装GitLab yum install -y gitlab-ee 正常来说,执行完这步之后,会帮我们安装和自动配置GitLab相关的信息的.如果没有启动
gitlab备份3.手动+自动将gitlab备份包scp到新服务器上4.手动+自动恢复新服务器上的gitlab备份包5.在新旧服务器上自动删除过期备份包 前提 1.版本 •gitlab-ce是社区版•gitlab-ee 添加gitlab安装包仓库并安装 添加gitlab包仓库 curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh sudo EXTERNAL_URL="https://gitlab.example.com" apt-get install gitlab-ee 此时你会发现慢的要死,速度是100k/s,毕竟两者隔了一堵墙 /下 或者是直接访问到gitlab-ee[8]版本下, 直接访问到gitlab-ce[9]版本下。 /ubuntu xenial main 1.更新apt仓库,安装 gitlab-ee sudo apt-get update sudo apt-get install gitlab-ee=10.7.2-
systemctl reload firewalld 第三步:下载GitLab安装文件 curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee /script.rpm.sh | sudo bash 第四步:安装 sudo EXTERNAL_URL="https://gitlab.example.com" yum install -y gitlab-ee
解决方法: 1.停止 GitLab sudo gitlab-ctl stop 2.卸载 GitLab sudo rpm -e gitlab-ce && sudo rpm -e gitlab-ee 3.
创建docker-compose.yml version: "3.6" services: gitlab: image: gitlab/gitlab-ee:latest container_name