Download Software
Download the Oracle software from OTN or MOS depending on your support status.
OTN: Oracle Database 12c Release 1 (12.1.0.2) Software (64-bit).
edelivery: Oracle Database 12c Release 1 (12.1.0.2) Software (64-bit)
Unpack Files
Unzip the files.
unzip linuxamd64_12102_database_1of2.zip
unzip linuxamd64_12102_database_2of2.zip
Hosts File
The “/etc/hosts” file must contain a fully qualified name for the server.
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.3.129 sgbd7.localdomain sgbd7
Set the correct hostname in the “/etc/hostname” file.
[root@localhost ~]# cat /etc/hostname
echo “sgbd7.localdomain” > /etc/hostname
vi /usr/lib/sysctl.d/00-system.conf
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
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.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
/sbin/sysctl -p
vi /etc/security/limits.conf
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
yum install binutils -y
yum install compat-libstdc++-33 -y
yum install compat-libstdc++-33.i686 -y
yum install gcc -y
yum install gcc-c++ -y
yum install glibc -y
yum install glibc.i686 -y
yum install glibc-devel -y
yum install glibc-devel.i686 -y
yum install ksh -y
yum install libgcc -y
yum install libgcc.i686 -y
yum install libstdc++ -y
yum install libstdc++.i686 -y
yum install libstdc++-devel -y
yum install libstdc++-devel.i686 -y
yum install libaio -y
yum install libaio.i686 -y
yum install libaio-devel -y
yum install libaio-devel.i686 -y
yum install libXext -y
yum install libXext.i686 -y
yum install libXtst -y
yum install libXtst.i686 -y
yum install libX11 -y
yum install libX11.i686 -y
yum install libXau -y
yum install libXau.i686 -y
yum install libxcb -y
yum install libxcb.i686 -y
yum install libXi -y
yum install libXi.i686 -y
yum install make -y
yum install sysstat -y
yum install unixODBC -y
yum install unixODBC-devel -y
yum install zlib-devel -y
groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
#groupadd -g 54324 backupdba
#groupadd -g 54325 dgdba
#groupadd -g 54326 kmdba
groupadd -g 54327 asmdba
#groupadd -g 54328 asmoper
#groupadd -g 54329 asmadmin
usermod -g oinstall -G dba,asmdba,oper oracle
Verifique o usuario oracle pertence aos grupos
[root@localhost ~]# id oracle
uid=1000(oracle) gid=1000(oracle) grupos=1000(oracle),54321(oinstall),54322(dba),54323(oper)
# desabilite ou deixe com permissive o selinux
vi /etc/selinux/config
# systemctl stop firewalld
# systemctl disable firewalld
mkdir -p /u01/app/oracle/product/12.1.0.2/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01
vi /home/oracle/.bash_profile
Add the following lines at the end of the “/home/oracle/.bash_profile” file.
# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=sgbd7.localdomain
export ORACLE_UNQNAME=base1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0.2/db_1
export ORACLE_SID=base1
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
if [ $USER = “oracle” ]; then
if [ $SHELL = “/bin/ksh” ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
init 6
./runInstaller
./runInstaller
Durante o processo de instalação alguns erros que podem ocorrer:
Error in invoking target ‘links proc gen_pcscfg procob’ of makefile
‘/u01/app/oracle/product/12.1.0.1/db_1/precomp/lib/ins_precomp.mk’.
See
‘/u01/app/oraInventory/logs/installActions2014-04-26_08-07-04PM.log’
for details.
To fix it, do the following:
rm -rf $ORACLE_HOME/lib/stubs/*
cp $ORACLE_HOME/rdbms/lib/env_rdbms.mk $ORACLE_HOME/rdbms/lib/env_rdbms.mk.orig
modifique o arquivo “$ORACLE_HOME/rdbms/lib/env_rdbms.mk”.
# Line 176
# FROM:
LINKTTLIBS=$(LLIBCLNTSH) $(ORACLETTLIBS) $(LINKLDLIBS)
# TO :
LINKTTLIBS=$(LLIBCLNTSH) $(ORACLETTLIBS) $(LINKLDLIBS) -lons
# Line 279-280
# FROM:
LINK=$(FORT_CMD) $(PURECMDS) $(ORALD) $(LDFLAGS) $(COMPSOBJS)
LINK32=$(FORT_CMD) $(PURECMDS) $(ORALD) $(LDFLAGS32) $(COMPSOBJS)
# TO :
LINK=$(FORT_CMD) $(PURECMDS) $(ORALD) $(LDFLAGS) $(COMPSOBJS) -Wl,–no-as-needed
LINK32=$(FORT_CMD) $(PURECMDS) $(ORALD) $(LDFLAGS32) $(COMPSOBJS) -Wl,–no-as-needed
# Line 3041-3042
# FROM:
TG4PWD_LINKLINE= $(LINK) $(OPT) $(TG4PWDMAI) \
$(LLIBTHREAD) $(LLIBCLNTSH) $(LINKLDLIBS)
# TO :
TG4PWD_LINKLINE= $(LINK) $(OPT) $(TG4PWDMAI) \
$(LLIBTHREAD) $(LLIBCLNTSH) $(LINKLDLIBS) -lnnz12
Pressione Repetir(Retry).
Continuando se mais erros aparecerem…
Error in invoking target ‘install’ of makefile
‘/u01/app/oracle/product/12.1.0.1/db_1/ctx/lib/ins_ctx.mk’.
See
‘/u01/app/oraInventory/logs/installActions2014-04-26_08-07-04PM.log’
for details.
To fix it, do the following:
rm -rf $ORACLE_HOME/lib/stubs/*
cp $ORACLE_HOME/ctx/lib/env_ctx.mk $ORACLE_HOME/ctx/lib/env_ctx.mk.orig
Perform the following modifications to the “$ORACLE_HOME/ctx/lib/env_ctx.mk” file.
# Line 154
# FROM:
LINK=$(LDCCOM)
# TO :
LINK=$(LDCCOM) –Wl,–no-as-needed
Pressione Repetir(Retry).
Due to the issues during the linking phase, it probably makes sense to do a relink once the installation is complete.
dbshut $ORACLE_HOME
cd $ORACLE_HOME/bin
./relink all
# Following line should return no errors.
grep -i err $ORACLE_HOME/install/relink.log
dbstart $ORACLE_HOME
For more information see:
Oracle Database Installation Guide 12c Release 1 (12.1) for Linux
Automating Database Startup and Shutdown on Linux
Hope this helps. Regards Tim…