Installing Oracle 19c on RHEL 7.7
Prerequisites
Step 1: Installing GNOME Desktop
yum group list
yum groupinstall 'Server with GUI'
Check GNOME version:
gnome-shell --version
Step 2: Creating Oracle required user & group
groupadd dba
useradd oracle
usermod -g dba oracle
passwd oracle
mkdir -p /u01/app/oracle/product/19.3.0/dbhome_1
mkdir -p /u02/oradata
chown -R oracle:oinstall /u01 /u02
chmod -R 775 /u01 /u02
Step 3: Installing & Configuring VNCServer
Installing TIGERVNC
yum install tigervnc-server
cp /usr/lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service
Edit and update the line in file /etc/systemd/system/vncserver@:1.service
:
ExecStart=/usr/sbin/runuser -l root -c "/usr/bin/vncserver %i -geometry 1280x1024"
Add execute permission to file xstartup
, then set VNCServer password:
chmod 777 .vnc/xstartup
systemctl daemon-reload
vncpasswd
Start VNC Server:
systemctl enable vncserver@:1.service
systemctl start vncserver@:1.service # or `vncserver`
Check VNC Server status:
ps -ef | grep vnc
Terminate a VNC Session:
systemctl stop vncserver@:1.service # or `vncserver -kill :1`
Configuring VNC Server for Oracle user
cp /usr/lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:2.service
Edit and update the line in file /etc/systemd/system/vncserver@:.service
:
ExecStart=/usr/sbin/runuser -l oracle -c "/usr/bin/vncserver %i -geometry 1280x1024"
Change to oracle
user and set vncpasswod:
su - oracle
vncpasswd
Remember the connection port is 5902
for Oracle because 5901
is for previous root user.
Installing Oracle 19c
Step 4: Downloading Oracle 19c installation file
Download Oracle Database 19c (19.3) for Linux x86-64
Step 5: Installing Oracle Installation Prerequisites
yum install -y https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm
Copy Oracle 19c installation file to ORACLE_HOME:
cp LINUX.X64_193000_db_home.zip /u01/app/oracle/product/19.3.0/dbhome_1/
Reboot and login with newly created user oracle:
reboot
Step 6: Setting Environment variables
Edit .bash_profile
and add following variables:
# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=arandy.cm
export ORACLE_UNQNAME=cdb1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19.3.0/dbhome_1
export ORA_INVENTORY=/u01/app/oraInventory
export ORACLE_SID=cdb1
export PDB_NAME=pdb1
export DATA_DIR=/u02/oradata
export PATH=/usr/sbin:/usr/local/bin:$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
To take effect with command . .bash_profile
Step 7: Unzip the File
cd $ORACLE_HOME
unzip LINUX.X64_193000_db_home.zip
Step 8: Run the Installer
$ cd $ORACLE_HOME
$ ./runInstaller
Follow the screenshots to install:
Login as root in another terminal, execute the following script(s):
# /u01/app/oraInventory/orainstRoot.sh
# /u01/app/oracle/product/19.0.0/dbhome_1/root.sh
Creating a database
$ lsnrctl start
# Use DBCA to create a database in interactive GUI mode
$ dbca
Install SQL Developer to connect & verify: