Sunteți pe pagina 1din 5

Home(/)Articles(/articles)11g(/articles/11g)Here

OracleDatabase11gRelease2(11.2)InstallationOnOracleLinux
7(OL7)

OracleLinux7isaproductionrelease,buttheOracleDatabaseisonlysupportedonitfromOracleDatabase11g(11.2.0.4)onward.This
installationshouldnotbeusedforarealsystemwhenusingdatabaseversionspriorto11.2.0.4.
ThisarticledescribestheinstallationofOracleDatabase11gRelease2(11.2.0.4)64bitonOracleLinux7(OL7)64bit.Thearticleisbasedona
serverinstallationwithaminimumof2GswapandsecureLinuxsettopermissive.AnexampleofthistypeofLinuxinstallationcanbeseenhere
(/articles/linux/oraclelinux7installation).
DownloadSoftware
UnpackFiles
HostsFile
OracleInstallationPrerequisites
AutomaticSetup
ManualSetup
AdditionalSetup
Installation
PostInstallation

DownloadSoftware
DownloadtheOraclesoftwareusingoneofthetwolinkbelow.IfyouhaveaccesstoMyOracleSupport(MOS)(https://support.oracle.com),then
itisbettertodownloadthe11.2.0.4version,sincethisisthefirstreleaseof11.2thatissupportedonOracleLinux7.
OracleDatabase11gRelease2(11.2.0.4)Software(MOS)(https://updates.oracle.com/Orion/AdvancedSearch/process_form?
search_style=9&language=0&patch_type=patchset&incl_prod=&incl_prod_checked=yes&release=80112040&plat_lang=226P&product=9480#query_link)
OracleDatabase11gRelease2(11.2.0.1)Software(OTN)(http://www.oracle.com/technetwork/database/enterprise
edition/downloads/index.html)

UnpackFiles
Unzipthefiles.
unziplinux.x64_11gR2_database_1of2.zip
unziplinux.x64_11gR2_database_2of2.zip

Youshouldnowhaveasingledirectorycalled"database"containinginstallationfiles.

HostsFile
The"/etc/hosts"filemustcontainafullyqualifiednamefortheserver.
<IPaddress><fullyqualifiedmachinename><machinename>

Forexample.
127.0.0.1localhostlocalhost.localdomainlocalhost4localhost4.localdomain4
192.168.0.215ol7.localdomainol7

Setthecorrecthostnameinthe"/etc/hostname"file.
ol7.localdomain

OracleInstallationPrerequisites
PerformeithertheAutomaticSetuportheManualSetuptocompletethebasicprerequisites.TheAdditionalSetupisrequiredforallinstallations.

AutomaticSetup
Ifyouplantousethe"oraclerdbmsserver11gR2preinstall"packagetoperformallyourprerequisitesetup,followtheinstructionsathttp://public
yum.oracle.com(http://publicyum.oracle.com)tosetuptheyumrepositoryforOL,thenperformthefollowingcommand.
#yuminstalloraclerdbmsserver11gR2preinstall

Allnecessaryprerequisiteswillbeperformedautomatically.
Itisprobablyworthdoingafullupdateaswell,butthisisnotstrictlyspeakingnecessary.
#yumupdate

ManualSetup
Ifyouhavenotusedthe"oraclerdbmsserver11gR2preinstall"packagetoperformallprerequisites,youwillneedtomanuallyperformthe
followingsetuptasks.
Addoramendthefollowinglinesinthe"/etc/sysctl.conf"file.
fs.aiomaxnr=1048576

fs.aiomaxnr=1048576
fs.filemax=6815744
kernel.shmall=2097152
kernel.shmmax=536870912
kernel.shmmni=4096
#semaphores:semmsl,semmns,semopm,semmni
kernel.sem=25032000100128
net.ipv4.ip_local_port_range=900065500
net.core.rmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048586

Runthefollowingcommandtochangethecurrentkernelparameters.
/sbin/sysctlp

Addthefollowinglinestothe"/etc/security/limits.conf"file.
oraclesoftnproc2047
oraclehardnproc16384
oraclesoftnofile4096
oraclehardnofile65536
oraclesoftstack10240

Addthefollowinglinetothe"/etc/pam.d/login"file,ifitdoesnotalreadyexist.
sessionrequiredpam_limits.so

Thefollowingpackagesarelistedasrequired,includingthe32bitversionofsomeofthepackages.Manyofthepackagesshouldbeinstalled
already.

yuminstallbinutilsy
yuminstallcompatlibstdc++33y
yuminstallcompatlibstdc++33.i686y
yuminstallgccy
yuminstallgccc++y
yuminstallglibcy
yuminstallglibc.i686y
yuminstallglibcdevely
yuminstallglibcdevel.i686y
yuminstallkshy

yuminstallkshy
yuminstalllibgccy
yuminstalllibgcc.i686y
yuminstalllibstdc++y
yuminstalllibstdc++.i686y
yuminstalllibstdc++devely
yuminstalllibstdc++devel.i686y
yuminstalllibaioy
yuminstalllibaio.i686y
yuminstalllibaiodevely
yuminstalllibaiodevel.i686y
yuminstalllibXexty
yuminstalllibXext.i686y
yuminstalllibXtsty
yuminstalllibXtst.i686y
yuminstalllibX11y
yuminstalllibX11.i686y
yuminstalllibXauy
yuminstalllibXau.i686y
yuminstalllibxcby
yuminstalllibxcb.i686y
yuminstalllibXiy
yuminstalllibXi.i686y
yuminstallmakey
yuminstallsysstaty
yuminstallunixODBCy
yuminstallunixODBCdevely
yuminstallzlibdevely
yuminstallelfutilslibelfdevely

Createthenewgroupsandusers.
groupaddg54321oinstall
groupaddg54322dba
groupaddg54323oper
#groupaddg54324backupdba
#groupaddg54325dgdba
#groupaddg54326kmdba
#groupaddg54327asmdba
#groupaddg54328asmoper
#groupaddg54329asmadmin
useraddgoinstallGdba,operoracle

Wearenotgoingtousetheextragroups,butincludethemifyoudoplanonusingthem.

AdditionalSetup
Thefollowingstepsmustbeperformed,whetheryoudidthemanualorautomaticsetup.
Setthepasswordforthe"oracle"user.
passwdoracle

SetsecureLinuxtopermissivebyeditingthe"/etc/selinux/config"file,makingsuretheSELINUXflagissetasfollows.
SELINUX=permissive

Oncethechangeiscomplete,restarttheserverorrunthefollowingcommand.
#setenforcePermissive

IfyouhavetheLinuxfirewallenabled,youwillneedtodisableorconfigureit,asshownhere(/articles/linux/oraclelinux6installation#firewall)or
here(/articles/linux/linuxfirewall#installation).Todisableit,dothefollowing.
#systemctlstopfirewalld
#systemctldisablefirewalld

CreatethedirectoriesinwhichtheOraclesoftwarewillbeinstalled.
mkdirp/u01/app/oracle/product/11.2.0.4/db_1
chownRoracle:oinstall/u01
chmodR775/u01

Unlessyouareworkingfromtheconsole,orusingSSHtunnelling,loginasrootandissuethefollowingcommand.
xhost+<machinename>

xhost+<machinename>

Addthefollowinglinesattheendofthe"/home/oracle/.bash_profile"file.
#OracleSettings
TMP=/tmp;exportTMP
TMPDIR=$TMP;exportTMPDIR
ORACLE_HOSTNAME=ol7.localdomain;exportORACLE_HOSTNAME
ORACLE_UNQNAME=DB11G;exportORACLE_UNQNAME
ORACLE_BASE=/u01/app/oracle;exportORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0.4/db_1;exportORACLE_HOME
ORACLE_SID=DB11G;exportORACLE_SID
ORACLE_TERM=xterm;exportORACLE_TERM
PATH=/usr/sbin:$PATH;exportPATH
PATH=$ORACLE_HOME/bin:$PATH;exportPATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;exportLD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;exportCLASSPATH
if[$USER="oracle"];then
if[$SHELL="/bin/ksh"];then
ulimitp16384
ulimitn65536
else
ulimitu16384n65536
fi
fi

Installation
Logintotheoracleuser.IfyouareusingXemulationthensettheDISPLAYenvironmentalvariable.
DISPLAY=<machinename>:0.0;exportDISPLAY

StarttheOracleUniversalInstaller(OUI)byissuingthefollowingcommandinthedatabasedirectory.
./runInstaller

Proceedwiththeinstallationofyourchoice.YoucanseetypeofinstallationIperformedbyclickingonthelinksbelowtoseescreenshotsofeach
stage.The"pdksh"packagewillbelistedasmissing,whichcanbeignoredbecauseweinstalledthe"ksh"packageinstead.

IfyouaredoinganinstallationforanEnterpriseManagerrepository,remembertodoanadvancedinstallationandpicktheALT32UTF8
characterset.
Translate

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.

ConfigureSecurityUpdates(images/DB11gR2/01ConfigureSecurityUpdates.jpg)
SelectInstallOption(images/DB11gR2/02SelectInstallOption.jpg)
SystemClass(images/DB11gR2/03SystemClass.jpg)
NodeSelection(images/DB11gR2/04NodeSelection.jpg)
SelectInstallType(images/DB11gR2/05SelectInstallType.jpg)
TypicalInstallConfiguration(images/DB11gR2/06TypicalInstallConfiguration.jpg)
CreateInventory(images/DB11gR2/07CreateInventory.jpg)
PerformPrerequisiteChecks(images/DB11gR2/08PerformPrerequisiteChecks.jpg)
Summary(images/DB11gR2/09Summary.jpg)
InstallProduct(images/DB11gR2/10InstallProduct.jpg)
DatabaseConfigurationAssistant(images/DB11gR2/11DatabaseConfigurationAssistant.jpg)

12. DatabaseConfigurationAssistant2(images/DB11gR2/12DatabaseConfigurationAssistant2.jpg)
13. ExecuteConfigurationScripts(images/DB11gR2/13ExecuteConfigurationScripts.jpg)
14. Finish(images/DB11gR2/14Finish.jpg)
Duringthelinkphaseyouwillencounteranerrorinvokingthe"ins_emagent.mk"file.Tofixthis,editthe
"$ORACLE_HOME/sysman/lib/ins_emagent.mk",doingasearchandreplaceforthelineshownbelow.
FROM:
$(MK_EMAGENT_NMECTL)
TO:
$(MK_EMAGENT_NMECTL)lnnz11

Clickthe"Retry"button.

PostInstallation
Editthe"/etc/oratab"filesettingtherestartflagforeachinstanceto'Y'.
DB11G:/u01/app/oracle/product/11.2.0.4/db_1:Y

Formoreinformationsee:
OracleDatabaseInstallationGuide11gRelease2(11.2)forLinux(http://docs.oracle.com/cd/E11882_01/install.112/e24326/toc.htm)
AutomatingDatabaseStartupandShutdownonLinux(/articles/linux/automatingdatabasestartupandshutdownonlinux)
Hopethishelps.RegardsTim...
BacktotheTop.

18comments,read/addthem...(/misc/comments?page_id=1327)

Home(/)|Articles(/articles/articles)|Scripts(/dba/scripts)|Blog(/blog/)|Certification(/misc/ocpcertification)|Misc(/misc/miscellaneous)|About
(/misc/siteinfo)
AboutTimHall(/misc/siteinfo#biog)
Copyright&Disclaimer(/misc/siteinfo#copyright)

S-ar putea să vă placă și