亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
123下一頁
最近訪問板塊 發(fā)新帖
查看: 14155 | 回復(fù): 25
打印 上一主題 下一主題

[原創(chuàng)] JumpStart 安裝 Solaris10 --- 用CD images設(shè)置安裝服務(wù)器及一些新功能的應(yīng)用 [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2007-02-03 04:36 |只看該作者 |倒序瀏覽
[原創(chuàng)] JumpStart 安裝 Solaris10 --- 用CD images 設(shè)置安裝服務(wù)器及一些新功能的應(yīng)用

原創(chuàng)文章,轉(zhuǎn)載請注明出處。                             作者: susbin@chinaunix.net                            020207

本文主要介紹Solaris10  Custom JumpStart 安裝中:
- 用下載的CD images 直接設(shè)置 installation server
- 設(shè)置RAID-1 (鏡像)
- 安裝10_Recommended patch cluster
- 安裝第三方提供的軟件包
- 修改SMF 設(shè)置及boot PROM 變量值

關(guān)于Solaris Custom JumpStart 安裝的原理和步驟, 在本版及精華里有CU 前輩們撰寫的多篇精彩的文章。因此本文不再敘述這些內(nèi)容。如果是初次使用JumpStart,  建議先閱讀本文末尾列出的五篇CU文章,這樣比較容易對它的原理及基本步驟有一個概括的了解。在這些文章里還介紹了一些寶貴的經(jīng)驗及技巧 。

作者在此向 bear, 南非蜘蛛, race, yanghz, Philmoon 表示敬意及感謝。


操作實例

1. 閱讀Sun 安裝文檔
Solaris 10 6/06 Installation Guide: Custom JumpStart and Advanced Installations
Part No: 819-5778-10         May 2006

2.安裝前的準(zhǔn)備工作

2.1  Server:        Sun V480, Solaris9,IP=192.168.1.48, hostname=jpserver

下載 Solaris 10 6/06  CD images (http://www.sun.com/software/solaris/get.jsp
下載10_Recommended patch cluster (http://sunsolve.sun.com
下載所需要的第三方Solaris10軟件包(http://www.sunfreeware.com

這些下載的文件都放在 Jumpstart server 上,將來以NFS 共享方式提供給Client。

建立文件夾,用來存放下載的CD images,補丁,軟件包,以及Jumpstart 所需的腳本等:
# mdkir –m 755 /u02/10_isos
# mkdir –m 755 /export/install; cd  /export/install
# mkdir –m 755 ./solaris.10 ./10_Recommended  ./10_pkgs
# mkdir –m 755 /jumpstart
#

把下載的文件分別放到準(zhǔn)備好的文件夾里,核對 md5 checksum 無誤后,  解壓。
解壓后的Solaris 10  CD images:
$ ls -l /u02/10_isos
-rw-r--r--   1 oracle     other    726138880 Jun  9  2006 sol-10-u2-ga-sparc-v1.iso
-rw-r--r--   1 oracle     other    538378240 Jun  9  2006 sol-10-u2-ga-sparc-v2.iso
-rw-r--r--   1 oracle     other    413204480 Jun  9  2006 sol-10-u2-ga-sparc-v3.iso
-rw-r--r--   1 oracle     other    667156480 Jun  9  2006 sol-10-u2-ga-sparc-v4.iso
-rw-r--r--   1 oracle     other    580321280 Jun  9  2006 sol-10-u2-ga-sparc-v5.iso
$
$ du -k -s ./10_isos
2858097 ./10_isos
$

如果要安裝其他語言,比如"Simplified Chinese"(簡體中文), 還需要下載:
Solaris 10 6/06 Languages CD, Multi-language         sol-10-u2-ga-sparc-lang-iso.zip

關(guān)于加載這第六個CD image 的方法,參考文章(1)里有實例 。

解壓后的10_Recommended patch cluster:
$ cd  /export/install
$ ls ./10_Recommended | nl
     1  118371-07
     2  118560-02
    ……
    58  124457-01
    59  CLUSTER_README
    60  copyright
    61  install_cluster
    62  patch_order
$
$ du -k -s ./10_Recommended
470622  ./10_Recommended
$

解壓后的第三方Solaris10軟件包:
$ ls ./10_pkgs
gcc-3.4.6-sol10-sparc-local         openssl-0.9.8d-sol10-sparc-local
libiconv-1.11-sol10-sparc-local     rsync-2.6.9-sol10-sparc-local
lsof-4.77-sol10-sparc-local         tcp_wrappers-7.6-sol10-sparc-local
md5-6142000-sol8-sparc-local        top-3.6-sol10-sparc-local
openssh-4.4p1-sol10-sparc-local     wget-1.10.2-sol10-sparc-local
$

2.2  Client:  Sun Ultra45 workstation,IP=192.168.1.45   hostname=jpclient     內(nèi)存4GB,硬盤 250GB x 3

安裝前應(yīng)該在 DNS服務(wù)器上注冊 Client 的hostname,IP。還要把Client 連接到Jumpstart server 所在的同一網(wǎng)段里。如果它們不在同一網(wǎng)段,Jumpstart server 的設(shè)置也要做相應(yīng)的改變。有關(guān)這方面的內(nèi)容請參考Sun 安裝文檔及參考文章(5)。

這個Ultra45 是給Oracle DBA 專門做管理數(shù)據(jù)庫用的management console, 上面要跑一個小的 Oracle10g , 還要跑Oracle10g Enterprise Manager 及一些 DBA 的工具。因此硬盤分區(qū)要根據(jù)Client 的用途來劃分。
要求用JumpStart 設(shè)置兩個鏡像。
/             16384 mb          鏡像          d10
swap        8192   mb        鏡像        d20

2.3 關(guān)于設(shè)置RAID-1 (鏡像)及metadb
從Solaris 9 4/04 (Update 6) 起,Custom Jumpstart 開始支持使用自帶的 Solaris Volume Manager 來設(shè)置鏡像。通過讀入profile 里的設(shè)定值,Jumpstart 可以在安裝中,自動設(shè)置鏡像,包括根盤鏡像。參考文章(6) 對此有很詳細的介紹。

目前Solaris 10 JumpStart 只支持RAID-0 和RAID-1,不支持RAID-5。每個RAID-1 鏡像下只能設(shè)置2個 RAID-0 submirrors。每個RAID-0 只能包含一個分區(qū)。如果把一個RAID-1鏡像命名為以0結(jié)尾,JumpStart 可以自動為它的子鏡像命名。例如:把存放“/” 的鏡像命名為d10,  它的子鏡像就會被JumpStart自動命名為d11, d12 。 現(xiàn)在還沒法用JumpStart來直接給子鏡像命名。
如果想通過JumpStart來建立更多的SVM 設(shè)備,還是要用finish腳本來做。參考文章(6) 還提供了一個不錯的腳本svm.finish 。

把metadb 放在每塊盤的 slice6 上。如果不設(shè)metadb 的大小,JumpStart 會給一個預(yù)設(shè)值:8192 blocks。 這個值是可以自己設(shè)置的。
metadb          c1t0d0s6
metadb          c1t1d0s6
metadb          c1t2d0s6

還要準(zhǔn)備兩個分區(qū),待安裝完成后,為d10, d20各建一個hot spare pool。目前JumpStart還沒有建立和加入hot spare pool 的功能。
c1t2d0s0  16384  mb
c1t2d0s1   8192   mb

各磁盤上的其他分區(qū)在后面的profile.u45 中都可看到。

3.準(zhǔn)備CD images

Solaris10 CD images 中第一個文件 (對應(yīng) CD1) 直接掛載后只能看到slice0,  看不到slice1。當(dāng)使用命令setup_install_server 把它加載時就會返回報錯信息。 因此需要先把 slice1 從該文件里切割出來。這個工作可以用腳本來完成,也可以手工來做。用腳本的做法請參見本文末尾參考文章(8)。下面介紹的是用命令一步一步來做。

3.1 先用dd 把第一個文件的VTOC 切割出來:

$ cd  /u02/10_isos
$ dd if=sol-10-u2-ga-sparc-v1.iso of=vtoc bs=512 count=1
1+0 records in
1+0 records out
$
$ ls -l vtoc
-rw-r--r--   1 root     other        512  Dec  7  11:13  vtoc
$

再用命令 od 從VTOC里找出slice 1 的起始位置,以及它的長度 。

$ od -D -j 452 -N 8 < vtoc
0000000 0000000826 0000876800
0000010
$

826 是slice 1的起始位置,它包含了876800 個數(shù)據(jù)塊。Solaris 每柱面有640 blocks, 所以可算出slice 1開始的數(shù)據(jù)塊位置:

$ echo 826*640 | bc
528640
$

3. 2  用dd 把 slice 1 從第一個文件里切割出來:

# dd if=sol-10-u2-ga-sparc-v1.iso of=sol-10-u2-ga-sparc-v1-s1.iso bs=512 \
skip=528640 count=876800
876800+0 records in
876800+0 records out
$
$ ls -l *-v1*
-rw-r--r--   1 root     other    448921600 Dec  7 11:48 sol-10-u2-ga-sparc-v1-s1.iso
-rw-r--r--   1 root     other    726138880 Jun  9 14:16 sol-10-u2-ga-sparc-v1.iso
$

3.3 掛載 Solaris10 CD images中第一個文件(對應(yīng) CD1)的 slice0, slice1

掛載CD image 文件,要先用命令 lofiadm 給這個文件創(chuàng)建一個附屬的塊設(shè)備(block device)。詳細的解釋及例子請參見參考文章 (2 )。對應(yīng)CD 2 -5 的 CD images, 也要用這個辦法來掛載, 但是不再需要做切割了。

# /usr/sbin/lofiadm -a /u02/10_isos/sol-10-u2-ga-sparc-v1.iso
/dev/lofi/1
# /usr/sbin/lofiadm -a /u02/10_isos/sol-10-u2-ga-sparc-v1-s1.iso
/dev/lofi/2
#
# cd /cdrom
# mkdir s0 s1
# cd /
# /sbin/mount -F hsfs -o ro /dev/lofi/1  /cdrom/s0
# /sbin/mount -F ufs -o ro /dev/lofi/2   /cdrom/s1
#
# df -k | grep cdrom
/dev/lofi/1           264134  264134       0   100%    /cdrom/s0
/dev/lofi/2           411903  391647       0   100%    /cdrom/s1
#

[ 本帖最后由 susbin 于 2007-2-5 04:07 編輯 ]

論壇徽章:
0
2 [報告]
發(fā)表于 2007-02-03 04:37 |只看該作者
4.設(shè)置 installation server

4.1 加入第一個文件 (對應(yīng) CD1)

# /cdrom/s0/Solaris_10/Tools/setup_install_server  /export/install/solaris.10
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...
Install Server setup complete
#
# umount /cdrom/s0
# umount /cdrom/s1
# /usr/sbin/lofiadm -d /u02/10_isos/sol-10-u2-ga-sparc-v1-s1.iso
# /usr/sbin/lofiadm -d /u02/10_isos/sol-10-u2-ga-sparc-v1.iso
#

4.2 加入其余文件 (對應(yīng) CD 2-5)

# cd /u02/10_isos
#
# for ISO in sol-10-u2-ga-sparc-v2.iso sol-10-u2-ga-sparc-v3.iso \
> sol-10-u2-ga-sparc-v4.iso sol-10-u2-ga-sparc-v5.iso
> do
> echo "---------------------------------------"
> echo "Adding the file $ISO ..."
> /usr/sbin/lofiadm -a /u02/10_isos/$ISO
> sleep 3
> /sbin/mount -F hsfs -o ro /dev/lofi/1 /cdrom
> sleep 3
> /cdrom/Solaris_10/Tools/add_to_install_server /export/install/solaris.10
> sleep 3
> umount /cdrom
> sleep 3
> /usr/sbin/lofiadm -d /u02/10_isos/$ISO
> sleep 3
> done
---------------------------------------
Adding the file sol-10-u2-ga-sparc-v2.iso ...
/dev/lofi/1

The following Products will be copied to /export/install/solaris.10/Solaris_10/Product:
Solaris_2

If only a subset of products is needed enter Control-C
and invoke /cdrom/Solaris_10/Tools/add_to_install_server with the -s option.

Checking required disk space...
-
Copying Top Level installer...
132688 blocks

Copying Tools Directory...
4320 blocks

Processing completed successfully.
---------------------------------------
Adding the file sol-10-u2-ga-sparc-v3.iso ...
/dev/lofi/1

The following Products will be copied to /export/install/solaris.10/Solaris_10/Product:
Solaris_3

If only a subset of products is needed enter Control-C
and invoke /cdrom/Solaris_10/Tools/add_to_install_server with the -s option.

Checking required disk space…
|
Copying Top Level installer...
132688 blocks

Copying Tools Directory...
4320 blocks

Processing completed successfully.
---------------------------------------
Adding the file sol-10-u2-ga-sparc-v4.iso ...
/dev/lofi/1

The following Products will be copied to /export/install/solaris.10/Solaris_10/Product:
Solaris_4

If only a subset of products is needed enter Control-C
and invoke /cdrom/Solaris_10/Tools/add_to_install_server with the -s option.

Checking required disk space...
\
Copying Top Level installer...
132688 blocks

Copying Tools Directory...
4320 blocks

Processing completed successfully.
---------------------------------------
Adding the file sol-10-u2-ga-sparc-v5.iso ...
/dev/lofi/1

The following Products will be copied to /export/install/solaris.10/Solaris_10/Product:
Solaris_5

If only a subset of products is needed enter Control-C
and invoke /cdrom/Solaris_10/Tools/add_to_install_server with the -s option.

Checking required disk space...
\
Copying the Early Access products...
56368 blocks

Copying Top Level installer...
132688 blocks

Copying Tools Directory...
4320 blocks

Processing completed successfully.
#

#  rm -r /cdrom/s0  /cdrom/s1
#
# du -k -s /export/install/solaris.10
2513095 /export/install/solaris.10
#

4.3 修改Jumpstart server系統(tǒng)文件及設(shè)置NFS 服務(wù)器

# vi /etc/inet/hosts

192.168.1.45   jpclient         jpclient.mydomain.com
(added one line)
#
# vi /etc/ethers

     0:17:4f:0f:42:b0  jpclient
(added one line)
#
# cat /etc/dfs/dfstab | grep share | grep -v "^#"
share -F nfs -o ro,anon=0 /jumpstart
share -F nfs -o ro,root=jpclient /export/install
#                             
# /etc/init.d/nfs.server stop
# /etc/init.d/nfs.server start
#

4.4 創(chuàng)建Jumpstart server所需的文檔及腳本

Jumpstart server所需的腳本及文檔樣板等, 一定要從加載了Solaris10 CD images 的地方復(fù)制過來。Soalris9 的不可以用在Solairs10 上。
  
# cp –pr /export/install/solaris.10/Solaris_10/Misc/jumpstart_sample /jumpstart
# cd /jumpstart/jumpstart_sample
# cp -pr ./[a-]* ../
#

以下是建好的腳本及幾個文檔。
在以下的sysidcfg里,網(wǎng)絡(luò)服務(wù)只有DNS, 沒有其它的。預(yù)設(shè)的root_password 是 “ilovecu”。

$ cd  /jumpstart
$ cat sysidcfg                 
name_service=DNS {domain_name= mydomain.com
                                  name_server=192168.1.1, 192168.1.2, 192168.1.3
                                  search= mydomain.com }
network_interface=PRIMARY {hostname=jpclient                           
                                             default_route=192.168.1.10
                                              ip_address=192.168.1.45
                                              netmask=255.255.255.0
                                              protocol_ipv6=no}
root_password=Zftjq7R1BwPdE
security_policy=NONE
system_locale=en_US
terminal=sun-cmd
timeserver=localhost
timezone=Asia/Shanghai
$

$ cat rules
hostname jpclient        -       profile.u45     finish.u45
$

下面的profile.u45 里,3塊盤的各個分區(qū)都可以看到。需要說明的是,這里分區(qū)的大小是以是MB來計算,但是metadb 的大小是以 blocks來計算。這里 每塊盤上都設(shè)了metadb, 還設(shè)了大。8MB)及count =5。 這只是為了在盤上給分區(qū)6留出足夠的空間。因為在profile里,沒法直接設(shè)置metadb所在的分區(qū)使用多少 空間。兩個給hot spare pool用的分區(qū) 沒有設(shè)置掛載點。每塊盤上剩余的空間都劃給分區(qū) 7。

$ cat profile.u45
# profile.u45
# susbin@chinaunix.net
# 122706

install_type    initial_install
system_type     standalone
partitioning    explicit

cluster         SUNWCreq        # Core, 260mb. Take about 10 min. Good for testing.
#cluster        SUNWCuser       # End user, 2.7gb. Take about 25 min.
#cluster        SUNWCprog       # Developer, 3.5gb
#cluster         SUNWCXall       # Entire+OEM, 3.8gb. Take about 35 min.

geo             Asia

filesys         mirror:d10 c1t0d0s0 c1t1d0s0 16384 / logging
filesys         mirror:d20 c1t0d0s1 c1t1d0s1 8192 swap

filesys         c1t0d0s3 16384 /arch1 logging
filesys         c1t0d0s4 16384 /arch2 logging
filesys         c1t0d0s5 16384 /arch3 logging
filesys         c1t0d0s7 free /data0 logging

filesys         c1t1d0s3 16384 /u04 logging
filesys         c1t1d0s4 16384 /u05 logging
filesys         c1t1d0s5 16384 /u06 logging
filesys         c1t1d0s7 free /data1 logging

# hot spare pool for d10 and d20
filesys         c1t2d0s0 16384
filesys         c1t2d0s1 8192

filesys         c1t2d0s3 16384 /u01 logging
filesys         c1t2d0s4 16384 /u02 logging
filesys         c1t2d0s5 16384 /u03 logging
filesys         c1t2d0s7 free /data2 logging

metadb          c1t0d0s6 size 16384 count 5
metadb          c1t1d0s6 size 16384 count 5
metadb          c1t2d0s6 size 16384 count 5

# Install Recommended patch cluster. Take about 15 min. or more.
#patch           patch_order nfs  192.168.1.48:/export/install/10_Recommended retry 5
$

現(xiàn)在Solairs10 Jumpstart 可以安裝補丁。 下載的補丁可以放在 NFS server, HTTP server, 或local device 上的文件夾里。還要建一個文件, 里面列出所要安裝的補丁的名字,比如, 118371-98。
前面  profile.u45 的最后一行, 作用就是安裝補丁。這里利用了 Sun補丁包里自帶的文件patch_order。如果想加一個新的補丁到Recommended patch cluster 里, 比如118371-99,要把下載的補丁118371-99放到安裝服務(wù)器上的文件夾 /export/install/10_Recommended 里,還要在文件patch_order 里加上一行: 118371-99。安裝補丁這個功能很好用, 已經(jīng)裝了4臺機器, 沒發(fā)生過任何問題。

Solairs10 Jumpstart 還新增了一項 “安裝軟件包” 的功能, 但它只能安裝有這類名字的軟件包:  SUNWname。  以常用軟件tcp_wrappers 為例,  Jumpstart能安裝軟件包SUNWtcpd, 但它不能安裝從www.sunfreeware.com  下載的tcp_wrappers-7.6-sol10-sparc-local。
使用命令pkgtrans 可以把一個tcp_wrappers-7.6-sol10-sparc-local 形式的包轉(zhuǎn)換成SUNWtcpd 形式的包(a datastream to a file system format)。但實際使用起來,轉(zhuǎn)換還是比較麻煩。因此, 在finish.u45 的最后部分, 專門寫了一小段來直接安裝從www.sunfreeware.com 下載的軟件包。

$ cat finish.u45
#!/bin/sh
# susbin@chinaunix.net
# 122706

# Set variables
src_dir=${SI_CONFIG_DIR}/client.files
base=/a
base_etc=/a/etc
base_sc=/a/usr/local/scripts
base_cron=/a/var/spool/cron/crontabs
t_stamp=`date '+%m_%d_%y-%H:%M:%S'`

echo "Starting finish script at $t_stamp ... "
echo " "

# Create a directory for scripts on the jumpstart client
mkdir -p $base_sc
chmod 777 $base_sc

# Disable power mangement
touch ${base}/noautoshutdown
ls -l ${base}/noautoshutdown

# Avoid the NFS4 question
/usr/bin/touch ${base_etc}/.NFS4inst_state.domain
ls -l ${base_etc}/.NFS4inst_state.domain
echo " "

# Configure boot PROM
altdisk=/dev/rdsk/c1t1d0s0
alts0=`ls -l  ${base}$altdisk $altdisk | sed 's/devices/,/' | cut -d ',' -f2,3,4`
eeprom > ${base_sc}/eeprom.$t_stamp
eeprom "local-mac-address?"=true
eeprom nvramrc="devalias altdisk ${alts0}"
eeprom "use-nvramrc?"=ture
eeprom boot-device="disk altdisk disk1 net"
eeprom > ${base_sc}/eeprom.$t_stamp
echo " "
eeprom | grep local-mac-address
eeprom | grep nvramrc
eeprom | grep boot-device

# Make the altdisk bootable, even when disk0 is gone.
installboot ${base}${altdisk}/usr/platform/`uname -i`/lib/fs/ufs/bootblk $altdisk
cp –p ${base_etc}/system ${base_etc}/system.$t_stamp
echo "set md:mirrored_root_flag=1" >> ${base_etc}/system
echo " "
tail -1 ${base_etc}/system

# Configuring network and inetd service
cp ${base_etc}/inet/netmasks ${base_etc}/inet/netmasks.$t_stamp
cp ${src_dir}/netmasks ${base_etc}/inet
touch ${base_etc}/notrouter
cp ${src_dir}/hosts.[a-d]* ${base_etc}
cp ${src_dir}/site.xml ${base}/var/svc/profile
echo " "
ls -l ${base_etc}/hosts.[a-d]*
ls -l ${base}/var/svc/profile/site.xml

# Confuguring ntp
cp ${src_dir}/ntp.conf ${base_etc}/inet
if [ ! -d ${base}/var/ntp ]; then
  mkdir ${base}/var/ntp
fi
touch ${base}/var/ntp/ntp.drift
echo " "
ls -l ${base}/var/ntp/ntp.drift

# Setup crontab of root
cp -p ${base_cron}/root ${base_cron}/root.$t_stamp
cp ${src_dir}/crontab.root $base_cron/root
chown root:sys ${base_cron}/root
chmod 600 ${base_cron}/root
echo " "
ls -l ${base_cron}/root

# Copy my scripts to the jumpstart client
cp ${src_dir}/[a-z]*.*sh $base_sc
chmod 755 ${base_sc}/[a-z]*.*sh
mkdir ${base}/usr/local/bin
cp ${src_dir}/mdsave ${base}/usr/local/bin
chmod 755 ${base}/usr/local/bin/mdsave
mkdir ${base_etc}/lvm/recover

# Copy other files to the new system
cp ${src_dir}/kshrc $base_sc
cp ${src_dir}/[a-z]*.profile $base_sc
cp ${src_dir}/pkg.adm.file $base_sc
echo " "
ls -l ${base_sc}/pkg.adm.file

# Install third-party packages
jp_server=192.168.1.48
pkg_dir=/export/install/10_pkgs
adm_file=${base_sc}/pkg.adm.file
local_pkg_dir=/tmp/3rd.pkgs

mkdir $local_pkg_dir
# mount  ${jp_server}pkg_dir  $local_pkg_dir 因為有表情符號,所以換成下面一行。
mount  ${jp_server}:/export/install/10_pkgs  $local_pkg_dir

if [ $? = 0 ] ; then
  echo " "
  echo "Installing third party packages... "
  pkg_list=`ls ${local_pkg_dir}`
  for PKG in $pkg_list
  do
  pkgadd -n -a $adm_file -R $base -d ${local_pkg_dir}/$PKG all
  done

  umount $local_pkg_dir
  rm -r $local_pkg_dir
  echo " "
  echo "Third party packages installation is done. "
else
  echo "Could not mount $local_pkg_dir ."
  echo "No third party packages are installed."
fi

echo " "
echo "Ended  finish script at $t_stamp ."

exit 0
$

以上腳本里每一段都是相對獨立的。如果不想做某一段, 可以把這一段刪去。比如,
# Configure boot PROM 這一段, 如果不想做, 就可以刪掉。有些機器只有一個網(wǎng)卡, 就不需要設(shè)local-mac-address, 所以也可把這一行刪掉。
關(guān)于在JumpStart 安裝中設(shè)置boot PROM,在Sun 的安裝文檔里沒有找到例子。在網(wǎng)上搜了一下, 也沒有找到有關(guān)文章。使用了幾次, 到目前為止還沒有發(fā)現(xiàn)問題.。希望用過這種方法的朋友指教。

關(guān)于 # Avoid the NFS4 question的更多內(nèi)容可參見參考文章 (10)。

在腳本finish.u45里有幾處需要用到事先準(zhǔn)備好的文件,下面把它們的內(nèi)容列出來:

$ cd /jumpstart/client.files
$ cat hosts.allow
ALL:    192.168.1.  .mydomain.com
$
$ cat hosts.deny
ALL:ALL
$
$ cat ntp.conf
driftfile  /var/ntp/ntp.drift
server 1.cn.pool.ntp.org
server 0.asia.pool.ntp.org
server 2.asia.pool.ntp.org
$
$ cat site.xml
<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<service_bundle type='profile' name='default'>
     <service name='network/ntp' type='service' version='0'>
          <instance name='default' enabled='true'/>
     </service>
     <service name='network/ftp' type='service' version='0'>
          <instance name='default' enabled='true'/>
     </service>
</service_bundle>

前面site.xml 文件的作用是把ntp和 ftp 服務(wù)設(shè)置為online。如果安裝了Solaris10 全部內(nèi)容
“cluster         SUNWCXall       # Entire+OEM, 3.8gb. Take about 35 min”,
那么Solaris10 SMF 是會把ntp, ftp和 telnet 服務(wù)預(yù)設(shè)為 disabled。用site.xml可以對SMF 管理的服務(wù)做適當(dāng)?shù)恼{(diào)整。有關(guān)設(shè)置SMF的討論可參見參考文章 (9)。

$ cat pkg.adm.file
mail=
instance=unique
partial=nocheck
runlevel=nocheck
idepend=nocheck
rdepend=nocheck
space=nocheck
setuid=nocheck
conflict=nocheck
action=nocheck
networktimeout=60
networkretries=3
authentication=nocheck
keystore=${BASE}/var/sadm/security
proxy=
basedir=default
$
上面自建的pkg.adm.file,是為在Jumpstart 中安裝第三方提供的軟件包準(zhǔn)備的。安裝時要讓 pkgadd 去讀這個文件(installation administration file),得到全部問題的答案,這樣在與系統(tǒng)的互動問答上就不會發(fā)生問題。

5. 加入 Client  及檢查Jumpstart server的設(shè)置

# cd  /jumpstart
# ./check
Validating rules...
Validating profile profile.u45...
The custom JumpStart configuration is ok.
#

# cd /export/install/solaris.10/Solaris_10/Tools
# ./add_install_client -s jpserver:/export/install/solaris.10 \
>  -c jpserver:/jumpstart -p jpserver:/jumpstart jpclient sun4u
updating /etc/bootparams
#

檢查Jumpstart server設(shè)置得是否正確,還有其他方法。參考文章 (1), (5)里面有比較詳細的介紹。

6.測試及正式安裝

如果Jumpstart server 是新建的,一般在正式安裝之前,要測試一下。因為硬件的連接和軟件的設(shè)置都可能會有問題。在前面的profile.u45 里,有這樣一行,用它來做測試就很合適:
cluster        SUNWCreq        # Core, 260mb. Take about 10 min. Good for testing.

因為這樣只裝了一個最基本的Core, 許多服務(wù)是沒有的,啟動時會看到一些報錯信息。做測試時,profile.u45 里的最后一行也可以不讓它起作用,因為安裝補丁比較費時間。
#patch           patch_order nfs  192.168.1.48:/export/install/10_Recommended retry 5

另外,# Configure boot PROM 這一段如果在測試的時候做過,在正式安裝時就不用再做了。

開始在 Client 上安裝,要打入命令:

ok boot net – install nowin

如果遇到問題,就要根據(jù)報錯內(nèi)容去找出原因,然后把問題解決。本文末尾的參考文章 (5) 和 (3) 提供了排錯的理論及實例。

安裝結(jié)束后一定要在Client 上檢查以下文件,確認安裝中是否有問題出現(xiàn)。

$ ls –l  /var/sadm/system/logs
total 332
lrwxrwxrwx   1 root     root          20 Dec 21 16:29 begin.log -> begin.log_2006_12_21
-rw-r--r--   1 root     root          90 Dec 21 15:48 begin.log_2006_12_21
lrwxrwxrwx   1 root     root          21 Dec 21 16:29 finish.log -> finish.log_2006_12_21
-rw-r--r--   1 root     root         524 Dec 21 16:29 finish.log_2006_12_21
-rw-r--r--   1 root     root         232 Dec 21 16:34 install_launch.log_2006_12_21_1632
-rw-r--r--   1 root     root      108108 Dec 21 16:28 install_log
-rw-r--r--   1 root     root       39932 Dec 21 16:37 sysidtool.log

$

正式安裝完成后,還需要在 Jumpstart server 上執(zhí)行以下命令:

# /etc/init.d/nfs.server stop
#
# cd /export/install/solaris.10/Solaris_10/Tools
# ./rm_install_client jpclient
removing jpclient from bootparams
#


結(jié)束語

一個系統(tǒng)安裝好了, 往往還要做一些安裝后的設(shè)置。比如, 提高或加強系統(tǒng)的安全性(Hardening system),設(shè)置root用戶的環(huán)境變量等。在網(wǎng)上看到過幾個腳本, 但都不很完善。參考文章 (7) 就給出了一個例子。
Sun 也提供了一個工具  JumpStart Enterprise Toolkit   http://www.sun.com/bigadmin/content/jet/
因為從來沒用過這個工具, 希望將來在本版能看到這方面的討論。


參考文章:

A. CU
(1) Jumpstart安裝實例                                                                        bear, 2002-6-13
(2) lofsadm的用法,可以用這個命令不光盤裝oracle和其它軟件                           南非蜘蛛 , 2002-8-2
(3) 用DVD制作9的網(wǎng)絡(luò)安裝服務(wù)器以及遇到問題的解決                                     race, 2003-11-5
(4) Solaris9的jumpstart服務(wù)器配置中文詳解(從原理到實踐)                             yanghz, 2004-12-3
(5) Solaris 9網(wǎng)絡(luò)安裝實例及說明                                                              Philmoon, 2006-12-28

B. Internet
(6) Automatically Mirroring the Boot Disk with Custom JumpStart               Matthew Cheek, Apr, 2004
(7) jumpstart finish script                                                                   Paveza, Gary, Apr, 2005
( 8 )  A CD-Free Installer for the Solaris OS                                           Mohd Akhbar Jamaludin, May, 2005
(9) Liane Praza's Weblog                                                                    Liane Praza, Jun, 2005
(10) override the system's default NFS version 4 domain name                  chilimonkey , Dec 2005
(11) Using Solaris JumpStart With the Solaris 10 OS for x86/x64 Platforms
                                                                               Craig Winter and Dale Layfield, March 2007

[ 本帖最后由 susbin 于 2007-6-4 11:06 編輯 ]

論壇徽章:
0
3 [報告]
發(fā)表于 2007-02-03 10:03 |只看該作者
2007-2-3 04:36   


牛人
我是拿個時候在工作

辛苦了

有一個精華貼子出爐了。!

論壇徽章:
0
4 [報告]
發(fā)表于 2007-02-03 11:04 |只看該作者
ding頂 好貨

論壇徽章:
0
5 [報告]
發(fā)表于 2007-02-03 12:34 |只看該作者
學(xué)習(xí)!

論壇徽章:
0
6 [報告]
發(fā)表于 2007-02-03 13:19 |只看該作者
能否在寫一下,通過jumpstart將os的補丁打到最新

論壇徽章:
0
7 [報告]
發(fā)表于 2007-02-03 19:11 |只看該作者
經(jīng)典好文啊,不知道什么時候有機會照著做一遍!

論壇徽章:
0
8 [報告]
發(fā)表于 2007-02-03 22:38 |只看該作者
原帖由 testtest111 于 2007-2-3 13:19 發(fā)表
能否在寫一下,通過jumpstart將os的補丁打到最新


Sun JumpStart 安裝文檔里講了兩種安裝補丁的方法,可以選一種方法來做。
下面這一段里就有例子。

Patches Stored on an NFS Server
If the patch is stored on an NFS server, use one of the following syntaxes for the patch keyword.
patch patch_id_list | patch_file nfs server_name:/patch_directory [retry n]
patch patch_id_list | patch_file nfs://server_name/patch_director [retry n]

patch_id_list Specifies the patch ID numbers that are to be installed. The list should be a list of
comma-separated Solaris patch IDs. The patches are installed in the order
specified in the list.

patch_file Afile with a list of patches that is found in the patch_location. The patches are
installed in the order specified in the file.

server_name Specifies the name of the server where you stored the patches.
patch_directory Specifies the location of the patch directory on the specified server. The patches
must be in standard patch format.

retry n Is an optional keyword. n is the maximum number of times the install utility
attempts to mount the directory.

EXAMPLE 11–18 Adding a PatchWith an Ordered List by Using NFS
In this example, the patch profile keyword adds all the patches listed in the patch file from the NFS
patch directory nfs://patch_master/Solaris/v10_606/patches. Patches are installed in the order
listed in the patch. If a mount fails, the NFS mount is tried five times.

patch patch_file nfs://patch_master/Solaris/v10_606/patches retry 5

EXAMPLE 11–19 Adding a Patch by Using NFS
In this example, the patch profile keyword adds the patches 112467–01 and 112765–02 from the
patch directory /Solaris/v10_606/patches on the server patch_master.

patch 112467-01,112765-02 nfs patch_master:/Solaris/v10_606/patches

[ 本帖最后由 susbin 于 2007-2-4 04:13 編輯 ]

論壇徽章:
0
9 [報告]
發(fā)表于 2007-02-06 08:49 |只看該作者
請版主看一下此貼,是否具備加入精華的條件。

如果不夠,請指出不足之處。謝謝。


小蝦偶在CU還是新手,也請各位路過大俠多提意見。小蝦這廂有禮了。

論壇徽章:
0
10 [報告]
發(fā)表于 2007-02-06 10:20 |只看該作者
支持這么好的文章.絕對應(yīng)該加入精華.
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP