Sunteți pe pagina 1din 11

Home(/)Articles(/articles)12c(/articles/12c)

Here

OracleDatabase12cRelease
1(12.1)InstallationOnOracleLinux7(OL7)
OracleLinux7isaproductionrelease,buttheOracleDatabaseisonlysupportedonit
fromOracleDatabase12c(12.1.0.2)onward.Thisinstallationshouldnotbeusedfora
realsystemwhenusingdatabaseversionspriorto12.1.0.2.
ThisarticledescribestheinstallationofOracleDatabase12cRelease1(12.1)64biton
OracleLinux7(OL7)64bit.Thearticleisbasedonaserverinstallationwithaminimum
of2GswapandsecureLinuxsettopermissive.AnexampleofthistypeofLinux
installationcanbeseenhere(/articles/linux/oraclelinux7installation).
DownloadSoftware
UnpackFiles
HostsFile
OracleInstallationPrerequisites
AutomaticSetup
ManualSetup
AdditionalSetup
Installation
PostInstallation
12.1.0.1Notes
12.1.0.2Notes

DownloadSoftware
DownloadtheOraclesoftwarefromOTNorMOSdependingonyoursupportstatus.
OTN:OracleDatabase12cRelease1(12.1.0.2)Software(64bit).
(http://www.oracle.com/technetwork/database/enterprise
edition/downloads/index.html)
edelivery:OracleDatabase12cRelease1(12.1.0.2)Software(64bit)
(http://edelivery.oracle.com)

UnpackFiles
Unzipthefiles.
unziplinuxamd64_12102_database_1of2.zip
unziplinuxamd64_12102_database_2of2.zip

Youshouldnowhaveasingledirectorycalled"database"containinginstallationfiles.

HostsFile

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

Forexample.
127.0.0.1localhostlocalhost.localdomainlocalhost4localhost4.loc
aldomain4
192.168.0.215ol7.localdomainol7

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

OracleInstallationPrerequisites
PerformeithertheAutomaticSetuportheManualSetuptocompletethebasic
prerequisites.TheAdditionalSetupisrequiredforallinstallations.

AutomaticSetup
Ifyouplantousethe"oraclerdbmsserver12cR1preinstall"packagetoperformallyour
prerequisitesetup,issuethefollowingcommand.
#yuminstalloraclerdbmsserver12cR1preinstally

EarlierversionsofOracleLinuxrequiredmanualsetupoftheYumrepositoryby
followingtheinstructionsathttp://publicyum.oracle.com(http://public
yum.oracle.com).

Itisprobablyworthdoingafullupdateaswell,butthisisnotstrictlyspeakingnecessary.
#yumupdatey

It'sworthrunningthealltheYUMcommandslistedinthemanualsetupsection.
DependingontheOSpackagegroupsyouhaveselected,someadditional
packagesmightalsobeneeded.

ManualSetup
Ifyouhavenotusedthe"oraclerdbmsserver12cR1preinstall"packagetoperformall
prerequisites,youwillneedtomanuallyperformthefollowingsetuptasks.
Addoramendthefollowinglinesinthe"/etc/sysctl.conf"file.
fs.filemax=6815744
kernel.sem=25032000100128
kernel.shmmni=4096
kernel.shmall=1073741824
kernel.shmmax=4398046511104
net.core.rmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048576
fs.aiomaxnr=1048576
net.ipv4.ip_local_port_range=900065500

Runthefollowingcommandtochangethecurrentkernelparameters.
/sbin/sysctlp

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

Thefollowingpackagesarelistedasrequired,includingthe32bitversionofsomeofthe
packages.Manyofthepackagesshouldbeinstalledalready.

yuminstallbinutilsy
yuminstallcompatlibstdc++33y
yuminstallcompatlibstdc++33.i686y
yuminstallgccy
yuminstallgccc++y
yuminstallglibcy
yuminstallglibc.i686y
yuminstallglibcdevely
yuminstallglibcdevel.i686y
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
yuminstallzlibdevel.i686y

Createthenewgroupsandusers.

groupaddg54321oinstall
groupaddg54322dba
groupaddg54323oper
#groupaddg54324backupdba
#groupaddg54325dgdba
#groupaddg54326kmdba
#groupaddg54327asmdba
#groupaddg54328asmoper
#groupaddg54329asmadmin
useraddu54321goinstallGdba,operoracle

Uncommenttheextragroupsyourequire.

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

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

Oncethechangeiscomplete,restarttheserverorrunthefollowingcommand.
#setenforcePermissive

