You are not logged in.
Hi guys,
I'm trying to install IBM DB2 9.7 Express-C on a remote machine that does not have xorg installed.
I've managed to enable forwarding X over ssh (tested on xeyes), but when i start db2setup, it doesn't do anything.
Output in console is this:
user@remotemachine$ ./db2setup
DBI1190I db2setup is preparing the DB2 Setup wizard which will guide
you through the program setup process. Please wait.
DBI1160I Non-root install is being performed.
If i login with root then the output is basically same:
user@remotemachine$./db2setup
DBI1190I db2setup is preparing the DB2 Setup wizard which will guide
you through the program setup process. Please wait.
I'm running latest arch with xfce4 with slim for starting DE.
Can anybody give me some poiners on how to install this?
Offline
I've managed to install it the manual way, but how can it now be ran like daemon through /etc/rc.d/ ?
Offline
Usefull reading:
http://publib.boulder.ibm.com/infocente … 011817.htm
http://www.dbforums.com/db2/1617101-how … linux.html
http://www.ibm.com/developerworks/forum … 4#13941864
But that is all about other linux distro's. So on my arch I just tested for you:
/opt/ibm/db2/v0.7/bin/db2iauto -on db2inst1
and re-booted. Yep, it works: you do not have to issue the "db2start" command anymore as instance-owner.
But, from a DB2 point-of-view, it does not add too much value. As from V9 of DB2 you have to make sure the database remains "up" all the time if you want to benefit from all the new features like STMM and automatic maintenance. So you still have to issue the command
db2 activate db ...
to stop the database from stopping after the last connection quits.
Somewhere between "too small" and "too large" lies the size that is just right.
- Scott Hayes
Offline
Thanks for the answer.
If anyone is interested, i've managed to make daemon script on my own. Please note that as a begginer i'm not sure if this is correct way to do it:
#!/bin/bash
#
# /etc/rc.d/db2d
#
# Run-level Startup script for the DB2 Databsse
export DB_USER=db2inst
if [ -f /home/db2inst/sqllib/db2profile ]; then
. /home/db2inst/sqllib/db2profile
fi
case "$1" in
start)
echo "" >> /var/log/db2.log
echo "----------------------------------------------------" >> /var/log/db2.log
echo "----------------------------------------------------" >> /var/log/db2.log
echo "Starting DB2 Database: " >> /var/log/db2.log
echo "----------------------------------------------------" >> /var/log/db2.log
date +"! %T %a %D : Starting DB2 Database" >> /var/log/db2.log
echo "----------------------------------------------------" >> /var/log/db2.log
echo "Starting DB2 Database: " >> /var/log/db2.log
su $DB_USER -c "$DB2DIR/bin/db2 db2start" >> /var/log/db2.log
echo "Done." >> /var/log/db2.log
echo "" >> /var/log/db2.log
echo "----------------------------------------------------" >> /var/log/db2.log
date +"! %T %a %D : Start completed." >> /var/log/db2.log
echo "----------------------------------------------------" >> /var/log/db2.log
touch /var/lock/db2d
echo "OK"
;;
stop)
echo "Shutting Down DB2 Database:" >> /var/log/db2.log
echo "----------------------------------------------------" >> /var/log/db2.log
date +"! %T %a %D : Shutting Down DB2 Databases" >> /var/log/db2.log
echo "----------------------------------------------------" >> /var/log/db2.log
echo "Shutting Down DB2 Database: " >> /var/log/db2.log
su $DB_USER -c "$DB2DIR/bin/db2 db2stop" >> /var/log/db2.log
echo "Done." >> /var/log/db2.log
echo "" >> /var/log/db2.log
echo "----------------------------------------------------" >> /var/log/db2.log
date +"! %T %a %D : Shutdown completed." >> /var/log/db2.log
echo "----------------------------------------------------" >> /var/log/db2.log
rm -f /var/lock/db2d
echo "OK"
;;
reload|restart)
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" >> /var/log/db2.log
echo "DB2 Restart Initiated... " >> /var/log/db2.log
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" >> /var/log/db2.log
$0 stop
$0 start
;;
*)
echo "Usage: `basename $0` start|stop|restart|reload"
exit 1
esac
exit 0
Can anyone comment if this is ok...?
Last edited by spendzo (2009-08-27 21:43:24)
Offline
Can anyone comment if this is ok...?
Yeah, it's great! I've tested it for you and I'm keeping it.:D Made some small adjustments. Thanks!
#!/bin/bash
#
# /etc/rc.d/db2d
#
# Run-level Startup script for the DB2 Databsse
export DB_USER=db2inst1
if [ -f /home/db2inst1/sqllib/db2profile ]; then
. /home/db2inst1/sqllib/db2profile
fi
case "$1" in
start)
echo "" >> /var/log/db2.log
echo "----------------------------------------------------" >> /var/log/db2.log
echo "----------------------------------------------------" >> /var/log/db2.log
echo "Starting DB2 Database: " >> /var/log/db2.log
echo "----------------------------------------------------" >> /var/log/db2.log
date +"! %T %a %D : Starting DB2 Database" >> /var/log/db2.log
echo "----------------------------------------------------" >> /var/log/db2.log
echo "Starting DB2 Database: " >> /var/log/db2.log
su $DB_USER -c "$DB2DIR/bin/db2 db2start" >> /var/log/db2.log
su $DB_USER -c "$DB2DIR/bin/db2 activate db sample" >> /var/log/db2.log
echo "Done." >> /var/log/db2.log
echo "" >> /var/log/db2.log
echo "----------------------------------------------------" >> /var/log/db2.log
date +"! %T %a %D : Start completed." >> /var/log/db2.log
echo "----------------------------------------------------" >> /var/log/db2.log
touch /var/lock/db2d
echo "OK"
;;
stop)
echo "Shutting Down DB2 Database:" >> /var/log/db2.log
echo "----------------------------------------------------" >> /var/log/db2.log
date +"! %T %a %D : Shutting Down DB2 Databases" >> /var/log/db2.log
echo "----------------------------------------------------" >> /var/log/db2.log
echo "Shutting Down DB2 Database: " >> /var/log/db2.log
su $DB_USER -c "$DB2DIR/bin/db2 deactivate db sample" >> /var/log/db2.log
su $DB_USER -c "$DB2DIR/bin/db2 db2stop force" >> /var/log/db2.log
echo "Done." >> /var/log/db2.log
echo "" >> /var/log/db2.log
echo "----------------------------------------------------" >> /var/log/db2.log
date +"! %T %a %D : Shutdown completed." >> /var/log/db2.log
echo "----------------------------------------------------" >> /var/log/db2.log
rm -f /var/lock/db2d
echo "OK"
;;
reload|restart)
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" >> /var/log/db2.log
echo "DB2 Restart Initiated... " >> /var/log/db2.log
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" >> /var/log/db2.log
$0 stop
$0 start
;;
*)
echo "Usage: `basename $0` start|stop|restart|reload"
exit 1
esac
exit 0
Somewhere between "too small" and "too large" lies the size that is just right.
- Scott Hayes
Offline
Np
I found out in some other scripts add_daemon line (or something similar). Should it be included in this script also?
I should definitely redo all the log writing... so it looks more readable later.
Last edited by spendzo (2009-08-28 17:34:29)
Offline