Anda di halaman 1dari 17

TakingYourFirstStepswithOracleSolaris11

November2011 b yBrianLeonardandGlynnFoster Note:ThisarticlereplacestheSolaris11Expressversion.OracleSolaris11ExpressisnolongersupportedbyOracle. AnintroductiontoinstallingOracleSolaris11,includingthestepsforinstallingnewsoftwareandadministeringothersystemconfiguration.

OracleSolaris11isdistributedwithseveraldifferentinstallationoptions:ahandsfreeautomatedserverbasedinstall,aninteractivetextbased installthatisalsosuitableforservers,andaninteractivegraphicalinstallerthatincludesafulldesktopenvironment. Thisarticlefocusesontheinteractivegraphicalinstaller,althoughmanyoftheconceptsdiscussedinthis articleapplytotheotherOracleSolaris11installationoptions.UserscomingfromOracleSolaris10areurged totakealookattheTransitioningfromOracleSolaris10toOracleSolaris11guide. Thegraphicalinstallerisofficiallyknownasthe"LiveMedia."ThismeansthatOracleSolariscanbebooted intoRAM,causingzeroimpactonyourexistingoperatingsystem.Afteritisloaded,youarefreetoexperiment withOracleSolaristodeterminewhetheritissomethingyouwouldliketoinstalltoyoursystem. YoucandownloadOracleSolaris11LiveMediaforx86,whichisanapproximately800MBimagefile,anduse aDVDburnertocreatethedisk,oryoucanusetheISOimagedirectlyinavirtualmachineorthroughthe OracleIntegratedLightsOutManager(ILOM)RemoteConsole. TheLiveMediaisnotintendedforlongtermuse.Forexample,anychangesthatyoumaketothesystemare lostwhenthesystemisshutdown.Therefore,thenextlogicalstepistoinstallOracleSolarisonthesystem, whichtheLiveMediamakeseasybyplacinganInstallOracleSolarisiconrightonthedesktop.Butbeforewe headdownthatroad,let'sstepbackabitandconsidertheinstallationoptions.

OTNisallabouthelping youbecomefamiliar enoughwithOracle technologiestomakean informeddecision.Articles, softwaredownloads, documentation,andmore. Joinupandgetthe technicalresourcesyou needtodoyourjob.

InstallationOptions
YouhaveseveralalternativesforwheretoinstallOracleSolaris11: Insideavirtualmachineontopofyourexistingoperatingsystem Onthebaremetalasastandaloneoperatingsystem Onthebaremetalalongsideyourexistingoperatingsystem(s)(multibootscenario) InstallingInsideaVirtualMachine TheeasiestwaytostartusingOracleSolaris11istoinstallitintoavirtualmachineontopofyourexistingoperatingsystem.Figure1showsOracle Solaris11installedonAppleOSXusingOracleVMVirtualBox.

Figure1.OracleSolarisonAppleOSX YouareguaranteedthatOracleSolaris11willrecognizethevirtualizeddevicesthatthevirtualmachineprovides.IfyourunOracleSolaris11infull screenmode,youmightactuallyforgetthatthere'sanotheroperatingsystemunderneath. Theonedrawbacktothisapproachisthatyouneedenoughmemorytoruntwooperatingsystemssimultaneouslyaminimumof2GBis recommendedforgoodperformance.Youshouldalsoallowaminimumof7GBofdiskspacetoinstalltheoperatingsystem. OracleVMVirtualBoxisafreetodownloadhypervisorthatsupportsMicrosoftWindows,AppleOSX,Linux,andOracleSolarisashostplatforms,and, ofcourse,OracleSolarisasoneofitsmanyguests.Oraclemakesiteasytotrythisapproachbyalsoofferinganumberofpreinstalledvirtual machinesforOracleVMVirtualBoxthatarefocusedtowardsaspecificuse,forexample,toevaluatethedevelopertoolsthatareavailableonOracle Solaris11. AfteryouhavebootedofftheLiveMedia,theinstallationprocessisstraightforward.SimplyclicktheInstallOracleSolarisicononthedesktopto launchthegraphicalinstaller,showninFigure2.

Figure2.TheOracleSolarisGraphicalInstaller AsyoucanseefromFigure2,theinstallationprocessissimpleandaskssomebasicquestionsbeforelayingdownafixedsetofpackages.After OracleSolarishassuccessfullybeeninstalled,youcaneasilycustomizetheinstallationbyusingthePackageManager. Aftertheinstallationprocessiscomplete,youcansimplyrebootintoyournewOracleSolarisenvironmentorreviewtheOracleSolarisinstallation log,asshowninFigure3.

