Ubuntu安装docker buildx打包全平台镜像sub-web镜像
VM安装Ubuntu
获取Ubuntu服务器版 | Ubuntu下载Server版本,版本架构随便自己选,一般应该是amd64的。
新建虚拟机:
- 新建虚拟机我们可以从【左侧侧边栏】鼠标右键,选择 【新建虚拟机(N)】也可以在右侧 主页,点击 【创建新的虚拟机】
- 选择 【自定义(高级)(C)】,然后点击 【下一步】
- 选择虚拟机硬件兼容性,这一项尽量选高版本,我的是vm16.2,所以选择的【硬件兼容性(H)】:Workstation 16.2.x,然后【下一步】
- 安装客户机操作系统,选择【稍后安装操作系统(S)】,选择【下一步】
- 选择客户机操作系统,选中【Linux(L)】,版本(v)选择:【Ubuntu 64位】,【下一步】
- 命名虚拟机,随便填写一个你喜欢的【虚拟机名称(V)】:Ubuntu 64位;选择好虚拟机要存放的位置,【位置(L):】,【下一步】
- 处理器配置,这一项根据自己的电脑配置随意,【处理器数量(P):2】,【每个处理器的内核数量(C):1】,【下一步】
- 此虚拟机的内存,这个一般不小于4G,【下一步】
- 网络类型,我一般都是选择的【使用桥接网络(R)】,和电脑在同一段IP地址内。【下一步】
- 迭择I/O控制器类型,【LSI Logic(L)(推荐)】,【下一步】
- 迭择磁盘类型,【SCSI(S)(推荐)】,【下一步】
- 迭择磁盘,一般是【创建新虚拟磁盘(V)】,如果你已经有一个虚拟磁盘了,就选【使用现有虚拟磁盘(E)】,【下一步】
- 指定磁盘容量,【最大磁盘大小(GB)(S):20.0】,【将虚拟磁盘存储为单个文件(0)】,【下一步】
- 指定磁盘文件,这个是要你指定刚创建的虚拟磁盘存放的位置,最好是前面目录的同一路径下,【这里不要动,不动就是同一路径下】,【下一步】
- 已准备好创建虚拟机,可以点【自定义硬件(C)】查看你虚拟机的配置,也可以直接点【完成】
安装Ubuntu系统:
温馨提示:安装操作系统的过程中如果想从虚拟机切换到正常桌面可以按Ctrl+Alt先选中我们刚刚创建的虚拟机,然后点击 【编辑虚拟机设置】
虚拟机设置,选中【硬件】中的【CD/DVD(SATA) 自动检测】,在右边【设备状态】中选中【启动时连接】,【连接】中选中【使用ISO映像文件】,点击【浏览】,载入你上面下载的ubuntu-24.04.3-live-server-amd64.iso系统,点击【确定】
选中我们刚刚创建的虚拟机,然后点击 【开启此虚拟机】
开机后出现的三个选项中:选中第一个:【Try or Install Ubuntu Server】,【回车】
Try or Install Ubuntu Server
Ubuntu Server with the HUE kernel
Test MeMory等待出现:【Use UF. DONN and ENTER keys to select your language】,这个界面是让选择语言,但是没有中文,这里暂时只能先选择 【English】了,选好以后按下 【回车】键,(后续可以通过安装中文包支持中文,继续往下看吧,下面有设置中文的教程。
Use UF. DONN and ENTER keys to select your language
[] Asturianu
[]Bahasa Indonesia
[]Catala []Deutsch
[]English
[]English (UK)
[]Espano1
...........Please select your keyboard layout below, or select “Identify keyboard”to detect your layout automatically,这个界面是 【键盘配置】 ,没有中文选项,直接 【English】 ,然后选择下方的 【Done】 (完成)按下 【回车键】
Layout: [ English (US)]
Variant:[ English (US)]
[ Identify keyboard ]
[Done]
[Back]Choose the base for the installation,这个界面是 【选择安装类型】,我们直接默认正常安装就行了,然后选择下方的 【Done】 (完成)按下 【回车键】(如有你有其他需求,请自行选择,方向键上下移动,空格键选中)
(X) Ubuntu Server #这是安装标准 Server版本
( ) Ubuntu Server (minimized) # 这是安装迷你版本
Additional options
[ ] Search for third-party drivers # 搜索一些第三方驱动什么的
[Done]
[Back]这个界面是 【网络连接配置】,如果你一开始跟我一起选择了桥接模式,这里就不需要管,选择下方的【Done】(完成)按下 【回车键】: Configure at least one interface this server can use to talk to other machines, and which preferably provides sufficient access for updates NAME TYPE NOTES [ens33 eth - ] ....# 这是是显示连接上的ip地址 (Copper) [ Create bond ]
- 这个界面是 【配置代理】,直接选择下方的 【Done】 (完成)按下 【回车键】
```bash
If this system requires a proxy to connect to the internet, enter its details here.
Proxy address: [ ]
If you need to use a HTP proxy to access the outside world, enter the proxy information here. Otherwise leave this blank. The proxy information should be given in the standard form of "http:7/[[ user] [: pass]0lhost [: port]/".这是镜像地址测试。直接【Done】,【回车】
If you use an alternative mirror for Ubuntu, enter its details here.
Mirror address: http://cn. archive. ubuntu. com/ubuntu/
You may provide an archive mirror to be used instead of the default This mirror location passed tests.
Hit:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble InRelease
Get:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates InRelease [126 kB]
Get:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-backports InRelease [126kB] Fetched 252 kB in 2s (107 kB/S)
Reading package lists这个界面是 【引导存储配置】 ,这里可以进行一些分区操作等。一般没需求就直接默认就行了,然后选择下方的 【Done】 (完成)按下 【回车键】
Configure a guided storage layout, or create a custom one:
(x) Use an entire disk
[ /dev/sda local disk 20.000G -]
(x)Set up this disk as an LVM group
[] Encrypt the LVM group with LUKS
( )Custom storage layout这个界面是 【分配的存储配置】,如果不满意可以在这里修改,如果修改坏了可以选择下面的 【Reset】 进行重置。一般不需要修改,直接选择下方的 【Done】 (完成)按下 【回车键】
FILE SYSTEM SUMMARY
[/dev/sda local disk 20.000G
partition 1 new, BIOS grub spacer 1.000M
partition 2 new, to be formatted as ext4, mounted at /boot 1.771G
partition 3 new, PV of LVM volume group ubuntu-vg 18.225G这里是提示我们要不要继续,如果继续会格式化磁盘(我们一开始分配的虚拟磁盘,不是真正的磁盘,别怕)然后还提醒我们如果继续就回不到上一步了。我们直接选择 【Continue】,【 回车】即可
Confirm destructive action
Selecting Continue below will begin the installation process and result in the loss of data on the disks selected to be formatted.
You will not be able to return to this or a previous screen once the installation has started
Are you sure you want to continue?
[No]
[Continue]这个界面是让我们创建一个普通用户,这里跟桌面版的Ubuntu一样的。
第一个是你的姓名。(这个可以不填)
第二个是你的计算机名(与其他计算机联络时使用的名称。比如 root@study02-ubuntu-server:~$)。
第三个是用户名,就是这个普通用户的登录账号。
第四个是这个用户的密码。
第五个是确认这个用户的密码。也就是再输入一次。
填写完成后选择下方的 【Done【 (完成)按下【 回车键】Enter the username and password you will use to log in to the system. You can configure SSH access on a later screen, but a password is still needed for sudo. Your name:
Your servers name:
Pick a username:
Choose a password:
Confirm your password:这个界面是问你要不要升级 【Ubuntu Pro】,对不起,没钱!!!直接选择下方的 【Continue】 (完成)按下 【回车键】
Upgrade this machine to Ubuntu Pro for security updates on a much wider range of packages, until 2034. Assists with FedRAMP FIPS, STIG, HIPAA and other compliance or hardening requirements
[ About Ubuntu Pro c]
( ) Enable Ubuntu Pro
(X) skin for now
You can always enable Ubuntu Pro later using the ' pro attach' command.这个界面是要
安装SSH,安装了后面通过SSH工具连接Ubuntu Server。我们是需要的,所以光标选择到Install OpenSSH server按一下回车,当前面的[ ],变成[ x ]以后,选择下方的Done(完成)按下回车键:You can choose to install the OpenSSH server package to enable secure remote access to your server
[x] Install OpenSSH server
[X] Allow password authentication over SSH
[ Import SSH key ]
AUTHORIZED KEYS
No authorized key这个界面是问你要不要加载一些加工好的快照,比如什么内置了普罗米修斯的等等。我这里只是做测试用,我不需要加载别人的快照。直接选择下方的
Done(完成)按下回车键:These are popular snaps in server environments. Select or deselect with SPACE, press ENTER to see more details of the package, publisher and versions available. [] microk8s canonicaly Kubernetes for workstations and appliances
[] nextcloud nextcloudv Nextcloud Server -A safe home for all your data
[] wekan xet7 Open-Source kanban
[]canonical-livepatch canonicalv Canonical Livepatch Client
.............下面就等待安装完成
当底下出现有【Reboot Now】时,选中【Reboot Now】,【回车】,就会重新启动。
当出现如下错误时:请关闭虚拟机,移除前面加载的ubuntu-24.04.3-live-server-amd64.iso后,再重新启动虚拟机。如果不移除,也可以直接在这个界面上【回车】重启
(FAILEDI Failed unmounting cdrom. mount -/cdrom.
Please remove the installation medium, then press ENTER:
[ FAILED] Failed unmounting cdrom. mount -/cdrom.这就安装完成了。
在安装的过程中,有的也可能出现,这个界面是告诉你,系统有更新了,问你要不要更新一下。这里我们先直接选择
Continue without updating,不更新继续,不然后要等很长时间,然后按下回车键:Installer update available
Version 24.04.1 of the installer is now available(24.02.1 is currently running).
You can read the release notes for each version at:
https://github.com/canonical/subiquity/releases
If you choose to update,the update will be downloaded and the installation will continue from here.
[Update to the new install] # 更新到新的安装程序
[Continue without updating] # 不更新,继续
[Back] #返回上一级