Linux 制作系统镜像

简介: Linux 制作系统镜像

在 RHEL 7.3 上面搭建好了 Apache Web 服务,现在想把 RHEL 8.1 系统镜像上传到 Apache Web 根目录,但由于 RHEL 8.1 系统镜像的大小为 7.31 GB,已经超过 4 GB ,通过 rz 无法上传。解决方法是把 RHEL 8.1 系统镜像挂载到 RHEL 7.3 系统上再制作一个新系统镜像,然后把新系统镜像移动到 Apache Web 根目录里面的系统镜像目录即可,也可以先到 Apache Web 根目录里的系统镜像目录再制作新系统镜像,这样就可以省去移动新系统镜像的步骤了。
Linux 制作系统镜像Linux 制作系统镜像

环境
Red Hat Enterprise Linux Server release 7.3
VMware Workstation Pro 14

添加镜像
Linux 制作系统镜像Linux 制作系统镜像

[root@Jaking ~]# ifconfig
ens32: flags=4163 mtu 1500

    inet 192.168.10.10  netmask 255.255.255.0  broadcast 192.168.10.255
    inet6 fe80::20c:29ff:fe84:eae5  prefixlen 64  scopeid 0x20
    ether 00:0c:29:84:ea:e5  txqueuelen 1000  (Ethernet)
    RX packets 636  bytes 53068 (51.8 KiB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 508  bytes 85327 (83.3 KiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73 mtu 65536

    inet 127.0.0.1  netmask 255.0.0.0
    inet6 ::1  prefixlen 128  scopeid 0x10
    loop  txqueuelen 1  (Local Loopback)
    RX packets 4  bytes 340 (340.0 B)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 4  bytes 340 (340.0 B)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099 mtu 1500

    inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
    ether 52:54:00:25:a2:80  txqueuelen 1000  (Ethernet)
    RX packets 0  bytes 0 (0.0 B)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 0  bytes 0 (0.0 B)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[root@Jaking ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rhel-root 48G 4.9G 41G 11% /
devtmpfs 478M 0 478M 0% /dev
tmpfs 489M 0 489M 0% /dev/shm
tmpfs 489M 6.7M 482M 2% /run
tmpfs 489M 0 489M 0% /sys/fs/cgroup
/dev/sr0 3.6G 3.6G 0 100% /media/cdrom
/dev/sdd 40G 27G 14G 67% /download
/dev/sda2 1014M 145M 870M 15% /boot
/dev/mapper/rhel-data 10G 33M 10G 1% /data
tmpfs 98M 0 98M 0% /run/user/0
[root@Jaking ~]# ls /dev/sr*
/dev/sr0 /dev/sr1

/dev/sr1为新添加的镜像

制作新系统镜像
切换到 Apache Web 根目录里的系统镜像目录

[root@Jaking ~]# cd /download/系统镜像/
[root@Jaking 系统镜像]# ls
CentOS-7.6-x86_64-DVD-1810.iso rhel-server-7.3-x86_64-dvd.iso Windows 7 x64.iso
LaoMaoTao.iso ubuntu-18.04.1-desktop-amd64.iso Windows Sever 2008.iso
rhel-server-6.5-x86_64-dvd.iso Windows 2003 SP2.iso
[root@Jaking 系统镜像]# dd if=/dev/sr1 of=RHEL-8.1.iso
15335424+0 records in
15335424+0 records out
7851737088 bytes (7.9 GB) copied, 174.329 s, 45.0 MB/s
通过Web界面查看新系统镜像
http://192.168.10.10/系统镜像/

Linux 制作系统镜像Linux 制作系统镜像

下载镜像
Linux 制作系统镜像Linux 制作系统镜像

用 watch ifstat 实时查看网卡流量
Linux 制作系统镜像Linux 制作系统镜像

总结
至此,镜像已经制作成功,下载后就能直接使用。

相关文章
|
1天前
|
Linux
Linux系统中,根目录
【7月更文挑战第14天】
12 4
|
4天前
|
Web App开发 安全 Linux
Linux系统之安装Firefox浏览器
【7月更文挑战第8天】Linux系统之安装Firefox浏览器
27 8
|
2天前
|
Ubuntu Linux Shell
Ubuntu/linux系统环境变量配置详解
理解和掌握如何配置环境变量对于使用和管理Ubuntu/Linux系统非常重要。
10 2
|
3天前
|
Linux 数据处理 C语言
【Linux】基础IO----系统文件IO & 文件描述符fd & 重定向(下)
【Linux】基础IO----系统文件IO & 文件描述符fd & 重定向(下)
18 0
|
2天前
|
监控 Linux Shell
Linux系统之nice命令的基本使用
【7月更文挑战第10天】Linux系统之nice命令的基本使用
11 0
|
3天前
|
Linux C语言 C++
【Linux】基础IO----系统文件IO & 文件描述符fd & 重定向(上)
【Linux】基础IO----系统文件IO & 文件描述符fd & 重定向(上)
18 0
|
4天前
|
Ubuntu 安全 Linux
Linux系统之安装Ninvaders太空入侵者小游戏
【7月更文挑战第9天】Linux系统之安装Ninvaders太空入侵者小游戏
9 0
|
6天前
|
Linux
Linux系统中“sid”是什么意思?
在Linux系统中,"sid"也可以是"Session ID"的缩写,指的是会话标识符。每当用户登录系统时,都会创建一个新的会话,并为其分配一个唯一的sid。这个sid可以用来跟踪用户的会话,例如查看用户在该会话中运行了哪些进程。
7 0
|
7天前
|
Java Linux 数据安全/隐私保护
常用的Linux系统命令
常用的Linux系统命令
|
7天前
|
Ubuntu Linux 数据安全/隐私保护
Linux系统使用Docker部署Cloudreve云盘并实现远程访问
Linux系统使用Docker部署Cloudreve云盘并实现远程访问
13 0