In the Linux system, to set the boot, it is necessary to implement it through code. By writing a script to add the service to the Linux boot entry, this article will introduce the process of setting up DB2 and other services in the Linux system.
1. Go to the /etc/init.d directory.
Executing as root
Shell code
cd /etc/init.d
2. Writing DB2 startup scripts
Shell Code
vi startDB2
Enter the following
Shell Code
#! /bin/sh
# chkconfig: 2345 99 01
# processname:IBMDB2
# description:db2 start
DB2_HOME=“/home/Db2inst1/sqllib” #Install db2 user's sqllib
DB2_OWNER=“db2inst1” #db2username
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”
;;
restart
on enterprise servers Linux systems are important, and ordinary computer users may have a hard time
During Linux system operation, the terminal interface prompts -bash-2.05b$ after booting, which caus
On Linux systems, it is often necessary to clean up some of the larger files to exp
The so-called dynamic ip refers to the DHCP service. If you do not need to manually set the IP addre
Linux MyEclipse start Tomcat too slow how to do?
How Linux uses the command line to clean up the disk to increase the space
Ubuntu system configuration Ruby On Rails development environment method
Linux system how to set up security management
Linux is a way to execute programs as other users.
Ubuntu using the command to delete the PPA repository
RedHat download and install JDK method
Solution for adb connection failure under Mac or Linux
Suggestions for Linux system desktops
Linux system Rhythmbox player how to solve Chinese garbled?
What if the CentOS 5.5 system does not recognize the Atheros AR8151 NIC?
Windows7 error 1053: The service did not respond in time to start or control request solution
Unplug the USB keyboard/mouse from sleep, the computer will wake up.
Windows XP taskbar problem full contact
Microsoft set up 100 Windows7 technology consulting service stations in Taiwan
How to solve the Windows7 compatibility problem?
Using Rainmeter to beautify the Windows 7 interface beyond the interface of the Apple
Eight steps to quickly set up wireless network under XP
How can win 7 and win xp be able to visit each other smoothly in the LAN?
Windows XP Personal Network Online Firewall Five Steps to Get