IfyouhavetheLinuxfirewallenabled,youwillneedtodisableorconfigureit,asshown
here(/articles/linux/oraclelinux6installation#firewall)orhere(/articles/linux/linux
firewall#installation).Todisableit,dothefollowing.
#systemctlstopfirewalld
#systemctldisablefirewalld

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

Puttingmountpointsdirectlyunderrootistypicallyabadidea.It'sdoneherefor
simplicity,butforarealinstallation"/"shouldbereservedfortheOS.

Unlessyouareworkingfromtheconsole,orusingSSHtunnelling,loginasrootand
issuethefollowingcommand.
xhost+<machinename>

Addthefollowinglinesattheendofthe"/home/oracle/.bash_profile"file.
#OracleSettings
exportTMP=/tmp
exportTMPDIR=$TMP
exportORACLE_HOSTNAME=ol7.localdomain
exportORACLE_UNQNAME=cdb1
exportORACLE_BASE=/u01/app/oracle
exportORACLE_HOME=$ORACLE_BASE/product/12.1.0.2/db_1
exportORACLE_SID=cdb1
exportPATH=/usr/sbin:$PATH
exportPATH=$ORACLE_HOME/bin:$PATH
exportLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
exportCLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
if[$USER="oracle"];then
if[$SHELL="/bin/ksh"];then
ulimitp16384
ulimitn65536
else
ulimitu16384n65536
fi
fi

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

StarttheOracleUniversalInstaller(OUI)byissuingthefollowingcommandinthe
databasedirectory.
./runInstaller

Proceedwiththeinstallationofyourchoice.

IfyouaredoinganinstallationforanEnterpriseManagerrepository,remember
todoanadvancedinstallationandpicktheALT32UTF8characterset.

Checkoutthenotesbelowforhowtodealwithpotentialerrorsthatmayariseduringthe
installation.
YoucanseethetypeofinstallationIperformedbyclickingonthelinksbelowtosee
screenshotsofeachstage.
1. ConfigureSecurityUpdates(images/12cR1Database/01configuresecurity
updates.jpg)
2. MyOracleSupportCredentials(images/12cR1Database/02moscredentials.jpg)
3. SelectInstallationType(images/12cR1Database/04selectinstallationtype.jpg)
4. SystemClass(images/12cR1Database/05systemclass.jpg)
5. GridInstallationOptions(images/12cR1Database/06gridinstallationoptions.jpg)
6. SelectInstallType(images/12cR1Database/07selectinstalltype.jpg)
7. TypicalInstallConfiguration(images/12cR1Database/08typicalinstall
configuration.jpg)
8. CreateInventory(images/12cR1Database/09createinventory.jpg)
9. PerformPrerequisiteChecks(images/12cR1Database/10performprerequisite
checks.jpg)
10. Summary(images/12cR1Database/11summary.jpg)
11. InstallProduct(images/12cR1Database/12installproduct.jpg)
12. ExecuteConfigurationScripts(images/12cR1Database/13executeconfiguration
scripts.jpg)
13. OracleDatabaseConfiguration(images/12cR1Database/14oracledatabase
configuration.jpg)
14. DatabaseConfigurationAssistant(images/12cR1Database/15database
configurationassistant.jpg)
15. DatabaseConfigurationAssistantComplete(images/12cR1Database/16database
configurationassistantcomplete.jpg)
16. Finish(images/12cR1Database/17finish.jpg)
17. DatabaseExpress12cLogin(images/12cR1Database/18databaseexpress
12c.jpg)
18. DatabaseExpress12cDashboard(images/12cR1Database/19databaseexpress
12c.jpg)

The"DatabaseConfigurationAssistantComplete"screendisplaystheDatabaseExpress
12cURL,whichwillbesomethinglike"https://ol7.localdomain:5500/em".

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

12.1.0.1Notes
Onlyfollowthesenotesifyouareattemptingtheinstallusing12.1.0.1,therearea
numberofthingsthatwillneedtobefixedalongtheway.Thesearenotnecessaryfora
12.1.0.2installation,asitcompletescleanly.
Thefollowingstepsneedtobeconsideredduringtheinstallation.
Whenclicking"Next"onthe"DownloadSoftwareUpdates"screenyouwillgetthe
followingmessage.Clickthe"Yes"button.
"[INS13001]Environmentdoesnotmeetminimumrequirements.
Areyousureyouwanttocontinue?

Duringthelinkingphase,youwillseethefollowingerror.
Errorininvokingtarget'linksprocgen_pcscfgprocob'ofmakefile
'/u01/app/oracle/product/12.1.0.1/db_1/precomp/lib/ins_precomp.mk'.
See
'/u01/app/oraInventory/logs/installActions20140426_080704PM.log'
fordetails.

Tofixit,dothefollowing:
rmrf$ORACLE_HOME/lib/stubs/*
cp$ORACLE_HOME/rdbms/lib/env_rdbms.mk$ORACLE_HOME/rdbms/lib/env_rdb
ms.mk.orig

Performthefollowingmodificationstothe
"$ORACLE_HOME/rdbms/lib/env_rdbms.mk"file.

#Line176
#FROM:
LINKTTLIBS=$(LLIBCLNTSH)$(ORACLETTLIBS)$(LINKLDLIBS)
#TO:
LINKTTLIBS=$(LLIBCLNTSH)$(ORACLETTLIBS)$(LINKLDLIBS)lons
#Line279280
#FROM:
LINK=$(FORT_CMD)$(PURECMDS)$(ORALD)$(LDFLAGS)$(COMPSOBJS)
LINK32=$(FORT_CMD)$(PURECMDS)$(ORALD)$(LDFLAGS32)$(COMPSOBJS)
#TO:
LINK=$(FORT_CMD)$(PURECMDS)$(ORALD)$(LDFLAGS)$(COMPSOBJS)Wl,n
oasneeded
LINK32=$(FORT_CMD)$(PURECMDS)$(ORALD)$(LDFLAGS32)$(COMPSOBJS)Wl
,noasneeded
#Line30413042
#FROM:
TG4PWD_LINKLINE=$(LINK)$(OPT)$(TG4PWDMAI)\
$(LLIBTHREAD)$(LLIBCLNTSH)$(LINKLDLIBS)
#TO:
TG4PWD_LINKLINE=$(LINK)$(OPT)$(TG4PWDMAI)\
$(LLIBTHREAD)$(LLIBCLNTSH)$(LINKLDLIBS)lnnz12

Clickthe"Retry"button.
Later,youmightseethefollowingerror.
Errorininvokingtarget'install'ofmakefile
'/u01/app/oracle/product/12.1.0.1/db_1/ctx/lib/ins_ctx.mk'.
Translate
See
'/u01/app/oraInventory/logs/installActions20140426_080704PM.log'
fordetails.

Tofixit,dothefollowing:
rmrf$ORACLE_HOME/lib/stubs/*
cp$ORACLE_HOME/ctx/lib/env_ctx.mk$ORACLE_HOME/ctx/lib/env_ctx.mk.or
ig

Performthefollowingmodificationstothe"$ORACLE_HOME/ctx/lib/env_ctx.mk"
file.

#Line154
#FROM:
LINK=$(LDCCOM)
#TO:
LINK=$(LDCCOM)Wl,noasneeded

Clickthe"Retry"button.
Duetotheissuesduringthelinkingphase,itprobablymakessensetodoarelinkonce
theinstallationiscomplete.
dbshut$ORACLE_HOME
cd$ORACLE_HOME/bin
./relinkall
#Followinglineshouldreturnnoerrors.
grepierr$ORACLE_HOME/install/relink.log
dbstart$ORACLE_HOME

12.1.0.2Notes
Duringthelinkingphase,youmayseethefollowingerror.
Errorininvokingtarget'irmanioracle'ofmakefile'/u01/app/oracle/pro
duct/12.1.0.2/db_1/rdbms/lib/ins_rdbms.mk'

Tofixit,runthefollowingcommandasthe"oracle"user,thenclickthe"Retry"button.
cp$ORACLE_HOME/javavm/jdk/jdk6/lib/libjavavm12.a$ORACLE_HOME/lib/

Duringthedatabasecreationaspartoftheinstallation,orafterwhenusingtheDBCA,
youmaygetthefollowingerror.
Errorwhileexecuting"/u01/app/oracle/product/12.1.0.2/db_1/rdbms/admin/
dbmssml.sql".Referto"/u01/app/oracle/cfgtoollogs/dbca/orcl/dbmssml0.lo
g"formoredetails.ErrorinProcess:/u01/app/oracle/product/12.1.0.2/d
b_1/perl/bin/perl

Tofixit,followtheinstructionstorebuildPerlasdescribedtowardstheendofthispost
byLaurentLeturgez(http://laurentleturgez.com/2015/05/26/oracle12cvmwarefusion
andtheperlbinaryssegmentationfault/).Youwillhavetoredothedatabasecreation.
Formoreinformationsee:
OracleDatabaseInstallationGuide12cRelease1(12.1)forLinux
(http://docs.oracle.com/database/121/LADBI/toc.htm)
AutomatingDatabaseStartupandShutdownonLinux(/articles/linux/automating

databasestartupandshutdownonlinux)
Hopethishelps.RegardsTim...
BacktotheTop.

31comments,read/addthem...(/misc/comments?page_id=1328)

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