8.6 使用 DVD 安装软件
最后更新于
# mdconfig -f /home/ykla/FreeBSD-14.2-RELEASE-amd64-dvd1.iso # 请替换为实际 ISO 路径,可使用 pwd 查看当前路径
md0
# mkdir -p /dist # 创建挂载路径,必须是此路径
# mount -t cd9660 /dev/md0 /dist # 不能直接挂载 ISO,会报错 block device required# gpart show # 显示系统中所有磁盘分区表信息
……省略无用磁盘……
=> 9 2356635 cd0 MBR (4.5G)
9 2356635 - free - (4.5G)# mkdir -p /dist # 创建挂载点
# mount -t cd9660 /dev/cd0 /dist # 挂载 ISO
# ls /dist/ # 查看挂载情况
.cshrc bin lib net root var
.profile boot libexec packages sbin
.rr_moved dev media proc tmp
COPYRIGHT etc mnt rescue usr# env REPOS_DIR=/dist/packages/repos pkg install xorg
Updating FreeBSD_install_cdrom repository catalogue...
FreeBSD_install_cdrom repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The following 1 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
xorg: 7.7_3
Number of packages to be installed: 1
Proceed with this action? [y/N]:# env REPOS_DIR=/dist/packages/repos pkg rquery "%n"# cp /dist/packages/repos/FreeBSD_install_cdrom.conf /etc/pkg/# pkg install xorg
Updating FreeBSD_install_cdrom repository catalogue...
FreeBSD_install_cdrom repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The following 1 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
xorg: 7.7_3
Number of packages to be installed: 1
Proceed with this action? [y/N]:# umount /dist
# mdconfig -d -u 0