CentOS 设置 ogg mgr 开机自启

试验环境:
试验环境软件版本
操作系统CentOS 7
ogg安装目录/home/oracle/ggs
数据库oracle
  • 使用 oracle 用户登陆 CentOS
  • 在 /home/oracle 目录创建 info.txt 文件
    注:请根据实际环境更改目录,文件应与ogg目录同级
// 创建 info.txt 文件
[oracle@custom04 ~]$ touch info.txt
// 编辑 info.txt 文件
[oracle@custom04 ~]$ nano info.txt
[oracle@custom04 ~]$ chmod +x info.txt

添加配置:

sh date
start mgr

// 创建 info.txt 文件
[oracle@custom04 ~]$ touch startmgr.sh
// 编辑 info.txt 文件
[oracle@custom04 ~]$ nano startmgr.sh
[oracle@custom04 ~]$ chmod +x startmgr.sh

添加配置:

/home/oracle/ggs/ggsci paramfile /home/oracle/info.txt >> /home/oracle/ggstartoutput.txt

  • 切换到 root 用户,编辑 /home/etc/rc.local 文件
[root@custom04 etc]# nano rc.local

添加配置:

su - oracle -c “/home/oracle/startmgr.sh”

  • 测试

停止 mgr 进程
用root用户执行:su - oracle -c “/home/oracle/startmgr.sh”
查看 mgr 进程是否启动

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值