solaris 11 总体比solaris 10很多变动的地方,可以去官方网站上面学习:http://www.oracle.com/technetwork/server-storage/solaris11/downloads/index.html

先讲讲我的运行环境:SunOS test13 5.11 11.1 i86pc i386 i86pc,  运行在虚拟机ESX server上面

一:首先搭建dhcp server

1. root@test13:/repo/repoea# pkg list | grep dhcp
network/dhcp/dhcpmgr                              0.5.11-0.175.1.0.0.24.2    i--
network/dhcp/dhcpmgr/locale                       0.5.11-0.175.1.0.0.23.1134 i--
service/network/dhcp                              0.5.11-0.175.1.0.0.24.2    i--
service/network/dhcp/datastore/binfiles           0.5.11-0.175.1.0.0.24.2    i--
service/network/dhcp/isc-dhcp                     4.1.0.6-0.175.1.0.0.24.0   i--

2.安装dhcp包, pkg install network/dhcp/dhcpmgr network/dhcp/dhcpmgr/locale  service/network/dhcp service/network/dhcp/datastore/binfiles service/network/dhcp/isc-dhcp

3.配置dhcp

dhcpconfig -D -r SUNWfiles -p /var/dhcp

dhcpconfig -N 10.200.117.0 -t 10.200.117.1(-N代表网段,-t代表默认路由)

dhtadm -A -m Solaris-11-ea-sparc -d ':DNSdmain=cdc.veritas.com:DNSserv=10.200.117.18:BootSrvA=10.200.117.245:BootFile="http://10.200.117.245:5555/cgi-bin/wanboot-cgi":Subnet=255.255.255.0:Router=10.200.117.1:'  (创建宏,其中BootFile后面是创建的ai service的服务,用installadm create-service生成以后会有这个bootfile)

将客户机加入到这个宏里面:

pntadm -A 10.200.117.244 -h test11 -c test11 -m Solaris-11-ea-x86  -i 01000C2929BC02 -s 10.200.117.245 -f PERMANENT -e "01/01/2080" 10.200.117.0(-i是指网卡的mac地址前面要加01,-A是增加 -h是指客服机hostname,-m是指宏,-s是指server ip,-f是指不过期,10.200.117.0指你的网段)

dhcpconfig -S -r(重启dhcp)

确保这个服务是起来了的:svc:/network/dhcp-server:default(用svcs -a|grep dhcp查看下,没起来把服务开启)

用pntadm -L 查看你简历的网段

root@test13:/repo/repoea# pntadm -L
10.200.117.0

pntadm -P 10.200.117.0查看所在网段的客服机器

root@test13:/repo/repoea# pntadm -P 10.200.117.0
Client ID       Flags   Client IP       Server IP       Lease Expiration                Macro           Comment

01000C2929BC02  01      10.200.117.244  10.200.117.245  Forever                         Solaris-11-ea-x86       test11

dhtadm -P 查看简历的宏

root@test13:/repo/repoea# dhtadm -P
Name                    Type            Value
==================================================
Solaris-11-ea-x86       Macro           :DNSdmain=cdc.veritas.com:DNSserv=10.200.117.18:BootSrvA=10.200.117.245:BootFile="default-i386/boot/grub/pxegrub2":Subnet=255.255.255.0:Router=10.200.117.1:
Solaris-11-ea-sparc     Macro           :DNSdmain=cdc.veritas.com:DNSserv=10.200.117.18:BootSrvA=10.200.117.245:BootFile="http://10.200.117.245:5555/cgi-bin/wanboot-cgi":Subnet=255.255.255.0:Router=10.200.117.1:

二:第一步的时候遗留了一个问题就是生成bootfile,现在我们要创建ai service

1:我的一些iso资源,包括solaris 11 U1的x86和sparc,还有就是repo做IPS

root@test13:/mnt/os/OS/solaris11/U1# ls
sol-11_1-24b-ai-sparc.iso    sol-11_1-24b-ai-x86.iso      sol-11_1-24b-repo-p01.iso    sol-11_1-24b-repo-p02.iso

2:创建文件系统mount点

zfs create -o compression=on -o mountpoint=/ai rpool/ai(ai server里面有manifest和profile等目录,存放manifest和profile)
zfs create -o compression=on -o mountpoint=/repo rpool/repo(做IPS)

cd /ai;mkdir aiboot manifest
cd /mnt;mkdir nfs iso
mount -o vers=3 10.200.117.71:/lab /mnt/nfs
svcadm enable svc:/network/dns/multicast:default
svcadm enable network/tftp/udp6

3:创建ai service

installadm create-service -n Solaris-11-ea-sparc -s /mnt/nfs/iso/ea/sol-11-ea-ai-sparc.iso  -d /ai/aiboot/Solaris-11-ea-sparc

installadm create-service -n Solaris-11-ea-x86 -s /mnt/nfs/iso/ea/sol-11-ea-ai-x86.iso -d  /ai/aiboot/Solaris-11-ea-x86

