oracle的开机自启
ORACLE 开机自启配置
linux 下配置单机开机自启
2,redhat操作系统下面,用dbstart的方式
2.1,测试
[oracle@localhost ~]$ /oracle/app/oracle/product/11.2.0/dbhome_1/bin/dbstart
ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener
Usage: /oracle/app/oracle/product/11.2.0/dbhome_1/bin/dbstart ORACLE_HOME
[oracle@localhost ~]$
有报错信息,提示ORACLE_HOME不识别,如下解决方案,修改dbstart和dbstut,有的版本dbstut找不到不存在,可以忽略。
vim /oracle/app/oracle/product/11.2.0/dbhome_1/bin/dbstart
vim /oracle/app/oracle/product/11.2.0/dbhome_1/bin/dbshut
将
ORACLE_HOME_LISTNER =$1
改成
ORACLE_HOME_LISTNER=$ORACLE_HOME
2.2,
[root@localhost ~]# vim /etc/oratab
powerdes:/oracle/app/oracle/product/11.2.0/dbhome_1:Y
2.3 在rc.local里面设置开机自启动
[root@localhost bin]# vim /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
su - oracle -lc "/oracle/app/oracle/product/11.2.0/dbhome_1/bin/lsnrctl start"
su - oracle -c "/oracle/app/oracle/product/11.2.0/dbhome_1/bin/dbstart"
注意:
如果重启自启不生效,应该给下面的文件授权:
chmod +x /etc/rc.d/rc.local
db服务器重启生效。
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 微软正式发布.NET 10 Preview 1:开启下一代开发框架新篇章
· 没有源码,如何修改代码逻辑?
· PowerShell开发游戏 · 打蜜蜂
· 在鹅厂做java开发是什么体验
· WPF到Web的无缝过渡:英雄联盟客户端的OpenSilver迁移实战