Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

DB2 installation

384 bytes added, 07:49, 20 September 2010
use the new settings
== Create a new VE ==
I created a new VE for the Debian distribution using debootstrap, as described in [[Debian template creation]].
== Set VE resource limits appropriately ==
DB2 installation can fail and it will not be possible to operate the database if your These are tested resource limits are too lowfor x86-64 system running Debian/GNU Linux 5.0. I used these limits for a small database6:
* kmemsize to 10,000,00026214400:29491200* privvmpages to 300,0002097152:unlimited* shmpages to 80,0001572864* numproc to 150400* tcpsndbuf to 700,0001720320:2703360* tcprcvbuf to 700,0001720320:2703360* vmguardpages to 2097152:unlimited* diskspace oomguardpages to 626112:unlimited And according to DB2 9 documentation,000,000the following minimal guest kernel options must be set in /etc/sysctl.conf:<pre>kernel.shmmax = 1073741824kernel.sem = 250 256000 32 1024kernel.msgmax = 65535kernel.msgmnb = 65535</pre>
== Install additional packages ==
* Run exp/disk1/db2setup
* Follow the prompts:
** Setup user 'dasusr1' ** Setup user 'db2inst1' and database instance 'db2inst1'
== Post-install actions ==
This is where it gets yukky. DB2 wants to run a browser inside the VPSVE. It wants to run Java applets inside the browser. I installed Iceweasel, but the post-install script does not recognise it. I was eventually able to hack the script to recognise and use the browser but it crashed on one of the Java applets. I think you can get by without running the post-install.
Here's what to do instead:
If these don't work it means your environment variables are not set properly. IBM set these for me:
* CLASSPATH=/home/db2inst1/sqllib/java/db2java.zip:/home/db2inst1/sqllib/java/db2jcc.jar:/home/db2inst1/sqllib/java/sqlj.zip:/home/db2inst1/sqllib/function:/home/db2inst1/sqllib/java/db2jcc_license_cu.jar:.* DB2INSTANCE=db2inst1* PATH=/usr/local/bin:/usr/bin:/bin:/usr/games:/home/db2inst1/sqllib/bin:/home/db2inst1/sqllib/adm:/home/db2inst1/sqllib/misc
Try creating IBM's sample database:
;;
esac
exit 0
And I used this command to create the symlink to make it start at VE "boot" time:
* update-rc.d db2 start 95 2 .
== Testing your installation ==
Inside the db2 client, try:
* connect to sample* grant all privileges dbadm on database to user fred connect reset == Enjoy! == Please provide feedback in the discussion (?not sure?Talk)page about improvements to this HOWTO.* connect reset[[Category:HOWTO]]