# 1. User & Group
groupadd -g 54321 oinstall
groupadd -g 54322 dba
useradd -u 54321 -g oinstall -G dba oracle
passwd oracle
# 2. Install Preinstall & Oracle DB
yum install -y oracle-database-preinstall-19c
yum install -y oracle-database-ee-19c-1.0-1.x86_64.rpm
# 3. Set Password Default
export ORACLE_PASSWORD=xxxxx
# 4. Create & Start Database
/etc/init.d/oracledb_ORCLCDB-19c configure
# 5. Tambah Environment di .bashrc
echo 'export ORACLE_HOME=/opt/oracle/product/19c/dbhome_1' >> ~/.bashrc
echo 'export ORACLE_SID=ORCLCDB' >> ~/.bashrc
echo 'export PATH=$ORACLE_HOME/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
# 6. Ganti Password SYS & SYSTEM
su - oracle
/opt/oracle/product/19c/dbhome_1/bin/oraenv # ORCLCDB
sqlplus / as sysdba
ALTER USER sys IDENTIFIED BY newpass;
ALTER USER system IDENTIFIED BY newpass;
Info Penting
-
ORACLE_HOME:
/opt/oracle/product/19c/dbhome_1
-
ORACLE_BASE:
/opt/oracle/
-
Listener:
1521
-
EM:
https://localhost:5500/em