这里会生成一个bootfile文件,记住这个名字,这个名字要和dhcp server的宏相关联

root@test13:/ai/profile# installadm create-service -n Solaris-11-ea-sparc -s /mnt/os/OS/solaris11/U1/sol-11_1-24b-ai-sparc.iso -d /ai/aiboot/Solaris-11-ea-sparc

Creating service from: /mnt/os/OS/solaris11/U1/sol-11_1-24b-ai-sparc.iso
Setting up the image ...

Creating sparc service: Solaris-11-ea-sparc

Image path: /ai/aiboot/Solaris-11-ea-sparc

Service discovery fallback mechanism set up
Creating SPARC configuration file
Refreshing install services

Creating default-sparc alias

Service discovery fallback mechanism set up
Creating SPARC configuration file
No local DHCP configuration found. This service is the default
alias for all SPARC clients. If not already in place, the following should
be added to the DHCP configuration:
Boot file: http://10.200.117.245:5555/cgi-bin/wanboot-cgi

Refreshing install services

3:关联manifest到ai service

installadm add-manifest -n Solaris-11-ea-x86 -m manifest-ea -f /ai/manifest/manifest-ea.xml  -d(create-manifest也可以,我试过,-d的参数代表默认的)

installadm add-manifest -n Solaris-11-ea-sparc -m manifest-ea -f /ai/manifest/manifest-ea.xml -d

manifest的一个模板xml文件是:

root@test13:/mnt# cat /ai/manifest/manifest-ea.xml 
<!DOCTYPE auto_install SYSTEM "file:///usr/share/install/ai.dtd.1">
<auto_install>
  <ai_instance name="manifest-GA">
    <target>
      <logical>
        <zpool name="rpool" is_root="true">
          <filesystem name="export" mountpoint="/export"/>
          <filesystem name="export/home"/>
          <be name="solaris"/>
        </zpool>
      </logical>
    </target>
    <software type="IPS">
      <destination>
        <image>
          <!-- Specify locales to install -->
          <facet set="false">facet.locale.*</facet>
          <facet set="true">facet.locale.de</facet>
          <facet set="true">facet.locale.de_DE</facet>
          <facet set="true">facet.locale.en</facet>
          <facet set="true">facet.locale.en_US</facet>
          <facet set="true">facet.locale.es</facet>
          <facet set="true">facet.locale.es_ES</facet>
          <facet set="true">facet.locale.fr</facet>
          <facet set="true">facet.locale.fr_FR</facet>
          <facet set="true">facet.locale.it</facet>
          <facet set="true">facet.locale.it_IT</facet>
          <facet set="true">facet.locale.ja</facet>
          <facet set="true">facet.locale.ja_*</facet>
          <facet set="true">facet.locale.ko</facet>
          <facet set="true">facet.locale.ko_*</facet>
          <facet set="true">facet.locale.pt</facet>
          <facet set="true">facet.locale.pt_BR</facet>
          <facet set="true">facet.locale.zh</facet>
          <facet set="true">facet.locale.zh_CN</facet>
          <facet set="true">facet.locale.zh_TW</facet>
        </image>
      </destination>
      <source>
        <publisher name="solaris">
          <origin name="http://10.200.117.245:10002"/>
        </publisher>
      </source>
      <!--
        By default the latest build available, in the specified IPS
        repository, is installed.  If another build is required, the
        build number has to be appended to the 'entire' package in the
        following form:

<name>pkg:/entire@0.5.11-0.build#</name>
      -->
      <software_data action="install">
        <name>pkg:/entire@latest</name>
        <name>pkg:/group/system/solaris-large-server</name>
        <name>pkg:/slim_install</name>
      </software_data>
    </software>
  </ai_instance>
</auto_install>

红色部分是你的IPSserver的地址和端口

4:创建profile

installadm create-profile -n Solaris-11-ea-sparc -f /ai/profile/10.200.117.244.xml -p profile-ea

installadm create-profile -n Solaris-11-ea-x86 -f /ai/profile/10.200.117.244.xml -p profile-ea

profile xml文件就不贴出来了,太长了,官网有

5:创建IPS

lofiadm -a /mnt/os/mnt/os/OS/solaris11/U1/sol-11_1-24b-repo-p01.iso

mount -F hsfs /dev/lofi/1 /mnt/iso

rsync -aP /mnt/iso/repo/ /repo/repoea/

/usr/lib/pkg.depotd -d /repo/repoea -p 10002 > /dev/null&

这个只是将p01的包拷入到/repo/repoea/,再重复上面的操作,然后将p02也拷入到/repo/repoea/

好了,我们现在就可以重启机器通过ai server 自动安装系统了

