免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 951 | 回复: 1
打印 上一主题 下一主题

How to start iAS (1.0.2) automatically at system startup on [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-05-05 18:02 |只看该作者 |倒序浏览
书签 固定字体  转到末尾

文档 ID:  注释:136947.1
主题:  How to start iAS (1.0.2) automatically at system startup on Linux?
类型:  BULLETIN
状态:  PUBLISHED
内容类型:  TEXT/PLAIN
创建日期:  14-MAR-2001
上次修订日期:  19-NOV-2002


PURPOSE -------  The purpose of this article is to provide a solution to start up and shut down the Oracle HTTP Server powered by Apache automatically during Linux system startup and shutdown. There is no documentation in the Oracle9i Application Server installation manual about the configuration of the Linux system when it starts up. A possible way to resolve this issue is documented in this note.   SCOPE & APPLICATION -------------------  This bulletin may be useful for Oracle9i Application Server developers and system administrators who are responsible for configuring and tuning the Oracle HTTP Server powered by Apache.  System reboot procedure may differ for each Linux distribution. For more specific information, refer to the appropriate operating system specific documentation. Provided process can be applied to Linux distributions using System V initialization.   HOW DOES LINUX SYSTEM INITIALIZATION WORK? ------------------------------------------  System initialization starts when the OS kernel bootup finishes. After init is invoked as the last step of the kernel boot sequence, it reads its configuration information from the 'inittab' file. The 'inittab' file tells how to set up the whole system. The 'initdefault' entry determines the initial runlevel of the system.  A runlevel is a software configuration of the system which allows only a selected group of processes to exist. System V runlevels run from 0 to 6 by default, each runlevel corresponding to a different mode of operation. The processes spawned by init for each of these runlevels are defined in the /etc/inittab file.   System V initialization scripts are to start and stop daemons located in the /etc/rc.d directory. This directory has more subdirectories one for each runlevel: rc0.d to rc6.d and init.d. The /etc/rc.d/rc<n>;.d directories contains links to the scripts stored in the /etc/rc.d/init.d. These links are named using the following syntax:   [K | S][two-digit number][filename]  Names beginning with a capital 'S' mean scripts that are called at startup, however links beginning with capital 'K' indicate scripts that are called at shutdown. Scripts having larger numbers in their names are executed after that those having lower numbers. This method ensures that the correct daemons are running in each runlevel and are stopped and started in the correct order. For example, Oracle startup scripts typically contain larger numbers in their names, such as 'S99oracle' or 'S99ias', indicating that these scripts should be run after the system has already been started up. However, Oracle shutdown scripts, usually contain smaller numbers, such as 'K01oracle' or 'K01ias' indicating that these scripts should be run before the system shutdown.  Initialization can be used for root to start and stop processes from the command line by calling the suitable script in the /etc/rc.d/init.d directory with argument start or stop. During startup appropriate start and stop parameters are passed to the initialization scripts by the system automatically. For example, if it is running 'S99ias', the 'iasmanager' script is called with a start argument.  Relevant files and directories: -------------------------------   /etc/inittab - Determines how the init process should set up the system in a certain runlevel.  /etc/rc.d - Contains runlevel directories.  /etc/rc.d/rc0.d - Contains scripts to start and stop processes at runlevel 0.  /etc/rc.d/rc3.d - Contains scripts to start and stop processes at runlevel 3.  /etc/rc.d/rc3.d/S99ias - Link to the /etc/rc.d/init.d/iasmanager script.  /etc/rc.d/rc0.d/K01ias - Link to the /etc/rc.d/init.d/iasmanager script.  /etc/rc.d/init.d/iasmanager - The 'iasmanager' wrapper script.  The 'iasmanager' script is a simple call-wrapper script:  <<<Begin of the script>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;  #!/bin/sh su - <ias_owner>; -c "<$IAS_HOME>;/bin/iasmanager.sh $1"  <<<End of the script>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;  where <ias_owner>; is the user who owns the Oracle9i Application Server installation and <$IAS_HOME>; is the root directory of the whole Oracle9i Application Server bundle.   HOW TO CONFIGURE IAS TO START AUTOMATICALLY? --------------------------------------------  1. Login as the owner of Oracle9i Application Server.  2. Put the 'Oracle HTTP Server powered by Apache startup and shutdown' script provided below    into the directory defined in the 'iasmanager' script. For example, $IAS_HOME/bin directory.  3. Login as the root user.                                                        4. Put the 'iasmanager' shell script described above into the /etc/rc.d/init.d directory.  5. Change the current directory to /etc/rc.d/rc<n>;.d, where <n>; means the default runlevel    of the system defined in the 'inittab' file.  6. Create a symbolic links as follows:                                               ln -s ../init.d/iasmanager S99ias                                                ln -s ../init.d/iasmanager K01ias  7. Reboot the machine.   After rebooting, the Oracle HTTP Server powered by Apache is up and running to listen for incoming requests.   Oracle HTTP Server powered by Apache startup and shutdown script ----------------------------------------------------------------  Provided script below is invoked during system startup and shutdown, respectively and it is able to start, stop and restart the Oracle HTTP Server.  - To start the Oracle HTTP Server issue:   . ./iasmanager start  - To stop the Oracle HTTP Server issue:   . ./iasmanager stop  - To restart the Oracle HTTP Server issue:   . ./iasmanager restart  <<<Begin of the script>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;  #!/bin/sh # Oracle HTTP Server powered by Apache startup and shutdown script  # ------------------------------------------- # Environment variables for Oracle HTTP Server # -------------------------------------------  ORACLE_BASE=/usr1/app/oracle; export ORACLE_BASE ORACLE_HOME=$ORACLE_BASE/product/iAS_1.0.2; export ORACLE_HOME  IAS_HOME=$ORACLE_HOME; export IAS_HOME  APACHE_BASE=$IAS_HOME/Apache; export APACHE_BASE APACHE_HOME=$APACHE_BASE/Apache; export APACHE_HOME APACHE_ADMIN=$APACHE_HOME/conf; export APACHE_ADMIN  CALYPSO_HOME=$IAS_HOME/webcache  DEV6i_HOME=$IAS_HOME/6iserver  PATH=/bin:/usr/local/bin:/usr/bin:/usr/openwin/binPATH PATH=$ORACLE_HOME/binAPACHE_HOME/binCALYPSO_HOME/binDEV6i_HOMEDEV6i_HOME/binPATH  LD_LIBRARY_PATH=/usr/openwin/bin:/usr/ucblib LD_LIBRARY_PATH=$LD_LIBRARY_PATHORACLE_HOME/libORACLE_HOME/jdbc/libAPACHE_BASE/jdk/lib  OPENSSL_CONF=$APACHE_BASE/open_ssl/bin/openssl.cnf  NLS_LANG=AMERICAN_AMERICA.UTF8  if [ "$1" ] then    case $1 in         start) action=$1 ;;         stop) action=$1 ;;         restart) action=$1 ;;         *) action=No             echo "`basename $0`: incorrect action specified"            echo "Usage: `basename $0` { start | stop | restart } "            action=            #exit 1    esac    shift else    action=No    echo "`basename $0`: no action specified"    echo "Usage: `basename $0` { start | stop | restart } "    #exit 1 fi  if [ "$action" = "start" ] then   pids=`ps --columns 500 -ef | grep $APACHE_HOME | grep httpd | awk '{print $2}'`   if [ "$pids" ]   then     echo "Oracle HTTP Server powered by Apache is already up and running."   else     echo "Starting Oracle HTTP Server powered by Apache..."     httpdsctl start   fi fi  if [ "$action" = "stop" ] then   pids=`ps --columns 500 -ef | grep $APACHE_HOME | grep httpd | awk '{print $2}'`   if [ "$pids" ]   then     echo "Stopping Oracle HTTP Server powered by Apache..."     httpdsctl stop   else     echo "Could not find running instance of Oracle HTTP Server powered by Apache."   fi fi  if [ "$action" = "restart" ] then   httpdsctl restart fi  <<<End of the script>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;>;    To be able to use the above script with the Oracle HTTP Server  included in the Database 9i , replace 'httpdsctl' by apachectl  (or create a symbolic link for it).   RELATED DOCUMENTS -----------------  Linux System Administrator's Manual, 'init' and 'inittab' pages The Linux Online - http://www.linux.org/docs/index.htm
.  

--------------------------------------------------------------------------------

Copyright (c) 1995,2000 Oracle Corporation. All Rights Reserved. 法律声明和使用条款。  

[/code][/url]

论坛徽章:
0
2 [报告]
发表于 2003-05-05 18:04 |只看该作者

How to start iAS (1.0.2) automatically at system startup on

又不行了!这个从METALINK拷入的网页如何能正确设置呢?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP