主程序,启动,fork一个进程,再exec redis程序,这样可以获取到redis的进程ID,根据进程ID,在主进程中每N秒/毫秒都行,检查对应进程ID的程序还是不是redis,如果不是,立马重启。程序写成守护进程。
第二写shell脚本,思路基本同上。区别,shell脚本,可以比对程序名称,监听时间间隔可能只能到秒级。
错误提示是没有权限,网上搜了下看到:The Unix permissions for the hidden directory /tmp/.oracle should be:
Owner = the Oracle user who performed the database install,
Group = the dba group of the Oracle user,
and the directory's Unix permissions should be drwxrwxrwx
试试:
1) 进入/tmp目录
# cd /var/tmp(on Solaris Linux)
或者
# cd /tmp(on Hp and IBM)
2) 修改权限
# chown -R oracle10:dba .oracle
或者
# chmod 777 .oracle
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)