Solaris 11的自动化安装(AI server)的搭建的更多相关文章

  1. 自动化安装SQL Server+SP就那么简单

    随着业务.企业规模的日益壮大,DB的数量也在不断增多,配置一台新增DB,从服务器的参数配置,磁盘阵列规划,DB安装部署,DB参数调优等等一列步骤下来,手工操作的效率变得越来越低,因为我负责的数据库近些 ...

  2. Solaris 11配置IPS安装系统包(类似linux中的yum源)

    参考:http://blog.chinaunix.net/uid-8860-id-3777457.html 一. 概述: Solaris 11被称为第一个云操作系统,因此在很多方面体现了云系统的一些特 ...

  3. Solaris 11 system package 安装与更新(如:assembler)

    最近在VirtualBox虚拟机中导入了Solaris 11.3.在里面安装Oracle数据库时,先行条件检查没通过,提示缺少程序包assembler. 在网上看了许多,这方面的信息还比较少.最后在O ...

  4. Solaris 11, gcc 的安装

    注意点在于, 头文件在另外一个包system/header里,需要另外安装 pkg pkg install system/header

  5. solaris 11 stdio.h: No such file or directory

    http://www.zendo.name/solaris-11-stdio-h%EF%BC%9A-no-such-file-or-directory/ Posted on 2012 年 3 月 23 ...

  6. 动化安装SQL Server+SP就那么简单

    随着业务.企业规模的日益壮大,DB的数量也在不断增多,配置一台新增DB,从服务器的参数配置,磁盘阵列规划,DB安装部署,DB参数调优等等一列步骤下来,手工操作的效率变得越来越低,因为我负责的数据库近些 ...

  7. azure 云上MySQL最新版本 MySQL5.7.11 批量自动化一键式安装 (转)

    --背景云端 以前都喜欢了源码安装mysql,总觉得源码是高大上的事情,不过源码也需要时间,特别是make的时候,如果磁盘和cpu差的话,时间很长很长,在虚拟机上安装mysql尤其甚慢了. 现在业务发 ...

  8. MySQL最新版本 MySQL5.7.11 批量自动化一键式安装(转)

    --背景云端 以前都喜欢了源码安装MySQL,总觉得源码是高大上的事情,不过源码也需要时间,特别是make的时候,如果磁盘和cpu差的话,时间很长很长,在虚拟机上安装mysql尤其甚慢了. 现在业务发 ...

  9. 自动化安装smokeping-2.6.11脚本

    自动化安装Smokeping-2.6.11脚本 一.目的 1.1 监控目的 为方便监测各数据中心网络状况,自定义全国各节点,从而发现网络异常,判断网络故障. 1.2 本文目的 快速部署Smokepin ...

随机推荐

  1. python模块 mysql-python安装(在ubuntu系统下)

    直接运行如下命令 sudo pip install MySQL-python 报如下错误 xxx@ubuntu:~$ sudo pip install MySQL-python Downloading ...

  2. 为什么C语言在2013年仍然很重要:一个简单的例子

    附注:在最初的文章里,我没说明进行模2^64的计算——我当然明白那些不是“正确的”斐波那契数列,其实我不是想分析大数,我只是想探寻编译器产生的代码和计算机体系结构而已. 最近,我一直在开发Dynvm— ...

  3. MFC全局函数开局——AfxGetApp解剖

    MFC中有不少的全局函数,方便在不同对象中获取不同的内容或创建不同的对象.主要全局函数有: AfxWinInit() AfxBeginThread() AfxEndThread() AfxFormat ...

  4. LTP介绍

    1.LTP介绍    LTP--linut test project ,ltp套件是由Linux Test Project所开发的一套系统測试套件.它基于系统资源的利用率统计开发了一个測试的组合,为系 ...

  5. 开源 免费 java CMS - FreeCMS1.9 职位管理

    项目地址:http://code.google.com/p/freecms/ 职位管理 管理职位,实现招聘功能. 1. 职位管理 从左側管理菜单点击职位管理进入. 2. 加入职位 在职位列表下方点击& ...

  6. hdu 4885 TIANKENG’s travel(bfs)

    题目链接:hdu 4885 TIANKENG's travel 题目大意:给定N,L,表示有N个加油站,每次加满油能够移动距离L,必须走直线,可是能够为斜线.然后给出sx,sy,ex,ey,以及N个加 ...

  7. iOS开发之使用Ad Hoc进行测试

    由于最近某个项目需要给别人测试,使用的是Ad Hoc方法 首先登录开发者官网配置证书 1.添加Certificates,从电脑获取certSigningRequest然后添加进去 2.在Identif ...

  8. 读书笔记:php_tizag_tutorial

    昨天在实验室花了一天时间看了英文版的php_tizag_tutorial,因为上学期用php和bootstrap写过一个租房网站,对php还是比较熟悉.现在总结一下php_tizag_tutorial ...

  9. SpringMVC日期类型转换问题三大处理方法归纳

    方法一:实体类中加日期格式化注解 @DateTimeFormat(pattern = "yyyy-MM-dd") private Date receiveAppTime; 方法二: ...

  10. shell登录模式及其相应配置文件(转)

    参考<linux命令.编辑器与shell编程>(清华大学出版社) 当启动shell时,它将运行启动文件来初始化自己.具体运行哪个文件取决于该shell是登陆shell还是非登陆shell的 ...