抱歉,您的浏览器无法访问本站
本页面需要浏览器支持(启用)JavaScript
了解详情 >

gitlab安装

配置docker安装源

https://developer.aliyun.com/mirror/docker-ce?spm=a2c6h.13651102.0.0.3e221b11VZjIia&accounttraceid=e13819981e1a40d8ae68d1a0ffe140ecpeyx

# step 1: 安装必要的一些系统工具
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
# Step 2: 添加软件源信息
sudo yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
# Step 3
sudo sed -i 's+download.docker.com+mirrors.aliyun.com/docker-ce+' /etc/yum.repos.d/docker-ce.repo
# Step 4: 更新并安装Docker-CE
sudo yum makecache fast
sudo yum -y install docker-ce
# Step 4: 开启Docker服务
sudo service docker start

配置docker

[root@node1 config]# cat /etc/docker/daemon.json 

{

"data-root": "/var/lib/docker",

"registry-mirrors": ["https://1kumbvo2.mirror.aliyuncs.com"], 

"bip": "172.17.0.1/16", 

"log-driver": "json-file",

"log-level": "info",

"log-opts": {

   "max-size": "100m",

   "max-file": "10"

   } 

}

# 镜像仓库https://hub.docker.com/

systemctl enable docker
systemctl restart docker

gitlab安装

docker pull gitlab/gitlab-ce:14.1.5-ce.0
docker run -d  -p 443:443 -p 80:80 -p 2222:22  --name gitlab -v /data/gitlab/config:/etc/gitlab -v /data/gitlab/logs:/var/log/gitlab -v /data/gitlab/data:/var/opt/gitlab gitlab/gitlab-ce:14.1.5-ce.0

修改gitlab配置

vim /data/gitlab/config/gitlab.rb
external_url 'http://192.168.40.161' #本机地址
gitlab_rails['gitlab_shell_ssh_port'] = 2222

重启gitlab
docker restart gitlab

gitlab登录密码

cat /data/gitlab/config/initial_root_password
Password: uERwuGZVV4TsFk8g42xxxxxxxxxxxxxxxxxxxx

评论