In CentOS 6.5, Oracle 12c is automatically started upon startup.
In Linux, the Oracle Database Service is automatically started at any time by default, unlike in Windows. In Linux, You need to manually set the settings to enable automatic Oracle startup upon startup. This article will teach you how to set it step by step.
Methods and steps
First, you must ensure that you have installed Oracle 12c in CentOS 6.5 Linux and the mobile phone can start Oracle.
1. log on to Linux as a root user
2. type the command "vi/etc/oratab" (use the vi editor to edit the file/etc/oratab ),
3. After Entering the vi Editor, find "orcl:/u01/app/oracle/product/12.1.0/dbhome_1: N" and change it to "orcl: /u01/app/oracle/product/12.1.0/dbhome_1: Y ". Save the modification and exit vi.
Note: orcl is the Instance name;/u01/app/oracle/product/12.1.0/dbhome_1 is the oracle Installation Directory; it varies depending on the installation conditions.
4. type the command "vi/etc/rc. d/rc. local ",
5. In the vi Editor, add:
Su oracle-lc "/u01/app/oracle/product/12.1.0/dbhome_1/bin/lsnrctl start"
Su oracle-lc/u01/app/oracle/product/12.1.0/dbhome_1/bin/dbstart
Note:/u01/app/oracle/product/12.1.0/dbhome_1 is the installation directory of oracle, which must be modified according to the actual situation.
Save and exit vi.
Try restarting ~ Success!