当前位置:   article > 正文

安装 Ubuntu 22.04.3 和 docker_ubuntu 22.04.3 lts下载

ubuntu 22.04.3 lts下载


一、安装 Ubuntu 22.04.3

1. 简介

Ubuntu 22.04.3 是Linux操作系统的一个版本。LTS 版本支持周期到2032年。
系统要求双核 CPU、4GB 内存和至少 25 GB 存储空间。
Linux kernel:5.15。

2. 下载地址

官网
ubuntu-22.04.3-live-server-amd64

3. 系统安装

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

4. 系统配置

  • 设置root账户密码
sudo passwd root
  • 1

1)输入登录账户密码
2)输入root账户密码

  • 设置root远程可访问
sudo chmod 777 /etc/ssh/sshd_config
vim /etc/ssh/sshd_config
service sshd restart
  • 1
  • 2
  • 3

sshd_config 修改内容

Port 22
PermitRootLogin yes
PasswordAuthentication yes
  • 1
  • 2
  • 3

vim 操作:编辑按“Insert”键,退出保存按“Esc”键,然后输入:wq

  • 设置DNS
cp /etc/resolv.conf  /etc/resolv.conf1 
rm /etc/resolv.conf 
mv /etc/resolv.conf1  /etc/resolv.conf
vim /etc/resolv.conf 
  • 1
  • 2
  • 3
  • 4

resolv.conf 添加内容

nameserver 223.6.6.6
nameserver 8.8.8.8
  • 1
  • 2
  • 升级软件包
sudo apt-get update -y
sudo apt-get full-upgrade -y
  • 1
  • 2

更新完成有提示框:按“Tab”键,选中OK后,回车确认

  • 系统漏洞修复
sudo apt-get -y install cloud-init --only-upgrade
  • 1
  • 修改时间
apt install ntpsec-ntpdate
ntpdate time1.aliyun.com
sudo timedatectl set-timezone 'Asia/Shanghai'
  • 1
  • 2
  • 3
  • 添加定时任务
vim /etc/crontab
  • 1

crontab 添加内容

0 */12 * * *    ntpdate time1.aliyun.com
  • 1
  • 网卡IP配置
sudo chmod 777 /etc/netplan/00-installer-config.yaml
vim /etc/netplan/00-installer-config.yaml
  • 1
  • 2

00-installer-config.yaml 添加内容

network:
 ethernets:
   eno1:
     dhcp4: false
     addresses:
       - 192.168.1.123/24
     routes:
       - to: default
         via: 192.168.1.1
     nameservers:
       addresses: [61.139.2.69,8.8.8.8]
 version: 2
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12

二、安装 Docker

1. 安装 docker

apt install docker.io
docker version
  • 1
  • 2

2. 安装 docker compose

apt install docker-compose
docker-compose version
  • 1
  • 2

3. 配置 docker

  • /etc/docker/daemon.json
{
  "registry-mirrors": ["https://registry.docker-cn.com"]
}
  • 1
  • 2
  • 3
  • 重启
systemctl daemon-reload && systemctl restart docker
  • 1
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/正经夜光杯/article/detail/776886
推荐阅读
相关标签
  

闽ICP备14008679号