有关如何设置静态 IP 地址的信息,请参见在 Oracle Solaris 11.2 中配置和管理网络组件 中的如何配置 IPv4 接口和 ipadm(1M) 手册页中的说明。
# pkg publisher PUBLISHER TYPE STATUS URI solaris origin online http://pkg.oracle.com/solaris11/release/ # pkg install pkg:/system/boot/network Packages to install: 1 Variants/Facets to change: 3 Create boot environment: No Create backup boot environment: No Services to change: 1 DOWNLOAD PKGS FILES XFER (MB) Completed 1/1 13/13 0.0/0.0 PHASE ACTIONS Install Phase 34/34 PHASE ITEMS Package State Update Phase 1/1 Image State Update Phase 2/2 PHASE ITEMS Reading Existing Index 8/8 Indexing Packages 1/1
该映像是安装映像和 JumpStart 工具的源。请记住,JumpStart 只能用于安装 Oracle Solaris 10 OS,而不能用于安装 Oracle Solaris 11 OS。
以下示例使用 SPARC 的 Oracle Solaris 10 1/13 DVD 映像。
# /media/SOL_10_0113_SPARC/Solaris_10/Tools/setup_install_server /export/s10u11_sparc Verifying target directory... Calculating the required disk space for the Solaris_10 product Calculating space required for the installation boot image Copying the CD image to disk... Copying Install Boot Image hierarchy... Copying /boot netboot hierarchy... Install Server setup complete
# cd /media/SOL_10_0113_SPARC/Solaris_10/Misc/jumpstart_sample # mkdir -p /export/profiles/s10profile # cp -pr * /export/profiles/s10profile
将 /export/profile/s10profile/check 脚本的第一行替换为以下行:
#!/usr/sunos/bin/sh
在以下示例中,为了简洁起见,省略了许多输出行。请注意,–p 选项并不是与所有的 Oracle Solaris 10 更新发行版都能配合使用。确保您至少使用的是 Oracle Solaris 10 Update 7。
# cd /export/profile/s10profile # ./check -p /export/s10u11_sparc 45 blocks Validating rules... Validating profile host_class... Validating profile zfsrootsimple... Validating profile net924_sun4c... Validating profile upgrade... Validating profile x86-class... Validating profile any_machine... The custom JumpStart configuration is ok.
udp6 服务在 tftp 软件包中提供。请确保安装了 tftp 软件包。
# pkg list tftp
如果未安装 tftp 软件包,请使用以下命令进行安装:
# pkg install pkg:/service/network/tftp
安装了 tftp 软件包后,确保 udp6 服务处于可用和联机状态。
# svcs udp6 STATE STIME FMRI disabled 8:36:55 svc:/network/tftp/udp6:default # svcadm enable network/tftp/udp6 # svcs udp6 STATE STIME FMRI online 8:38:28 svc:/network/tftp/udp6:default
如果 /etc/netboot 目录不存在,则创建该目录。
JumpStart 使用 /tftpboot 进行网络引导。AI 使用 /etc/netboot 进行网络引导。如果该 Oracle Solaris 11 服务器既用作 JumpStart 安装服务器又用作 AI 安装服务器,则 /tftpboot 必须是指向 /etc/netboot 的符号链接,这样这两种工具才可以共存。
# ls /etc/netboot /etc/netboot: No such file or directory # mkdir -m 755 /etc/netboot # ln -s /etc/netboot /tftpboot # ls -l /tftpboot lrwxrwxrwx 1 root root 12 Sep 14 8:46:51 /tftpboot -> /etc/netboot
确保使用客户机的全限定主机名。在此示例中,客户机主机名为 line2-x4100.example.com。
/export/s10u11_sparc/Solaris_10/Tools/add_install_client -e 8:0:20:fd:f2:18 \ -c line2-x4100.example.com:/export/profiles/s10profile \ -p line2-x4100.example.com:/export/profiles/s10profile line2-t1 sun4u /export/home is already shared. However, the zfs file system /export/home must be shared read-only with root access. Use the "zfs set" command to set the sharenfs property for file system /export/home as follows:Use ro and either anon=0 or root=line2-x4100.example.com for /export/home. This must be fixed and /export/home shared before line2-x4100.exampl.com can boot. . .
由于对 zfs 命令的更改,请使用以下命令确认 /export/home 文件系统的共享方式,根据需要更正共享选项,然后检查文件系统的共享方式,从而验证所做的更改。在此示例中,未设置 anon=0。
# share home /export/home nfs sec=sys,ro share -F nfs -o ro,sec=sys,anon=0 /export/home # share home /export/home nfs anon=0,sec=sys,ro