Linux As4单实例Oracle系统启动/关闭脚本

2014-11-24 17:39:10 · 作者: · 浏览: 0

#chkconfig: 2345 99 01
#de.ion: init . to start/stop oracle database 10g, TNS listener, EMS
其中chkconfig:2345 99 01 是指脚本将为运行级2、3、4、5启动oracle 10g服务,启动优先级为99,关闭优先级为01。
3. 脚本的权限和服务添加操作
1) 使用root用户登录,把文件copy到/etc/rc.d/init.d/目录下
2) 赋予执行权限
[root@localhost ~]#cd /etc/init.d
[root@localhost init.d]#chown oracle oracle
[root@localhost init.d]#chmod 755 oracle
3) 建立符号链接

[root@localhost ~]# cd /etc/rc2.d
[root@localhost rc2.d]#ln -s /etc/rc.d/init.d/oracle S99oracle
[root@localhost init.d]# chkconfig --list oracle
[root@localhost init.d]# chkconfig --level 2345 oracle .
重启系统,就可以在启动的过程中看到 Starting oracle,因为我们设置的优先级为99,一般是最后启动。[OK]以后就可以了。因为要启动emctl,可能有点慢,等待的时间要稍微长一点。
注意:要修改/etc/oratab文件
orcl:/opt/app/oracle/product/10.2.0/db_1:N (将N该为Y)


版权声明:原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://hehehe.blog.51cto.com/205455/127440