Oracle 12c Startup and Shutdown Guide for RHEL 7.
BEFORE SHUTTING DOWN THE SERVER
1. Login as Oracle User:
$ su - oracle
2. Stop the Oracle Database:
$ sqlplus / as sysdba
SQL> SHUTDOWN IMMEDIATE;
SQL> EXIT;
3. Stop the Listener:
$ lsnrctl stop
(Optional) If Enterprise Manager (OEM/EM Express) is configured, stop it too.
----------------------------------------------
AFTER STARTING THE SERVER
1. Login as Oracle User:
$ su - oracle
2. Set Environment Variables (if not in ~/.bash_profile):
$ export ORACLE_BASE=/u01/app/oracle
$ export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/dbhome_1
$ export ORACLE_SID=orcl (or your actual SID)
$ export PATH=$ORACLE_HOME/bin:$PATH
Or simply run:
$ source ~/.bash_profile
3. Start the Listener:
$ lsnrctl start
4. Start the Database:
$ sqlplus / as sysdba
SQL> STARTUP;
SQL> EXIT;
----------------------------------------------
OPTIONAL: Automate Oracle Startup on Boot
You can edit /etc/oratab and create a systemd or init.d script.