Article directory
PS: This article mainly records the installation software and usage process, and only briefly records the system installation.
For detailed records, please refer to:
https://blog.csdn.net/m0_46983541/article/details/126936850
Mirror download
Alibaba Cloud mirror station image download:
https://mirrors.aliyun.com/ubuntu-releases/20.04/You
can download it according to your needs:
Record of key installation steps
Typical installation method selection:
Operating system selection:
Basic configuration selection:
I usually choose a single file. As for the multiple files mentioned to facilitate moving the virtual machine, I have not actually tested it.
The difference between storing single-dimensional files and multiple files is that there are more files in the directory when storing, such as the following picture:
Virtual machine editor:
tips: Here you can choose the image you do not want to install, adjust the disk hard disk size, etc.
language selection:
Installation selection, update installation can be installed after changing the source as needed. Minimize the installation first.
Install now:
Just click the left mouse button on the time zone and select Shanghai.
Configure account and password information:
Software installation:
Tips: If the network is slow, you can skip subsequent installation
. Restart after completion:
Tips after restart:
Solution:
Cancel the connection and return to the Ubuntu startup page and press Enter.
Basic installation is completed:
It is recommended to take a snapshot first to facilitate system restoration if any problems occur during subsequent installations.
Change mirror source
basic commands
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak ### 备份sources.list
sudo gedit /etc/apt/sources.list ##编辑源文件
## 镜像源信息ubuntu20版本
deb http://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ jammy-backports main restricted universe multiverse
##更新软件包列表
sudo apt update
## 更新软件
sudo apt-get upgrade
Docker installation
##更新软件包列表
sudo apt update
## 更新软件
sudo apt-get upgrade
安装Docker依赖
sudo apt install apt-transport-https ca-certificates curl software-properties-common
添加Docker官方GPG密钥用于软件包验证。
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
添加Docker存储库
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
安装Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
启动Docker服务
sudo systemctl start docker
添加自动启动Docker服务
sudo systemctl enable docker
打印Docker版本查看是否安装成功
docker --version
安装docker-compose
sudo apt install docker-compose
添加加速镜像
sudo mkdir -p /etc/docker
下面从“sudo”到“EOF”一起复制粘贴到命令行使用
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://gnm7t52a.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload(win10以上系统使用wls可以忽略这个命令)
sudo systemctl restart docker(win10以上系统使用service docker restart替代)
Troubleshooting
1. The installation page is too small to see and click Next.
You can use the Tab key on the keyboard to switch selections. Just press Enter to switch to this option.
2. Some index files failed to download. If you ignore them, the old index file will be used instead.
Check whether the network connection is successful
or run the following command and update
sudo sed -i 's/cn.archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list