Wednesday, November 6, 2024

.::: Install Oracle 12C in Centos 8 :::.

 1. Update Sistem <optional>

sudo dnf update -y

2. Install package

sudo dnf install -y binutils compat-libcap1 compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libX11 libXau libXi libXtst libXrender libXrender-devel libgcc libstdc++ libstdc++-devel libxcb make smartmontools sysstat

3. Create user & Group

sudo groupadd oinstall
sudo groupadd dba
sudo useradd -g oinstall -G dba oracle
sudo passwd oracle


4. create directory

sudo mkdir -p /u01/app/oracle/product/12.2.0/dbhome_1
sudo chown -R oracle:oinstall /u01
sudo chmod -R 775 /u01


5. edit kernel paramater /etc/sysctl.conf

sudo tee -a /etc/sysctl.conf <<EOF
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
EOF


6. update
sudo sysctl -p

7. edit limit /etc/security/limits.conf

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 32768


8. create oracle profile

[oracle@teguhth ~]$ cat .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
    . ~/.bashrc
fi

# User specific environment and startup programs

#PATH=$PATH:$HOME/.local/bin:$HOME/bin

#i#export PATH
# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_BASE=/u01/app/oracle/
export ORACLE_HOME=/u01/app/oracle/product/12.2.0/dbhome_1
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_SID=tgh
[oracle@teguhth ~]$


9. restart machine
init 6

10. login as user oracle & extract software

unzip V839960-01.zip
cd database
mv * /u01/app/oracle/product/12.2.0/dbhome_1


11. run Installer (as user oracle)

# Fake Oracle Linux 7.
export CV_ASSUME_DISTID=OEL7.6

# Fake Oracle Linux 8.
export CV_ASSUME_DISTID=OEL8

cd /u01/app/oracle/product/12.2.0/dbhome_1
./runInstaller


12. GUI Install
 
13. run root

As a root user, execute the following script(s):
        1. /u01/app/oraInventory/orainstRoot.sh
        2. /u01/app/oracle/product/19.0.0/dbhome_1/root.sh


14. login

[root@teguhth ~]# su - oracle
Last login: Tue Nov  5 14:58:18 WIB 2024
[oracle@teguhth ~]$ sqlplus

SQL*Plus: Release 12.2.0.1.0 Production on Tue Nov 5 14:59:00 2024

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

Enter user-name: sys as sysdba
Enter password:
Connected to an idle instance.

SQL>

15. create booting automatic


https://teguhth.blogspot.com/2022/09/enable-automate-startupshutdown-of.html
tgh:/u01/app/oracle/product/12.2.0/dbhome_1:Y

No comments:

Post a Comment

Popular Posts