Figure3.ReviewingtheInstallationLog InstallingonBareMetalasaStandaloneSystem Ifyouhaveanx86systemtodedicatetoOracleSolaris11,thisinstallationprocessisreallythesameasinstallingtheOSintoavirtualmachine. SimplyboottheLiveMediaandstartupthegraphicalinstaller. ThebiggestquestionwiththisapproachiswhetherOracleSolaris11hastheproperdriversforyourhardwaredevices.IfyouruntheLiveMedia,you caneasilydeterminehowwellyourdevicesaresupported.OnthedesktopoftheLiveMedia,thereisaniconfortheDeviceDriverUtility,whichis showninFigure4.Doubleclicktheiconandwaitforthescantocomplete. WhilebootingofftheLiveMedia,thedefaultuserloginandpasswordisj c .Ifyouneedtobecometherootuser,youcanusethepassword ak slrs o a i .Later,wewilldiscussmoreabouthowtheinitialuserissetupduringtheOracleSolarisinstallation.

Figure4.TheOracleSolarisDeviceDriverUtility Ifdriversaremissing,theutilityprovidespointersonwheretolookforhelp.Googleisalsoyourfriendhere,butifyoutrulyhitadeadend,OracleVM VirtualBoxmightbeabettersolutionuntilthedriveryouneedbecomesavailableoruntilyoubuyanewsystemorthecomponentsnecessarytosolve thedriverproblems. IfyouaretryingtoinstallOracleSolaris11ontoaSPARCbasedsystem,youwillhavetousetheInteractiveTextInstaller.UnliketheLiveMedia,this installationinstallsaselectionofsoftwarethatissuitableforaserverorientedenvironment.Itdoesnotincludeadesktopenvironment.Afterthe initialinstallation,youcaninstallafulldesktopenvironmentbyusingthePackageManagertoinstallthes l r s d s t p o a i e k o package. InstallingonBareMetalinaMultibootScenario Inamultibootscenario,youinstallOracleSolaris11onthebaremetalalongsideyourexistingoperatingsystem(s).Thisscenarioisthemost complicatedandrequiressomepreparation. TheOracleSolaris11LiveMediaincludestheGNOMEPartitionEditor,GParted,whichyoucanusetopartitionyourharddisk.Youshouldcreatea partitionoftypeLinuxswap,whichtheOracleSolarisinstallerwillrecognize. IfWindowsisyourexistingOS,theOracleSolarisbootloaderwillrecognizeitwithoutdifficulty.IfLinuxisyourexistingOS,besuretobackupyour G U configurationfile,becauseyouwillneedtoadditsentriestotheOracleSolarisG U menu.ConsulttheOracleSolaris11product RB RB documentationthatisavailableforthesescenarios.

Users
NowthatyouhaveOracleSolaris11installed,let'sdiscusshowtheprivilegesassignedtotheuserIDthatyoucreatedduringinstallationallowyou toadministeryoursystem. Ifyourecall,duringinstallation,youcreatedauseraccount,asshowninFigure5.

Figure5.TheOracleSolarisGraphicalInstallerConfiguringUsers Theinstalleraskedyouforonlyasinglepassword,whichisusedasthepasswordforbothther o accountandtheinitialuseraccount.However, ot ther o passwordisimmediatelyexpired,asyou'llseeifyoutrytoswitchtor o : ot ot benr@oai:$s loadslrs~u Pswr: asod s:Pswrosr'otaxie uasodfruero'hseprd NwPswr: easod

GUItoolsrequiringadministratorprivilegeswillalsopromptyouforther o passwordinitiallyandthenexplainthattherootuserhasexpiredanda ot newpasswordmustbeprovided,asshowninFigure6:

Figure6.PromptforaNewr o Password ot Ther o Role ot Ifyoulookatthe/ t / a s d e c p s w file,youwillseer o defined. ot benr@oai:$ct/t/asd loadslrs~aecpsw ro::::uesr/ot/s/i/ah otx00SprUe:ro:urbnbs deo::::/ amnx11:: bnx22:urbn i::::/s/i: ssx33:: y::::/ amx44Amn/a/d: d::::di:vram l::18Lnrnedi:: px7::iePitrAmn/

.. .

However,youwillbefrustratedifyoutrytologinasr o .Forsecurityreasons,OracleSolaris11doesnotdefiner o asatraditionaluseraccount. ot ot Ifyoulookatthe/ t / s r a t file,youcanseethatr o isdefinedasarole,asshowninListing1. ecue_tr ot Listing1:Verifyingthatr o IsDefinedasaRole ot benr@oai:$ct/t/srat loadslrs~aecue_tr # #Tesservddetisaesoendfeetfls hytmpoienrertrdiifrnie #udr"ecue_trd.hysoloecpeotiie ne/t/srat."Tehudntboidthsfl. # #Oloahnehudbtrdihsfl. nylclcagssolesoentiie #Tiiesolekpntiieotwleoewitn hslnhudbetihsflriilbvrrte. # ro::tp=oe ot::yerl benr::tp=omllc_fe_ere=opoie=ytmAmnsrtrrlsro load::yenraokatrrtisnrflsSsediitaooe=ot

