|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
采用DBaaS解决方案,他们也可以使用同大企业一样的技术。在大型组织中,DBaaS可以提供部门级解决MySQL学习教程,而无需IT部门和采购部门的介入,提供更快和更容易的方法来实现小型解决方案。core
Home->oracle->Oracle10grelease1(10.1.0.2)onFedoracore1
OracleDatabase10grelease1(10.1.0.2)installationonFedoracore1
PleasenotethatOracleDatabase10gisnotcertifiedtorunonFedoraLinux,thereforeyoushouldnotusethiscombinationonaproductionserver.YoucanexamineOraclecertificationmatrixatMetalink
Contents
1.Downloadingandunpackinginstallationfiles
2.Preparingyoursystem
2.1Stepstoperformasrootuser
2.2Stepstoperformasoracleuser
3.Runningtheinstaller
4.Post-installationsteps
4.1Startingdatabaseservices
4.2Shuttingdowndatabaseservices
4.3Automatingoraclestartupandshutdown
1.Downloadingandunpackinginstallationfiles
DownloadOracleDatabase10gfromOracleTechnologyNetwork.Fourfilesareavailable:
ship.ccd.cpio.gz-Oracle10gCompanionCD
ship.client.cpio.gz-Oracle10gClient
ship.crs.cpio.gz-Oracle10gClusterReadyServices
ship.db.cpio.gz-Oracle10gDatabase
Onlyship.db.cpio.gzisrequiredinordertoinstallthedatabase.
Onceyoudownloadedthefile,unpackit:
gunzipship.db.cpio.gz
cpio-idmv<ship.db.cpio
Allfourinstallationfilesunpacktodirectorynamed"Disk1",sorenamedirectorybeforeyoueventuallyunpackanotherfile.
YoumaywanttocreateOracleinstallationCDsetfromunpackedinstallationfiles.AsIdonthaveaCD-burneronanyofmylinuxboxes,IcreatedISOimagesusing
mkisofs-JR-l-oship.db.isoDisk1/
andburnedCDsonWindowsmachine.
2.Preparingyoursystem
2.1Stepstoperformasrootuser
Installfollowingfedorapackagesusingrpm-ivhpackage_name:
FromFedora-coreDisk1:
setarch-1.0-1.i386.rpm
FromFedora-coreDisk2:
openmotif-2.2.2-16.1.i386.rpm
FromFedora-coreDisk3:
compat-libstdc++-7.3-2.96.118.i386.rpm
compat-db-4.0.14-2.i386.rpm
compat-gcc-7.3-2.96.118.i386.rpm
compat-libgcj-7.3-2.96.118.i386.rpm
compat-libstdc++-devel-7.3-2.96.118.i386.rpm
compat-libgcj-devel-7.3-2.96.118.i386.rpm
NowwehavetomakeOracleinstallerthinkthatwehaveoneofthesupporteddistributions:Createabackupofyour/etc/redhat-releasefile,anchangeitscontents:
#cp/etc/redhat-release/etc/redhat-release.orig
#echo"RedHatEnterpriseLinuxASrelease3(Taroon)">/etc/redhat-release
Changekernelparametersbyaddingthefollowinglinesin/etc/sysctl.conf:
kernel.shmall=2097152
kernel.shmmax=2147483648
kernel.shmmni=4096
kernel.sem=25032000100128
fs.file-max=65536
net.ipv4.ip_local_port_range=3276865000
Updatekernelconfiguration:
[root@fedoraroot]#sysctl-e-p/etc/sysctl.conf
Addthefollowinglinesto/etc/security/limits.conffile:
*softnproc2047
*hardnproc16384
*softnofile1024
*hardnofile65536
Addthefollowinglinetothe/etc/pam.d/loginfile,ifitdoesnotalreadyexist:
sessionrequired/lib/security/pam_limits.so
Createuserandgroupsthatwillownoracleinstallation.Inthisexapletheusernamewillbeoracle:
[root@fedora]#groupaddoinstall
[root@fedora]#groupadddba
[root@fedora]#useradd-goinstall-Gdbaoracle
[root@fedora]#passwdoracle
Createdirectoriesinwhichoraclesoftwarewillbeinstalled.OraclerecommendsOFA-OptimalFlexibleArchitecture(seeoracleinstallationguide),butinthisexampleeverythingwillbeinstalledunder/home/oracle:
[root@fedora]#mkdir-p/home/oracle/product/10g
[root@fedora]#chown-Roracle.oinstall/home/oracle/*
2.2Stepstoperformasoracleuser
Makegcc296defaultcompilerforuseroraclebycreatingsymboliclink.Itisimportantthatthedirectorycontainingthelink(/home/oracle/bin)islistedinthePATHvariablebefore/usr/bin.
[oracle@fedoraoracle]$mkdir/home/oracle/bin
[oracle@fedoraoracle]$cd/home/oracle/bin
[oracle@fedorabin]$ln-s/usr/bin/gcc296gcc
Putthefollowinglinesinoracleuser.bash_profile
exportORACLE_BASE=/home/oracle
exportORACLE_HOME=/home/oracle/product/10g
exportORACLE_SID=orcl
exportORACLE_TERM=xterm
exportPATH=$HOME/bin:$ORACLE_HOME/bin:$PATH
ulimit-u16384-n65536
#
#changethisNLSsettingstosuityourcountry:
#example:
#german_germany.we8iso8859p15,american_america.we8iso8859p1etc.
#
exportNLS_LANG=croatian_croatia.ee8iso8859p2
SinceIamfromCroatia,IuseCroatiannationallanguagesupport(NLS_LANG,NLS_DATE_LANGUAGE,NLS_SORTandNLS_DATE_FORMAT).Youshouldsetthesevariablestosuityourneeds.
ListingofvalidOracleNLSDataparametersincludingsupportedlanguages,territoriesandstoragecharactersetscanbefoundhere.
InthisexampleORACLE_SID=orcl.YouwillbepromptedbyinstallertospecifySIDandglobaldatabasename,andyoushouldreplacetheSIDin.bash_profilewithyourownSID.
Updateenvironmenttoincludenewvariables:
[oracle@fedora]$source/home/oracle/.bash_profile
Everythingisnowreadytostarttheoracleinstaller.
3.Runningtheinstaller
IfyouhaveOracle10gDatabaseCD,loginasrootandmountit:
[root@fedora]#mount/mnt/cdrom
OracleinstallerneedstoberunfromXwindows,sostartXwindowsandloginasuseroracle.
Makesurethatyourenvionmentiscorrectlysetup:
[oracle@fedoraoracle]$set|grepORACLE
ORACLE_BASE=/home/oracle
ORACLE_HOME=/home/oracle/product/10g
ORACLE_SID=orcl
ORACLE_TERM=xterm
[oracle@fedoraoracle]$gcc--version
2.96
Starttheinstaller:
[oracle@fedoraoracle]$/mnt/cdrom/runInstaller
Note:ifyougetthewfollowingerrorwhenrunningtheinstallerfromCD-ROM
bash:/mnt/cdrom/runInstaller:/bin/sh:badinterpreter:Permissiondenied
youshouldcheckhowyourCD-ROMwasmounted.Itshouldbemountedbyuserroot,andtheinformationaboutthefilesystemin/etc/fstabsohuldlooksimilartothis:
/dev/cdrom/mnt/cdromautoexec,noauto,owner,kudzu,ro00
Nowtheinstallershouldbeupandrunning.
4.Post-installationsteps
Firstwewanttochangebackthe/etc/redhat-releasefile:
[root@fedora]#cp/etc/redhat-release.orig/etc/redhat-release
Next,modifythe/etc/oratabfileinordertousedatabasestartupandshutdownscriptsprovidedbyoracle.Findthelinein/etc/oratabthatlookssimilartothis:
*:/home/oracle/product/10g:N
Entriesareoftheform:$ORACLE_SID:$ORACLE_HOME:<N|Y>
Changethelastfield(N)toY,andyouwillbeabletostartthedatabaseusingdbstartutility.
4.1.Startingdatabaseservices
Note:IfyoujustinstalledOracle,thedatabase,TNSlistenerandenterprisemanagerarealreadyrunning.
StartTNSListener:
[oracle@fedoraoracle]$lsnrctlstart
Youcanstartthedatabaseviadbstartutility:
[oracle@fedoraoracle]$dbstart
orviaSQL*Plus:
[oracle@fedoraoracle]$sqlplus/assysdba
SQL*Plus:Release10.1.0.2.0-ProductiononSatFeb2118:05:432004
Copyright(c)1982,2004,Oracle.Allrightsreserved.
Connectedtoanidleinstance.
SQL>startup
ORACLEinstancestarted.
TotalSystemGlobalArea188743680bytes
FixedSize778036bytes
VariableSize162537676bytes
DatabaseBuffers25165824bytes
RedoBuffers262144bytes
Databasemounted.
Databaseopened.
SQL>exit
DisconnectedfromOracleDatabase10gEnterpriseEditionRelease10.1.0.2.0-
ProductionWiththePartitioning,OLAPandDataMiningoptions
[oracle@fedoraoracle]$
StartEnterprisemanagerserver:
[oracle@fedoraoracle]$emctlstartdbconsole
4.2.Stoppingdatabaseservices
StopEnterprisemanagerserver:
[oracle@fedoraoracle]$emctlstopdbconsole
Youcanstopthedatabaseviadbshututility:
[oracle@fedoraoracle]$dbshut
orviaSQL*Plus:
[oracle@fedoraoracle]$sqlplus/assysdba
SQL*Plus:Release10.1.0.2.0-ProductiononSatFeb2118:11:232004
Copyright(c)1982,2004,Oracle.Allrightsreserved.
Connectedto:
OracleDatabase10gEnterpriseEditionRelease10.1.0.2.0-
ProductionWiththePartitioning,OLAPandDataMiningoptions
SQL>shutdownimmediate
Databaseclosed.
Databasedismounted.
ORACLEinstanceshutdown.
SQL>exit
DisconnectedfromOracleDatabase10gEnterpriseEditionRelease10.1.0.2.0-
ProductionWiththePartitioning,OLAPandDataMiningoptions
[oracle@fedoraoracle]$
StopTNSlistener:
[oracle@fedoraoracle]$lsnrctlstop
4.3Automatingoraclestartupandshutdown
Toautomaticallystart/shutoracledatabaseduringsystemstartup/shutdownyouneedtowriteascriptin/etc/rc.d/init.ddirectory.YoucanvieworDownloadanexamplescript.
Copythescriptto/etc/rc.d/init.dasrootuser,editenvironmentvariablestomatchyoursettingsandmodifyitspermissions:
[root@fedoraroot]#chownroot.root/etc/rc.d/init.d/ora10
[root@fedoraroot]#chmod755/etc/rc.d/init.d/ora10
ThescriptIwroteuseschkconfigutilitytosimplifyservicemanagement.Itisconfiguredtostartoracleservicesinrunlevels3and5,withstartpriority95andstoppriority1.
Initializenewservice:
[root@fedoraroot]#chkconfigora10reset
[root@fedoraroot]#chkconfig--listora10
ora100:off1:off2:off3:on4:off5:on6:off
Noworacleserviceswillbeautomaticallystartedwhenenteringrunlevels3and5,andshutdownwhenenteringanyotherrunlevel.Formoreinformationonchkconfigutilityrefertoitsmanpage.
Tomanuallystart/stoporacleservicesyoucanuse
[root@fedoraroot]#serviceora10start
and
[root@fedoraroot]#serviceora10stop
Hopethishelps.
Denis.
Home->oracle->Oracle10grelease1(10.1.0.2)onFedoracore1
--------------------
HAPPYMENG
为维持生产环境和非生产环境需要不断地投入管理支持费用MySQL学习教程,最终导致客户为数据库资源投入巨额成本。 |
|