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

相关推荐
Tronlong创龙1 天前
SBC-TL3588 单板机 / EPC-TL3588 工控机 Docker 开发手册(二)
docker·开发板·嵌入式开发·硬件开发·工业控制
醉熏的石头1 天前
Ubuntu 中的编程语言(中)
linux·ubuntu·scala
AI服务老曹1 天前
视觉算法模型管理完整流程:多版本上线、灰度发布与回滚的落地实践
人工智能·docker·音视频
辉的技术笔记1 天前
拆解 Dify 的 Celery:15 个队列都在干什么
docker
bukeyiwanshui1 天前
20260622 安装配置ubuntu
linux·运维·ubuntu
AI的探索之旅2 天前
从 Ubuntu 14.04 到 24.04:TI AM335x 开发环境完整迁移与 Agent 接管方案
linux·数据库·嵌入式硬件·ubuntu·postgresql
渣渣盟2 天前
Docker 运维常用命令手册(含扩容与实战)
运维·docker·容器
小尘要自信2 天前
小米摄像头怎么接入RTSP?Go2RTC转流、EasyNVR录像与公网访问教程
人工智能·docker·开源
NexTunnel2 天前
公司老项目还在 SVN,远程维护怎么做更稳?
git·svn·gitlab·远程工作·nextunnel
我叫张小白。2 天前
一个微服务电商+社区项目(瓷韵app)的技术深度复盘
docker·微服务·云原生·架构