YoucanalsoseethattheuserIDcreatedbytheinstallerwasassignedther o rolebydefault.So,althoughyoucannotloginasr o ,youcan ot ot switchtother o role,whichwillpromptyouforther o password. ot ot Note:Whenusings ,thedefaultusernameisr o anditisnotrequired,asseenintheearlierexamplewherewechangedthedefaultpassword. u ot benr@oai:$sot loadslrs~uro Pswr: asod benr@oai:# loadslrs~

Thes d Command uo Inadditiontobeingassignedther o role,theusercreatedatinstalltimeisaddedtothe/ t / u o r file.The/ t / u o r fileiswell ot ecsdes ecsdes documentedandyoucandefineveryfinegrainedrulesastowhataparticularuserisallowedtodo.Inthecaseoftheusercreatedduring installation,theuserisallowedtodoeverything(justasiftheywerer o ).Here'swhattheentryfortheusercreatedduringinstallationlookslike: ot benrL=ALL loadAL(L)AL

Theentryaboveisstatingthatuserb e n r canrunanycommandonanyhostasanyuser.Forfurtherdetailsonhowtofinetuneauser's load privileges,seethes d e s u o r manpage. So,theoretically,youshouldneverhavetoswitchtother o roletoperformprivilegedoperations,forexample,towriteafiletotherootofthefile ot system: benr@oai:$tuh/ie loadslrs~ocfl1 tuhanttuh`fl1:Prisoeid oc:cnooc/ie'emsindne

However,prefixingthesamecommandwiths d givesmetheproperprivilegesnecessarytocompletetheoperation: uo benr@oai:$sdocfl1 loadslrs~uotuh/ie Pswr: asod

Notethatthepasswordrequiredbys d isnotther o password,butratheryouruseraccountpassword. uo ot Thebottomlinehereisthateverythingissetupforyou"outofthebox"withthedefaultinstallationofOracleSolaris11.TheuserIDyoucreatedat installtimeisabletofullyadministerthesystem.Withtherightprivileges,youcanproperlyadministeryoursystem,suchasmanagingsystem services,whichweaddressinthenextsection.

ServiceManagementFacility(SMF)
OracleSolaris11managessystemservicesthroughtheServiceManagementFacility(SMF).AlthoughaGUIisavailable,themorecommonand powerfulwaytomanageservicesistousethesecommandlinecommands:s c toreportservicestatusands c d tomanipulateservice vs vam instances.Forexample,runs c togetalistofthecurrentlyrunningservices,asshowninListing2. vs Listing2:GettingaListoftheCurrentlyRunningServices

benr@oai:$scmr loadslrs~vs|oe SAETMFR TTSIEMI lgc_u13:3lc/t/c_/4pp eayrn:22r:ecr2dS7pd lgc_u13:3lc/t/c_/8PEEV eayrn:22r:ecr2dS9RSRE dsbe12:2sc/ewr/pe/oiydfut iald:70v:ntokiscplc:eal oln12:1sc/ytmerymnfsmotdfut nie:31v:sse/alaietipr:eal oln12:1sc/ytmscrsatrdfut nie:31v:sse/v/etre:eal .. . oln13:9sc/ytmznsisaldfut nie:22v:sse/oentl:eal oln13:9sc/ytmznsdfut nie:22v:sse/oe:eal oln13:8sc/ytmcnoerstdfut nie:25v:sse/oslee:eal oln13:6sc/ytmomdfut nie:33v:sse/c:eal

