文件导入

Solaris 11 AI server 架设

###################### 拷贝repo
[bash]
zfs create service/repoSolaris11
zfs list
[/bash]
# The atime property controls whether the access time for files is updated when the files are read. Turning this property off avoids producing write traffic when reading files
# atime 属性控制是否在读取文件时更新文件的访问时间。关闭此属性可避免在读取文件时生成写入流量。
[bash]
zfs set atime=off service/repoSolaris11
[/bash]
[bash]
mount -F hsfs /home/solaris/sol-11-1111-repo-full.iso /mnt/
ls /mnt
df -h /mnt
[/bash]

# copy the repository files from /mnt/repo/ to a ZFS file system, use the rsync command, be sure to specify /mnt/repo/ (including the trailing slash character) and not /mnt/repo to copy the files and subdirectories in the repo directory
# 将系统信息库文件从 /mnt/repo 复制到 ZFS 文件系统, 使用 rsync 命令,请确保指定 /mnt/repo/(包括末尾的斜杠字符)而非 /mnt/repo 以复制 repo 目录中的文件和子目录
[bash]
# rsync -aP /mnt/repo/ /service/repoSolaris11
[/bash]

# 或者用tar 命令
# tar command as shown in the following example can be a faster way to move the repository from the mounted file system to the repository ZFS file system
# tar 命令可以更快速地将系统信息库从已挂载文件系统移动到系统信息库 ZFS 文件系统
[bash]
cd /mnt/repo; tar cf - . | (cd /service/repoSolaris11; tar xfp -)
cd; umount /mnt
[/bash]

# catalog packages in the repository and update search indexes
# 为软件包编写目录并更新搜索索引
[bash]
pkgrepo -s /service/repoSolaris11 refresh
[/bash]

########################## 启动服务
# 使客户机能够通过 HTTP 访问本地系统信息库,请启用 application/pkg/server 服务管理工具 (Service Management Facility, SMF) 服务。
[bash]
svccfg -s application/pkg/server setprop pkg/inst_root=/service/repoSolaris11
svccfg -s application/pkg/server setprop pkg/readonly=true
[/bash]

# 检查工作:
[bash]
svcprop -p pkg/inst_root application/pkg/server
[/bash]

# 使用 pkg.depotd 向客户机提供系统信息库。缺省情况下,pkg.depotd 在端口 80 上侦听连接。可以通过重置 pkg/port 属性来更改端口。
[bash]
svccfg -s application/pkg/server setprop pkg/port=port_number
[/bash]

# 重新启动 pkg.depotd 系统信息库服务。
[bash]
svcadm refresh application/pkg/server
svcadm enable application/pkg/server
[/bash]

############################# 配置AI
# 确保installadm软件包已经安装
# 配置提供服务的网段
[bash]
svccfg -s system/install/server:default setprop all_services/networks = 192.168.1.1/25
svcadm refresh system/install/server:default
[/bash]

# 启用多播DNS
[bash]
svcs /network/dns/multicast
svcadm enable /network/dns/multicast
[/bash]

# 安装文件目录
[bash]
zfs create service/install
[/bash]

# 创建包括本地 DHCP 设置的安装服务
[bash]
installadm create-service -n s11-sparc -s /home/solaris/sol-11-1111-ai-sparc.iso -d /install/images/s11-sparc -B 192.168.1.111 -i 192.168.1.1 -c 60
installadm create-service -n s11-x86 -s /home/solaris/sol-11-1111-ai-x86.iso -d /install/images/s11-x86 -B 192.168.1.111 -i 192.168.1.1 -c 60
[/bash]

# 服务删除办法
[bash]
installadm delete-service -r s11-sparc
installadm delete-service -r s11-x86

installadm export -n s11-x86 -m orig_default > ~/orig_default.x86.xml
installadm export -n s11-sparc -m orig_default > ~/orig_default.sparc.xml
[/bash]

# 修改内容,然后重新导入
[bash]
installadm update-manifest -n default-i386 -m orig_default -f ~/orig_default.x86.xml
installadm update-manifest -n default-sparc -m orig_default -f ~/orig_default.sparc.xml

installadm update-manifest -n s11-x86 -m orig_default -f ~/orig_default.x86.xml
installadm update-manifest -n s11-sparc -m orig_default -f ~/orig_default.sparc.xml
[/bash]

# 生成配置文件
[bash]
sysconfig create-profile -o sc.xml
installadm validate -n default-i386 -P ~/sc.xml
installadm validate -n default-sparc -P ~/sc.xml
[/bash]

# 删除配置方法
[bash]
installadm delete-profile -p sc_client -n default-i386
installadm delete-profile -p sc_client -n default-sparc
[/bash]

# 导入配置
[bash]
installadm create-profile -n default-i386 -f ~/sc.xml -p sc_client
installadm create-profile -n default-sparc -f ~/sc.xml -p sc_client
[/bash]
# 查看配置文件
[bash]
installadm list -p
[/bash]

# 向安装服务添加客户机
[bash]
installadm create-client -e <mac address> -n s11-x86
installadm create-client -e <mac address> -n s11-sparc
[/bash]

具体请参考:https://docs.oracle.com/cd/E26926_01/html/E25762/installsvr-1.html

评论