Set up Oracle boot automatically under Linux system

Source: Internet
Author: User

In a Linux system, after the Oracle database service is installed, it is not as if it were under the Windows system, and the Oracle service starts automatically with the system startup by default. Linux system, it is necessary for users to manually set up, in order to achieve automatic start of Oracle boot. This article will show you step by step how to set it up.

Install Oracle's Linux system (rhel7.4, Oracle 11g for example)

Method/Step 1, Prerequisites: You have correctly installed the Oracle service on your Linux system and can start normally using manual mode.
查看ORACLE_HOME是否设置$ echo $ORACLE_HOME/u01/app/oracle/product/11.2.0/dbhome_1
执行dbstart 数据库自带启动脚本[[email protected] ~]$ cd $ORACLE_HOME[[email protected] dbhome_1]$ cd bin/[[email protected] bin]$ dbstartORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener Usage: /u01/app/oracle/product/11.2.0/db_1/bin/dbstart ORACLE_HOME错误提示:ORACLE_HOME_LISTNER 没有设置[[email protected] bin]$ ll | grep dbs-rwxr-x---. 1 oracle oinstall 6088 1月 1 2000 dbshut-rwxr-x---. 1 oracle oinstall 13892 12月 11 16:01 dbstart编辑 dbstart,将ORACLE_HOME_LISTNER=$1修改成 ORACLE_HOME_LISTNER=$ORACLE_HOME 前提是$ORACLE_HOME环境设置正确[[email protected] bin]$ vi dbstart ORACLE_HOME_LISTNER=/u01/app/oracle/product/11.2.0/dbhome_1
2. Edit the file using the VI editor/etc/oratab
dbca建库时都会自动创建/etc/oratab文件#vi /etc/oratab将“orcl:/u01/app/oracle/product/12.1.0/dbhome_1:N”,改为“orcl:/u01/app/oracle/product/12.1.0/dbhome_1:Y”。修改完成后,保存退出

* * Description: * *ORCL is the instance name;/u01/app/oracle/product/12.1.0/dbhome1 is the Oracle installation directory and varies depending on the installation.

3. Edit the/etc/rc.d/rc.local startup file and add the database startup script Dbstart
#vi /etc/rc.d/rc.local末尾添加: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

* * Description: * */u01/app/oracle/product/12.1.0/dbhome1 is the Oracle installation directory, to be modified according to the actual situation.

4, restart the host, view the database and monitoring is self-booting

Set up Oracle boot automatically under Linux system

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.