SMFhasmanyadvantagescomparedtotheoldwayofusingUNIXservicesthroughstartupscripts.Thekeyadvantageisthespecificationof metadataabouteachserviceinamanifestfile.Thisallowsyoutospecifydependenciesbetweenservices,whichthenenablesindependent servicestobestartedinparallel,whichspeedsupthesystemboot.Also,whenservicesfail,theycanberestartedinthecorrectorderrelativetoeach other.Forexample,takealookatthes n m i service,usingthe optiontodisplayallavailableinformation,asshowninListing3. edal l Listing3:DisplayingInformationAboutaService benr@oai:$sclsnmi loadslrs~vsedal frv:ntokst:edal misc/ewr/mpsnmi nmedalSTaltasegn aesnmiMPmirnfraet ealdre nbetu saenie ttoln nx_ttoe etsaenn saetmcoe5010:22MND tt_ieOtbr,2113:3AZT lgievrsclgntokst:edallg ofl/a/v/o/ewrmpsnmi.o rsatrv:sse/v/etre:eal etresc/ytmscrsatrdfut cnrc_d7 otati13 mnfslbscmnfs/ewr/mpsnmi.m aiet/i/v/aietntokstedalxl dpneceur_l/ersie/lclotecmi/edalcoln) eednyrqiealrfehfl:/oahs/t/alsnmi.f(nie dpneceur_l/ersie/lclotecnsic.of(nie eednyrqiealrfehfl:/oahs/t/swthcnoln) dpnecpinlalnnv:sse/ieytmatfoln) eednyotoa_l/oesc/ytmflsse/uos(nie dpneceur_l/oesc/ytmflsse/oaoln) eednyrqiealnnv:sse/ieytmlcl(nie dpneceur_l/oesc/ewr/evcoln) eednyrqiealnnv:ntoksrie(nie dpneceur_l/ersv:mlsoenmevcs(nie eednyrqiealrfehsc/ietn/aesrieoln) dpnecpinlalrfehsc/ytmiett:oan(nie eednyotoa_l/ersv:sse/dniydmioln) dpnecpinlalnnv:sse/ytmlg(nie eednyotoa_l/oesc/ytmsseooln)

AtthebottomofListing3,youcanseetheservicesonwhichs n m i depends.Ifoneofservicesonwhichs n m i dependsfailstostartfor edal edal somereason,s n m i willnotevenattempttostart. edal Youcanalsoeasilydisable,enable,andrestartservicesbyusingthes c d command.Forexample,usethiscommandtodisablethes n m i vam edal service: benr@oai:$sdvamdsbesnmi loadslrs~uoscdialedal

Usingthe optionforthes c commandwillgiveyouanexplanationoftheservicestate: x vs benr@oai:$scxsnmi loadslrs~vsedal sc/ewr/mpsnmisnmiMPmirnfraet v:ntokst:edal(edalSTaltasegn) tt:dsbeiccoe5010:23MND SaeialdsneOtbr,2115:9AZT Rao:Dsbeyadiitao. esnialdbnamnsrtr e:ht:/u.o/s/M000 Setp/sncmmgSF805 e:snmi(M Seedal1) e:/a/v/o/ewrmpsnmi.o Sevrsclgntokst:edallg Ipc:Tievcsntrnig mathssrieiounn.

Notethatthisoutputalsoprovideslinkstofurtherinformationabouttheservicestate(h t : / u . o / s / M 0 0 0 )andtheserviceslogfile tp/sncmmgSF805 (/ a / v / o / e w r m p s n m i . o ),bothofwhichcanbeveryusefulintrackingdownservicefailures. vrsclgntokst:edallg Equally,wecouldalsohaveusedtheSMFServiceInspectorgraphicalinterfacefromtheAdministrationmenuinthedesktoppanel.Thisinterface allowssomeofthesamefunctionalityasthecommandline,includingtheabilitytodisable,refresh,andrestartsystemservicesandbrowselogsfor eachserviceinstance,asshowninFigure7.

Figure7.OracleSolarisSMFServiceInspector OracleSolaris11issecurebydefault.Whatthismeansisthatallnonessentialnetworkservicesaredisabledorconfiguredtoonlylistenfor connectionsfromthelocalsystemitself,thusreducingtheriskofanetworkbasedattack.Infact,onlySSH,aservicetoallowremotelogins,is enabled.

AdministeringtheNetwork
Oneofthefirstservicesthatyouneedtoadministeristhenetwork.OracleSolaris11usesNetworkConfigurationProfiles(NCPs)toapplynetwork configurationtoasystem.Bydefault,whenusingtheLiveMedia,thesystemusestheAutomaticNCP,whichautomaticallytriestoconnecttoa networkusingDHCP.Ifawirednetworkisavailable,itwillalwaysconnecttothisotherwise,itwilltrytoconnecttoawirelessnetwork. ThefirstplacetostartistheNetworkStatusiconfoundonthetoppanelofthedesktop.Thisiconindicateswhetheryouareconnectedtoawiredor wirelessnetworkoryouareoffline,asshowninFigure8.

Figure8.ThreeStatesoftheNetworkStatusIcon ClickingtheiconbringsuptheNetworkPreferencesdialogbox,asshowninFigure9.

Figure9.OracleSolarisNetworkPreferencesDialogBox FromtheNetworkPreferencesdialogbox,youcanseebothIPversion4andversion6addressesaswellasthenetworkspeedforthenetworklink thathasbeenconfigured,inthiscaseawiredinterface.AllnetworkinterfacesinOracleSolaris11areassignedvanityidentifiers,inthiscasen t , e0 whichnolongerreflectwhatunderlyingnetworkdriverisused.ThisisachangethatisnewtoOracleSolaris11comparedtopreviousreleases. Ifyouareinstallingontoalaptopandhavewirelessnetworking,youcanviewthelistofwirelessnetworksavailablebyrightclickingthestatusicon, asshowninFigure10.

Figure10.OracleSolarisWirelessNetworkOptions NetworkconfigurationismanagedusinganSMFservice,s c / e w r / h s c l d f u t v : n t o k p y i a : e a l ,andjustlikeanySMFservice,youcanviewthe statusoftheservicefromthecommandline,asshowninListing4. Listing4:ViewingtheStatusofanSMFService benr@oai:/eko$sclntokpyia:eal loadslrs~Dstpvsewr/hscldfut frv:ntokpyia:eal misc/ewr/hscldfut nmhsclntokitraecniuain aepyiaewrnefcofgrto ealdre nbetu saenie ttoln nx_ttoe etsaenn saetmcoe5010:64MND tt_ieOtbr,2112:6AZT lgievrsclgntokpyia:eal.o ofl/a/v/o/ewrhscldfutlg rsatrv:sse/v/etre:eal etresc/ytmscrsatrdfut cnrc_d2 otati6 mnfslbscmnfs/ietn/ofgxl aiet/i/v/aietmlsoecni.m dpnecpinlalnnv:mlsoecnioln) eednyotoa_l/oesc/ietn/ofg(nie dpneceur_l/oesc/ewr/pitraemngmnoln) eednyrqiealnnv:ntokinefcaaeet(nie dpneceur_l/oesc/ewr/aaikmngmnoln) eednyrqiealnnv:ntokdtlnaaeet(nie dpneceur_l/oesc/ewr/hsclugae(nie eednyrqiealnnv:ntokpyia:prdoln) dpnecpinlalnnv:ntokimoln) eednyotoa_l/oesc/ewr/pp(nie dpneceur_l/oesc/ewr/ecg(nie eednyrqiealnnv:ntokntfoln) dpnecpinlalnnv:ntokisal(iald eednyotoa_l/oesc/ewr/ntldsbe) dpneceur_l/oesc/ytmnmevc/prdoln) eednyrqiealnnv:sse/aesrieugae(nie dpneceur_l/oesc/ewr/opak(nie eednyrqiealnnv:ntoklobcoln) dpnecpinlalnnv:sse/aietiproln) eednyotoa_l/oesc/ytmmnfsmot(nie

Ifyouprefertomanageyournetworkmanually,youneedtoenabletheD f u t i e NetworkConfigurationProfile,asfollows: ealFxd benr@oai:$sdeamealpnpDfutie loadslrs~uontdnbecealFxd Pswr: asod EalncDfutie' nbignp'ealFxd

Youwillthenhavefullmanualcontroloverthenetworkconfigurationandcanproceedtousetheadministrativecommandsd a m l d andi a m p d to configureyournetwork,asshowninListing5. Listing5:ManuallyAdministeringaNetwork benr@oai:$damsohs loadslrs~ldhwpy LNMDATTSEDULXEIE IKEISAEPEDPEDVC ntEhrennw10ul10g e0tentukon00fle000 benr@oai:$iamsof loadslrs~pdhwi INMLSSAECIEOE FAECASTTATVVR l0opakoe olobckys benr@oai:$sdpdraeie0 loadslrs~uoiamcetpnt benr@oai:$iamsof loadslrs~pdhwi INMLSSAECIEOE FAECASTTATVVR l0opakoe olobckys ntpdwo e0ionn benr@oai:$sdpdraeadTsaia1...82e0vsai loadslrs~uoiamcetdrttc0021/4nt/4ttc benr@oai:$sdpdhwi loadslrs~uoiamsof INMLSSAECIEOE FAECASTTATVVR l0opakoe olobckys ntpoe e0ikys benr@oai:$iamsodr loadslrs~pdhwad ADOJYESAEDR DRBTPTTAD l0vttco2.../ o/4saik170018 nt/4ttcttco0021/4 e0vsaisaik1...82 l0vttco:/2 o/6saik:118

Wewillnotcovermanualnetworkconfiguration,networkconfigurationprofiles,ormanagingnamingservicesinthisarticle.Youcanreadmoreabout manualnetworkconfigurationintheexcellentOracleSolaris11productdocumentation.

WhereIsEverythinginOracleSolaris?
SowhereiseverythinginOracleSolaris11?Therootdirectory(/ )isnothardtounderstandforthoseaccustomedtoWindowsoperatingsystems.It's likethetopleveldirectoryonadrive(C \ ).ThekeydifferenceisthatOracleSolarisprovidesasingledirectoryhierarchythatstartsat/ :\ .So,unlike Windows,there'snoneedtospecifyadevice(forexample,C \ ,D \ ,andsoon)whenspecifyingafilename. :\ :\ OracleSolarisusesZFSasthedefaultrootfilesystem.ZFSprovidesthehighestlevelsofdataintegrity,anditincludesmanydifferentutilitiesto allowadministratorstoperformavarietyoftasks,forexample,databackupordataencryption. Table1showsvariouslocationsavailableinOracleSolarisfromwhichtorundifferentcommands.Thesearespecifiedbythevalueofthe environmentalvariable$ A H PT. Table1.LocationsandTheirContent Location /s/i urbn Content Nonessentialcommandbinaries(notneededinsingleusermode)for allusers. GNUversionsofpopularcommands.Wherethereisnoconflict, commandshavebeenincludedin/ s / i .Linuxuserscanset urbn / s / n / i tobeintheir$ A H urgubn P T atfirsttohaveamorefamiliar experience. Nonessentialsystembinaries,forexample,daemonsforvarious networkservices. Default Path Yes

/s/n/i urgubn

No

/s/bn ursi

Yes

Table2showssomeadditionallocationstonoteinOracleSolaris11. Table2.MoreOracleSolaris11LocationsandTheirContent Location /p ot Content Optionalapplicationsoftwarepackages.

Tertiaryhierarchyforlocaldata,specifictothishost.Typically,ithasfurther / s / o a subdirectories,forexample,/ s / o a / i / u r l c l l b ,and urlcl u r l c l b n ,/ s / o a / i / /s/oa/hr/ urlclsae. /t ec /a vr Staticsystemconfigurationdata. Variablefileswhosecontentisexpectedtocontinuallychangeduringnormal

/oe hm

operationofthesystem,suchaslogs,spoolfiles,andtemporaryemailfiles. Users'homedirectories,containingsavedfiles,personalsettings,andsoon.

Thehomedirectoriesareactuallyautomountedfrom/ x o t h m .FormoreinformationseetheAutomountedHomeDirectoryblog. epr/oe

ImagePackagingSystem(IPS)
BecauseOracleSolaris11isdesignedtofitonaCD,youmightdiscoverthatyouneedtoinstalladditionalsoftware.AkeydifferentiatorfromOracle Solaris10isthenewImagePackagingSystem(IPS)inOracleSolaris11.OneofthemaingoalsoftheIPSistoprovideanetworkrepositorybased deliverymechanism,whichiskindoflikeanappstore.OracleSolariscomeswithonerepositorypreconfigured,andyoucaneasilyaddmore.From here,youcanveryeasilyinstallmanyothersoftwarecomponentsthataren'tinthedefaultinstalls,eitherbyusingagraphicalorcommandlineclient. AnimportantfeatureofIPSisautomaticsoftwaredependencychecking.Whenyouselectapackagetoinstall,IPSdeterminesalltheotherrequired packagesthatareneededandensuresthattheseareinstalledaswell.Thereareanumberofgrouppackagesthatareavailabletoinstallfor commonselectionsofsoftware,forexample,adesktopenvironmentandaWebAMPstack. FindingandInstallingPackages YoucanuseeitherthePackageManagerGUI(availablefromtheSystem>Administrationmenu),showninFigure11,orthecommandlineto managethepackages.

Figure11.TheOracleSolarisPackageManager Fromthecommandline,themaincommandisp g k .Thep g k commandisalwaysintendedtoberunwithasubcommand,suchasl s ,s a c , it erh i f ,ori s a l no ntl. Forexample,usethep g l s commandtoseethelistofpackagescurrentlyinstalledonyoursystem,indicatedbyani kit inthefirstcolumnofI O F, asshowninListing6.Anf inthesecondcolumnindicatesthatthepackageisfrozen,andanr oro inthethirdcolumnindicatesthatpackagehas beenrenamedorobsoleted. Listing6:DeterminingWhatPackagesAreInstalled benr@oai:$pgls loadslrs~kit NMPBIHRVRINF AE(ULSE)ESOIO SNc051.7 UWs..1010ir acie/na12.7.....2 rhvrgutr.6015000055i adoadouiiis051.7..... ui/uitlte..101500000i at_ntl01016 uoisal..6i bnhakx1ef154015000011 ecmr/1pr...7.....25i cdcfa12101500000 oe/lc...7.....i cdclbhoa11101500000 oe/iter...7.....i

cdcogvri23..7..... oe/gobs.0001500000i cdcsex1201500000 oe/pe..7.....i

Tofindapackage,usethes a c subcommand.Forexample,ifyouarelookingforwireshark,agraphicalnetworkprotocolanalyzer,usep g erh k s a c .The flagrestrictstheresultstothepackagenamesonlyotherwisetheoutputlistsallitemsinapackagethatcontainthesearchstring, erh p forexample,files,directories,links,andsoon: benr@oai:$pgsacpwrsak loadslrs~kerhiehr PCAEULSE AKGPBIHR pg/igotcwrsakwrsakcmo@...7.....2oai k:dansi/iehr/iehromn148015000055slrs pg/igotcwrsak148015000055oai k:dansi/iehr@...7.....2slrs

Andthen,togetmoreinformationonaparticularpackage,usep g i f .The (remote)flagisnecessarywhenqueryingapackagethatisnot kno r installedonthelocalfilesystem,asshowninListing7. Listing7:GettingMoreInformationforaPackage benr@oai:$pgifrwrsak loadslrs~knoiehr Nm:dansi/iehr aeigotcwrsak umr:Gahclntokpooonlzr Smayrpiaewrrtclaaye Ctgr:Apiain/nent aeoyplctosItre tt:Ntisald Saeontle ulse:slrs Pbihroai eso:148 Vrin.. ulees:51 BidRlae.1 Bac:015000055 rnh.7.....2 PcaigDt:TeSp233:521 akgnaeue70:3001 Sz:27B ie.6M FR:pg/slrsdansi/iehr@..,.10150000552102T335 MIk:/oai/igotcwrsak14851.7.....2:0197030Z

Toseethecontentsofthew r s a k i e h r package,usethep g c n e t command,asshowninListing8.Thiscommandisveryusefulwhenyou're kotns tryingtofigureoutwhereapackageinstalleditscontents. Listing8:ListingtheContentsofaPackage benr@oai:$pgcnetrwrsak loadslrs~kotnsiehr PT AH ec t ecscrt t/euiy ecscrt/xcat. t/euiyee_trd ecscrt/xcat./igotcwrsak t/euiyee_trddansi:iehr ur s ursi s/bn ursi/iehr s/bnwrsak ursae s/hr ursaeapiain s/hr/plctos ursaeapiain/iehr.eko s/hr/plctoswrsakdstp ursaemn s/hr/a ursaemnmn s/hr/a/a1 ursaemnmn/iehr. s/hr/a/a1wrsak1 ursaepxas s/hr/imp ursaepxaswrsakpg s/hr/imp/iehr.n

Toseeanydependenciesthatapackagemighthave,youneedaslightlymorecomplicatedquery,showninListing9. Listing9:DeterminingPackageDependencies benr@oai:$pgcnetrmieedwrsak loadslrs~kotnsofrtdpniehr FR MI pg/igotcwrsakwrsakcmo@...7.....2 k:dansi/iehr/iehromn148015000055 pg/irr/eko/t222..7..... k:lbaydstpgk@.0101300000 pg/irr/eko/ag@.8301300000 k:lbaydstppno12..7..... pg/irr/lb@.8601300000 k:lbaygi222..7..... pg/irr/lb123013000047 k:lbayzi@...7.....8 pg/ytmlbaylbcp111013000047 k:sse/irr/ipa@...7.....8

pg/ytmlbaymt@..101200000 k:sse/irr/ah051.7..... pg/ytmlbay051.7.....75 k:sse/irr@..10130000166

Inthiscase,weareoutputtingthepackageFMRI(FaultManagementResourceIndicator),whichistheformalwayofdescribingapackageofa specificversion,andweareusingthe optiontospecifythatwearelookingforapackagedependencyoftyped p n . t eed ThismeansthatIPSwillidentifythepackagesonwhichwiresharkdependsandinstallthemiftheyarenotalreadyinstalled. Finally,whenyouarereadytoinstallthepackage,usethep g i s a l k n t l command,asshowninListing10. Listing10:InstallingaPackage benr@oai:$sdkntliehr loadslrs~uopgisalwrsak akgstntl: Pcaeoisal3 raeboniomn:N Cetotevrneto Cetakpboniomn:N raebcuotevrneto Srieocag: evcsthne2 DWLAPGIEXEM) ONODKSFLSFR(B Cmltd/8/81./73 opee332525731. PAECIN HSATOS IsalPae7/7 ntlhs3939 PAETM HSIES PcaeSaeUdths/ akgttpaePae33 IaeSaeUdths/ mgttpaePae22 PAETM HSIES RaigEitnne/ ednxsigIdx88 Idxnakgs/ neigPcae33

Note:Onlyauthorizeduserscaninstallpackagestothesystem,whichiswhyyoumustprefixthep g i s a l k n t l commandwiths d .SeetheUsers uo sectiontoreview. PackageRepositories OracleSolaris11comespreconfiguredwithasinglesoftwarerepository:http://pkg.oracle.com/solaris/release.Oraclealsomakestheentire softwarerepositoryavailablefordownloadsothatitcanbesetuponyourinternalnetworkifyouareinanenvironmentwherethenetworkis restricted,orifyousimplywantimprovedperformancebyhavingsoftwarepackagesavailablelocally.Itisalsopossibletoconfigureadditional softwarerepositories.Overtime,itisexpectedthatthirdpartysoftwareproviderswillcreateandpublishtotheirownrepositoriesinadditiontothe mainOracleSolarisrepository. Besidesthedefaultr l a e e e s repositoryatpkg.oracle.com,Oraclemakesavailableas p o t u p r repositorytothosewhopurchaseanOraclesupport contract.Thes p o t u p r repositoryisupdated,onaverage,oncepermonthwithbugfixesandsecuritypatchesforOracleSolaris11.Formore informationonsupport,seeOraclePremierSupportforOperatingSystems. OneClickInstall YoumighthavenoticedtheInstalllinkwhenyouwerebrowsingtherepositories.Figure12showsthePackageCatalog,whichisalistofall packagesthatareavailableforOracleSolaris11.

Figure12.OracleSolarisRepositoryViewthroughaWebBrowser ClickingtheInstalllinklaunchesthePackageManagerandstartstheinstallation.Iftherepositoryhasn'tbeenconfiguredonthesystem,the necessaryconfigurationisaddedbeforethepackagesareinstalled.Thisisanicefeature,becauseanyonecanpromoteapackage.Forexample, here'salinktoinstallwireshark.(Note:Unlessyou'rereadingthisfromanOracleSolarissystem,yourWebbrowserwillnotknowwhatdotowith thislink). BootEnvironments Ab ootenvironment(BE)isacloneofthefilesandfilesystemthatarecriticaltotheoperationofOracleSolaris.Afterinstallation,thereisonlya singlebootenvironment,butovertime,newbootenvironmentsarecreated,eithermanuallybyyouorautomaticallybythePackageManager. AbootenvironmentessentiallyallowsyoutorollbacktoanearliersnapshotofOracleSolaris11incasesomethinggoeswronginyourcurrentboot environment.Abootenvironmentusuallyconsistsoftherootdataset,butitcanoptionallyincludeotherdatasets.Somedatasetsaresharedacross multiplebootenvironments,forexample,/ x o t e p r .Figure13showstheManageBootEnvironmentsdialogboxfromthePackageManager.

Figure13.ManageBootEnvironmentsDialogBox Beforeyoudoanythingriskyonyoursystem,suchasmodifyingasystemconfigurationfile,considercreatinganewbootenvironmenttoprotect yourselfincasesomethinggoeswrong.Youcreateanewbootenvironmentusingtheb a m e d utility.Here'sanexampleofcreatinganewboot environmentcalledb r o o c a g s epirthne. benr@oai:$sdedraebroocags loadslrs~uobamcetepirthne

Rememberingtousethissimplecommandcanbethedifferencebetweenseveralhoursofdowntimetryingtorecoverfromyourchangesandafew secondstoquicklyreverttoanolderbootenvironment.Soitisrecommendedthatadministratorsusebootenvironmentsaspartoftheirbest practicesforadministeringanOracleSolaris11system. UpdateManager WhenupdatestoIPSpackagesareavailable,OracleSolariswillnotifyyoubywayofaniconinyourtoppanel,asshowninFigure14.

Figure14.OracleSolarisUpdateManagerNotificationIcon ClickingtheiconlaunchestheUpdateManager,whichthencreatesanewbootenvironmentandinstallstheupdates,asshowninFigure15.The updatedsystemwillbeactiveonyournextboot.Ifanythingunexpectedhappensduringasystemupdate,youcansafelyreverttotheolderboot environmenttorecoverthesystem.

Figure15.OracleSolarisUpdateManager SolarisLegacyPackageManager Formanyyears,theOracleSolarisoperatingsystemhasusedtheSVR4packagingsystem,sonamedbecauseitwaspartoftheSystemV,Release 4versionofUNIX.OracleSolaris11supportstheinstallationofSVR4packagesandincludesthecommandsneededtoinstallandremovethose packages.SomecompatibilityhasbeenaddedtothesystemtoallowanypackagedependenciesdeclaredinanSVR4packagetobesatisfied. YoushouldbecarefultoheedanywarningsprintedtotheconsolewheninstallingSVR4packagestoensurethatthepackagecontentsdon'tconflict withexistingfilesanddirectoriesinstalledusingIPS.OnenicewaytoavoidthisissueisbytakingadvantageofOracleSolaris10Zones,compatible virtualenvironmentsthatallowforrunninglegacyapplications.

AFinalMessage
MovingtoOracleSolaris11canbeexciting.However,itcanalsobefrustratingasyoubegintolearnyourwayaround.Wehopethisarticlehasgiven youenoughofanintroductiontosuccessfullymakethemovetoOracleSolaris11. Afteryouareupandrunning,youwillsurelycomeupwithadditionalquestions.AnexperiencedOracleSolariscommunityisreadytohelp.Comejoin usintheOTNDiscussionForum:OracleSolaris11forSysAdmins.Generally,youwillreceivearesponsewithinhours.Also,takealookatsomeof theexcellentOracleSolaris11howtoguides,whichcoversomeofthemorecommonadministrativetasksyouwillfacewhendeployingapplications ontheoperatingsystem. EnjoyyourjourneywithOracleSolaris11!

ForMoreInformation
Herearesomeadditionalresources: DownloadOracleSolaris11 AccessOracleSolaris11productdocumentation AccessallOracleSolaris11howtoguides LearnmorewithOracleSolaris11trainingandsupport SeetheofficialOracleSolarisblog CheckoutTheObservatoryBlogforOracleSolaristipsandtricks Revision1.0,11/02/2011

Anda mungkin juga menyukai