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

相关推荐
qwy7152292581634 小时前
1-Docker Engine 安装前置环境配置
运维·docker·容器
sszdzq7 小时前
docker 安装 doris
运维·docker·容器
海的透彻9 小时前
docker容器进程探究
运维·docker·容器
❀͜͡傀儡师10 小时前
ShadowBroker:实时全球情报地图,开源情报(OSINT)的终极聚合平台
docker·容器·llama
.柒宇.10 小时前
MySQL双主同步
linux·数据库·mysql·docker
房开民11 小时前
ubuntu中安装claude code
linux·运维·ubuntu
七夜zippoe12 小时前
DolphinDB安装部署:单机版快速上手
docker·安装部署·dolphindb·单机版·web gui
格林威12 小时前
工业相机 SDK 在 Docker 容器中的部署与权限配置(含 USB/GigE)
开发语言·人工智能·数码相机·计算机视觉·docker·容器·工业相机
快往胃里来12 小时前
Dify保姆级教程:部署、智能体、工作流到后端API
阿里云·docker
学Linux的语莫13 小时前
Hyper-V的安装使用
linux·windows·ubuntu·hyper-v