????????????????, ???K????????~~ ????Ben?????c????, ????????????????????: ????, ????????...@???????bopensolaris, ????????local?O????repository server. ??????Demo???????b. ????????????, ?X????????????????Repository?b??USB?e, ???X????????. ????, ??????????script?????o????????. PS. script????????????, ?????????????P????.
?????f??????????????, 1. ???d 0906 repository file. 2. ?O??service svc://appllication/pkg/server, 3. ?O??package manager. ??????????????????, 1. ????/etc/hosts??entry, ??????????pkg/server 2. package manager????opensolaris.org???Q??local repository, ???????????^?????w??opensolaris.org, ?????????d source??????. regards, Stanley Huang script: ----------------------------------------------------------------------------- #!/usr/bin/bash clear set -f ## noglob fRepoISO=/Karajon/ISOs/osol-repo-0906-full.iso dMP=/mnt/repo && pfexec mkdir -p $dMP fsRepo=rpool/repo && pfexec zfs create -o compression=on $fsRepo 2>/dev/null dRepo=`zfs get -H mountpoint $fsRepo | awk '{print($3)}'` sHost=192.168.1.100 sHostname=stanley-nb nPort=81 sIF=yge0:1 fBackupPublisher=/PkgPublisher.bak cat <<EOF Repository Full ISO Image : $fRepoISO Iso Image Mount Point : $dMP Repository ZFS File System : $fsRepo Repository ZFS Directory : $dRepo Repository Host : $sHost Repository Hostname : $sHostname Repository Server Port : $nPort Repository Binding Interface : $sIF Backup Publisher File : $fBackupPublisher EOF read -p "Are all setting correct (yes/NO)? " yN [ "$yN" != "yes" ] && [ "$yN" != "YES" ] && exit 0 addHosts() { grep "^$sHost[ ]" /etc/hosts | grep $sHostname >/dev/null || echo "$sHost $sHostname" >> /etc/hosts } setPkgServerProp() { pfexec svccfg -s application/pkg/server setprop pkg/inst_root=$dRepo/repo pfexec svccfg -s application/pkg/server setprop pkg/readonly=true pfexec svccfg -s application/pkg/server setprop pkg/port=$nPort } modifyPkgServerCfg() { pfexec perl -pi -e "s|^origins.*|origins = http://$sHost:$nPort|" $dRepo/repo/cfg_cache } bindingIF() { ifconfig $sIF plumb set $sHost up } randrServer() { pfexec svcadm refresh application/pkg/server pfexec svcadm restart application/pkg/server } backupPublisher() { if [ -f /$fBackupPublisher ] then read -p "Backup file exists($fBackupPublisher), Do you want to overwrite it (Y/n)?" Yn if [ "$Yn" == "N" ] || [ "$Yn" == "n" ] then exit fi fi pfexec pkg publisher > /$fBackupPublisher } modifyPublisherName() { pfexec pkg set-publisher -O http://$sHost:$nPort opensolaris.org } showPkgCmds() { cat <<EOF To change repository, please use following commands: # pfexec pkg set-publisher -m http://$sHost:$nPort local-repository # pkg publisher # pfexec pkg set-publisher -M http://$sHost:$nPort local-repository # pfexec pkg set-publisher -O http://$sHost:$nPort local-repository EOF } ############################################# main addHosts setPkgServerProp modifyPkgServerCfg bindingIF randrServer backupPublisher modifyPublisherName showPkgCmds ----------------------------------------------------------------------------- Ben Wu <Ben-Hp.Wu at sun.com> ?? 2010??2??4??????10:57 ?????? > ?x?x Wayne ??...@???w?????????a?????????@?? ISO ???o???????_?C???????b > ?????????????????????????? IPS > repository??????????...@?????}???d?????? > ?????????????????o?????e...@?e?????????????????????????????? :-D ?? > > ?????????????????????????? mirror ??????????????????????...@?????w???????d?? > > http://ftp.cs.pu.edu.tw/pub/opensolaris/ > ftp://ftp.net.nsysu.edu.tw/ > > > Ben > > -- > Ben Wu > Software Architect Open Community > Sun Microsystems Taiwan Ltd. > TEL: +886 2 8758 4691 > Mobile: +886 988 280584 Email: ben-hp.wu at sun.com > > > ?? 10??02??04?? 08:03, W. Wayne Liauh ????: > > ?????????? OpenSolaris0906 ??DVD ?????????????? packages)?? ?????????????? >> >> >> http://dlc-cdn-rd.sun.com/c1/osol/opensolaris/2009/06/?e=1265241678&h=100d711a010f2fdfc94b5b8d80b4f997 >> >> ???? >> >> http://tinyurl.com/os0906-dvd >> >> ?? >> >> [BIN] osol-repo-0906-full.iso ?????? >> >> >> >> >> >> >> >>> ????????????????OpenSolaris????????????????????????????????????????????????????????????Solar >>> is 10 download ???? ??????????????update 8): >>> >>> http://www.sun.com/software/solaris/get.jsp >>> >>> Solaris 10 ???????? StarOffice 9 ?? StarSuite >>> 9??????????????????????100 ?????? ?????????????????????????????????? >>> >>> Dual-booting Solaris/OpenSolaris >>> ?K??????????????????????????????????????????Solaris ??OpenSolaris >>> ?????????? zfs >>> root pool: >>> >>> http://blogs.sun.com/mrj/entry/solaris_10_and_opensola >>> ris_on >>> >>> ?????????????? ?????????????????????????? dual-boot, ???? Solaris 10 >>> ????????????????OpenSolaris >>> ????????????????????????????????????????OpenSolaris???????????? >>> >>> >> _______________________________________________ > ug-twosug mailing list > ug-twosug at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/ug-twosug > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/ug-twosug/attachments/20100205/c91070a7/attachment.html>