Oracle 18c CENTOS7 Set boot automatically starts Oracle

Source: Internet
Author: User

Learn from:

http://blog.csdn.net/condywl/article/details/57129696

1. Modify the configuration file under root user/etc/oratab

vim/etc/oratab Content: # This file isUsed by ORACLE utilities. It iscreated by root.sh# and updated by either Database Configuration Assistant whilecreating# a database or ASM Configuration Assistant whilecreating ASM instance.# A Colon,':', isUsed asThe field terminator. ANewLine terminates# the entry. Lines beginning with a pound sign,'#', is comments.## Entries is of the form:# $ORACLE _sid: $ORACLE _home:<n| Y>: # # The first and second fields is the system identifier and home# directory of the database respectively. The third field indicates# to the Dbstart utility, the database should,"Y", or should not,#"N", be brought-on system boot time.## multiple entries with the same $ORACLE _sid is not allowed.# #orcl:/u01/app/oracle/product/18.1.0/dbhome_1:y

Depending on the information, the latter is a modified line of information:

orcl:/u01/app/oracle/product/18.1. 0/dbhome_1:y

2. Switch to Oracle user and go to Oracle's home path

Su- oraclecd $ORACLE _home/bin

3. Edit Dbstart and Dbshut files in the Oracle home directory

Main modification points:

Modify multiple to $ORACLE _home

and modify the oraclebasehome_exec to the following.

orabasehome_exec= $ORACLE _home/bin

Perform operational tests in the bin directory

./dbshut and./dbstart Verify that the database is turned on or off normally

Verify that the LSNRCTL status and Oracle Sqlplus/as SYSDBA are available below

4. Modify the boot-up script.

Switch to root user

Su-/etc/rc.d/rc.local
#这里需要给rc. Local Add executable permissions
chmod +x/etc/rc.d/rc.local
After Systemd Linux should have not primarily supported rc.local under Boot mode.

Add a line at the end of the document

SU-ORACLE-LC Dbstart

5. Reboot Linux verifies that Oracle can automatically start up.

Oracle 18c CENTOS7 Set boot automatically starts Oracle

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.