oracle11g在CentOS6.9上启动脚本
#!/bin/bash
# chkconfig:2345 99 10
# description: Startup Script for oracle Database
# /etc/init.d/oracle
# time 2017-08-11 by justzhi
export ORACLE_BASE="/oracle/ora11g"
export ORACLE_HOME="$ORACLE_BASE/app"
export ORACLE_OWNER=oracle
if [ ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_HOME ]
then
echo "Oracle startup:cannot start "
exit 1
fi
#depending on parameter -- start,stop,restart,
#of the instance and listener or usage display
case "$1" in
start)
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl start"
echo "Starting Oracle:"
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/emctl start dbconsole"
touch /var/lock/subsys/oracle11g
echo "OK"
;;
stop)
#oracle listener and instance shutdown
echo -n "Shutdown Oracle"
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/emctl stop dbconsole"
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbshut "
rm -f /var/lock/subsys/oracle11g
echo "ok"
;;
status)
if ( pgrep "tnslsnr" && netstat -anpt | grep ":1521") &> /dev/null
then
echo " Oracle 11g Net Listener is running."
else
echo "Oracle 11g Net listener is not running"
fi
if (netstat -anpt|grep ":1158" && netstat -anpt |grep ":5520") &> /dev/null
then
echo "Oralce 11g Enterprise Mannager is running"
else
echo "Oracle 11g Enerprise Mannager is not running"
fi
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
exit 0
oracle11g在CentOS6.9上启动脚本的更多相关文章
- 在CentOS6.9上Shell脚本定时释放内存cache
一.写Shell脚本 mkdir -p /var/script/ vim /var/script/freemem.sh 写入以下Shell脚本: #!/bin/bash # 当前已使用的内存大小 us ...
- centos6服务启动脚本及开机启动过程
centos6服务启动脚本 centos6的服务启动脚本都放在/etc/rc.d/init.d/下,/etc/init.d/是/etc/rc.d/init.d/的软链接: centos6的服务启动脚本 ...
- Redis 3 在CentOS 6.5上安装笔记,含启动脚本
Redis的强大就不多说了,直接上菜. 第1步:下载.编译.安装 cd /opt wget http://download.redis.io/releases/redis-3.0.5.tar.gz . ...
- centos6.8上yum安装zabbix3.2
centos6.8上yum安装zabbix3.2 zabbix3.2安装文档:https://www.zabbix.com/documentation/3.2/manual/installation/ ...
- 自己编写的:centos6.6上编译安装apache2.4+php5.6+mysql5.6【亲自】
在centos6.6上安装apache2.4+php5.6+mysql5.6 关于wget的安装 将之前装系统的.iso文件挂载到光驱 由于我在/home/jinnan/下建立了一个cdrom文件夹 ...
- CentOS6和7启动流程
CentOS6启动流程 https://linux.cn/article-8807-1.html BIOS 开机自检,硬件自检 MBR MBR磁盘分区是一种使用最为广泛的分区结构,它也被称为DOS分区 ...
- 改进uwsgi启动脚本,使其支持多个独立配置文件
最近在研究flask,在架设运行环境的时候犯了难.因为我想把每个独立的应用像NGINX处理多个网站那样,每个应用单独一个配置文件.而网上流传的uwsgi启动脚本都只支持单个配置文件.虽然有文章说可以把 ...
- 最新版CentOS6.5上安装部署ASP.NET MVC4和WebApi
最新版CentOS6.5上安装部署ASP.NET MVC4和WebApi 使用Jexus5.8.1独立版 http://www.linuxdot.net/ ps:该“独立版”支持64位的CentOS ...
- CentOS6.5上Oracle11gR2静默安装
一.环境准备环境 操作系统:CentOS release 6.5 (Final) 内核版本:2.6.32-431.el6.x86_64 物理内存:2G(必须大于1G) swap分区:3G(必须大于3G ...
随机推荐
- 【Leetcode】Largest Rectangle in Histogram
Given n non-negative integers representing the histogram's bar height where the width of each bar is ...
- PHP7.1新特性一览
PHP7.0的性能是PHP5.6的两倍 http://www.phpchina.com/article-40237-1.html 可空类型 list 的方括号简写 void 返回类型 类常量属性设定 ...
- [例] 用MappedByteBuffer更新文件内容
import java.io.IOException; import java.io.RandomAccessFile; import java.nio.MappedByteBuffer; impor ...
- day_02 循环格式化输出编码运算符
1.while循环 语法 while 条件: 循环体 else: 当条件不成立的时候执行这里,和break没关系 如果循环是通过break退出的. 那么while后面的else将不会被执行, 只有在w ...
- slf4j与log4j、log4j2
https://blog.csdn.net/yangzl2008/article/details/81503579 https://blog.csdn.net/HarderXin/article/de ...
- 异地clone RAC数据库 +ASM USE RMAN
###sample 如何在本地生成数据库的备份,并复制到DG库新环境(高级) 1. 首先确定本地文件系统(存放备份集)足够大,可以使用如下语句查询当前数据库实际的使用总大小 Rman 备份进度: se ...
- spring配置文件中util:properties和context:property-placeholder
util:properties和context:property-placeholder标签都可以用来获取外部配置文件中的内容 1.util:properties 它是以声明bean方式来使用,创建了 ...
- 数据结构---Java---数组
**************************************************************前言************************************ ...
- 缺少Packages?不妨在这里找
一个很全的网站(Linux全平台,rpm,dpkg等) Packages Search
- SQL智能提示插件——SQLPrompt
1.安装SQLPrompt,直接点击下一步即可,然后打开SQL Server 在菜单栏找到SQLPrompt选项注册该软件 2.先断开网络,然后运行注册机,将注册吗复制到序列号的地方,将两个勾选的复选 ...