Start DB2, WAS, and TDS at startup in linux. Run Shel as root
Start DB2, WAS, and TDS on linux: http://www.2cto.com/database/201207/141858.html Www.2cto.com http://www.2cto.com/os/201207/141862.html1 . Go to the/etc/init. d Directory. Run the Shell code cd/etc/init. d as root. 2. write the DB2 startup script Shell code vi startDB2 and enter the following Shell code #! /Bin/sh # chkconfig: 2345 99 01 # processname: IBMDB2 # description: db2 start DB2_HOME = "/home/db2inst1/sqllib" # install sqllib DB2_OWNER = "db2inst1" # db2 user name www.2cto.com case "$1" in start) echo-n "starting IBM db2" su-$ DB2_OWNER-c $ DB2_HOME/adm/db2start touch/var/lock/db2 echo "OK"; stop) echo-n "shutdown IBM db2" su-$ DB2_OWNER-c $ DB2_HOME/adm/db2stop rm-f/var/lock/db2 echo "OK"; re Start | reload) $0 stop $0 start; *) echo "usage: $0 start | stop | restart | reload" exit 1 www.2cto.com esac exit 0 3. write the script to start was and tds. Shell code vi startWasTds enter the following Shell code #! /Bin/sh # chkconfig: 2345 99 01 # processname: IBMTDSWAS # description: filenet was tds/opt/IBM/WebSphere/AppServer/profiles/AppSrvTds/bin/startServer. sh server1/opt/IBM/WebSphere/AppServer/profiles/cmdrv01/bin/startServer. sh server1/opt/IBM/WebSphere/AppServer/profiles/ilog/bin/startServer. sh serve1 # TDS/opt/ibm/ldap/V6.3/sbin/ibmdiradm-l dsrdbm01-t/opt/ibm/ldap/V6.3/sbin/ibmslapd parameter description: header comment: The linux command chkconfig requires that the file header must contain the following three Shell chkconfig codes: www.2cto.com # chkconfig: 2345 (default runlevel) 99 (startup priority) 01 (disable priority) # processname: process name # description: Process description 4. grant the file permission to the Shell code chmod-R 777 startDB2 chmod-R 777 startWasTds chkconfig -- add startDB2 chkconfig -- add startWasTds add boot successful. Author xkorey
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.