ubuntu安装docker&gitlab

#更换阿里云进行配置GPG 密钥

curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -

sudo add-apt-repository \

"deb [arch=arm64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"

#如果出现错误:

【Linux 配置】E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

则修改下DNS

sudo echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null

可换的DNS有:

114公共DNS: 114.114.114.114和114.114.115.115

阿里的DNS: 223.5.5.5和223.6.6.6、

腾讯的DNS: 119.29.29.29和182.254.116.116

百度的DNS: 180.76.76.76

Google的DNS: 8.8.8.8和8.8.4.4

测试是否修改成功:

cat /etc/resolv.conf

重新更新

sudo apt-get update --fix-missing

#安装 Docker

sudo apt-get update

sudo apt install docker-ce docker-ce-cli containerd.io

docker --version

sudo systemctl status docker

#ubuntu安装gitlab

#1.更新系统的包索引

sudo apt-update

#2.安装依赖项:

sudo apt-get install -y curl openssh-server ca-certificates

#3.添加GitLab官方仓库:

curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | sudo bash

#安装GitLab:

sudo EXTERNAL_URL="http://your-domain.com" apt-get install gitlab-ee

(替换 your-domain.com 为你的GitLab服务器的域名/IP)

#安装完成后,GitLab 会自动配置,你可以通过 http://your-domain.com 访问GitLab的界面

备注:

修改配置文件中的端口设置

找到GitLab的配置文件gitlab.rb,通常位于/etc/gitlab/目录下

修改端口(8888为自己的端口)

external_url 'http://yourdomain.com:8888'

重新配置GitLab并重启服务

sudo gitlab-ctl reconfigure

sudo gitlab-ctl restart

确认端口更改

sudo netstat -tulnp | grep :8888

#查看root默认密码

sudo cat /etc/gitlab/initial_root_password

相关推荐
若云止水39 分钟前
Ubuntu 下 nginx-1.24.0 源码分析 - ngx_init_cycle 函数 - 详解(4)
数据库·nginx·ubuntu
Dontla1 小时前
Docker run --add-host参数解析(在容器启动时向/etc/hosts文件中添加自定义的主机名与IP映射)(适用于临时调试或测试)
tcp/ip·docker·容器
西西小飞龙1 小时前
Docker和K8S中pod、services、container的介绍和关系
docker·容器·kubernetes
元气满满的热码式1 小时前
Docker数据卷操作实战
linux·运维·docker·云原生·容器
kngines1 小时前
【实战 ES】实战 Elasticsearch:快速上手与深度实践-1.3.1单节点安装(Docker与手动部署)
大数据·elasticsearch·docker
放情11 小时前
Ubutu部署WordPress
ubuntu·云原生
Xiezequan12 小时前
Ubuntu指令(一)
linux·运维·ubuntu
ForTodayzzZ12 小时前
centos和ubuntu安装mysql教程
linux·mysql·ubuntu·centos
飞火流星0202712 小时前
docker安装etcd:docker离线安装etcd、docker在线安装etcd、etcd镜像下载、etcd配置详解、etcd常用命令、安装常见问题总结
docker·容器·etcd
尘佑不尘13 小时前
【无标题】oscp备考,oscp系列——Tr0ll1靶场,两种提权方式,ftp匿名登录,ssh爆破,ubuntu内核提权,计划任务
web安全·ubuntu·渗透测试·ssh·vulnhub