Rootop 服务器运维与web架构

2012-08-22
发表者 Venus
暂无评论

redhat5.5_x64 oracle 11g r2 自启动脚本

数据库启动关闭脚本:

#!/bin/sh
# chkconfig: 345 61 61
# description: Oracle 11g AutoRun Services
# /etc/init.d/oracle
#
# Run-level Startup script for the Oracle Instance, Listener, and
# Web Interface

export ORACLE_BASE=/u01
export ORACLE_HOME=$ORACLE_BASE/oracle
export ORACLE_SID=venus
export PATH=$PATH:$ORACLE_HOME/bin
ORA_OWNR=”oracle”

# if the executables do not exist — display error
if [ ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_HOME ]
then
echo “Oracle startup: cannot start”
exit 1
fi

# depending on parameter — startup, shutdown, restart
# of the instance and listener or usage display

case “$1” in
start)
# Oracle listener and instance startup
su $ORA_OWNR -lc $ORACLE_HOME/bin/dbstart
echo “Oracle Start Succesful!OK.”
;;
stop)
# Oracle listener and instance shutdown
su $ORA_OWNR -lc $ORACLE_HOME/bin/dbshut
echo “Oracle Stop Succesful!OK.”
;;
reload|restart)
$0 stop
$0 start
;;
*)
echo $”Usage: `basename $0` {start|stop|reload|reload}”
exit 1
esac
exit 0

EM启动关闭脚本(enterprise manager)

#!/bin/sh
# chkconfig: 345 61 61
# description: Oracle 11g AutoRun Services
# /etc/init.d/oraemctl
#
# Run-level Startup script for the Oracle Instance, Listener, and
# Web Interface

export ORACLE_BASE=/u01
export ORACLE_HOME=$ORACLE_BASE/oracle
export ORACLE_SID=venus
export PATH=$PATH:$ORACLE_HOME/bin
ORACLE_OWNER=”oracle”

case “$1″ in
start)
echo -n $”Starting Oracle EM DB Console:”
su – $ORACLE_OWNER -c “$ORACLE_HOME/bin/emctl start dbconsole”
echo “OK”
;;
stop)
echo -n $”Stopping Oracle EM DB Console:”
su – $ORACLE_OWNER -c “$ORACLE_HOME/bin/emctl stop dbconsole”
echo “OK”
;;
*)
echo $”Usage: $0 {start|stop}”
esac

以上特别注意红色部分跟实际环境要一致。

redhat5.5_x64 oracle 11g r2_x64 安装文档:

https://www.rootop.org/pages/1075.html

2012-08-16
发表者 Venus
IIS7.5 500 内部服务器错误 您查找的资源存在问题,因而无法显示显示已关闭评论

IIS7.5 500 内部服务器错误 您查找的资源存在问题,因而无法显示显示

      今儿在排查一asp站的错误,就是不显示详细错误信息。

IE中去掉勾选 显示友好http错误信息 还是不行。最后在iis中找到修改参数:

依次找到:错误页-编辑功能设置-选择“详细错误”即可。

2012-08-13
发表者 Venus
the NTP socket is in use, exiting已关闭评论

the NTP socket is in use, exiting

[root@localhost ~]# /usr/sbin/ntpdate 210.72.145.44 && hwclock -w
13 Aug 08:53:48 ntpdate[16991]: the NTP socket is in use, exiting
[root@localhost ~]# /usr/sbin/ntpdate 210.72.145.44

系统已经启动了ntpd服务,那么再用ntpdate同步时间就会出错,我这里直接用命令向网络服务器同步,所以直接把服务停掉即可。

[root@localhost ~]# service ntpd stop
Shutting down ntpd:                                        [  OK  ]

[root@localhost ~]# /usr/sbin/ntpdate 210.72.145.44 && hwclock -w
13 Aug 08:55:21 ntpdate[17014]: adjust time server 210.72.145.44 offset -0.010785 sec
[root@localhost ~]# chkconfig ntpd off

2012-08-08
发表者 Venus
Centos 6.2 中没有crontab命令已关闭评论

Centos 6.2 中没有crontab命令

      本要做个任务计划,结果执行crontab发现没有此命令,最后确定是vixie-cron这个rpm包。

[root@localhost ~]# yum install -y vixie-cron

(精简的忒狠了)

ntpdate命令也木有了 %>_<%

yum install -y ntpdate