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

相关推荐
具身小佬8 分钟前
#!/usr/bin/env python3是干嘛的
ubuntu
杨浦老苏1 小时前
自托管网页EPUB阅读器Codexa
docker·群晖·电子书·calibre·opds
杨浦老苏1 小时前
开源文件协作平台OpenCloud
docker·文件管理·群晖·协作
谢尔登1 小时前
10_从 React Hooks 本质看 useState
前端·ubuntu·react.js
牛奶咖啡133 小时前
Git实践——GitLab服务器的部署与使用
gitlab·gitlab是什么·gitlab有啥用·gitlab适用场景·gitlab的版本如何选·安装部署gitlab·gitlab的使用
zhangrelay4 小时前
三分钟云课实践速通--单片机原理与应用--Arduino--SimulIDE--
linux·单片机·嵌入式硬件·学习·ubuntu
weixin_377634844 小时前
【MinerU】 Docker Compose 使用
docker·容器·mineru
孪生质数-4 小时前
Linux高危漏洞通报Copy Fail - CVE-2026-31431
linux·运维·服务器·ubuntu·网络安全·debian·cve-2026-31431
庚昀◟5 小时前
腾讯云 CVM + Docker + Jenkins + GitLab CI/CD 全流程指南(python、flask实现简单计算器)
python·ci/cd·docker·flask·jenkins
nudt_qxx5 小时前
Ubuntu 24.04/26.04 与 Windows 10/11 双系统时间不同步终极解决方案
windows·stm32·ubuntu