Install and setup DB2 express version on CentOS 7
There is very little changes in the Vagrantfile. DB2 installation is done via db2_install.sh
- Vagrantfile has a line for private network, it uses DHCP for assigning IP address, you can update it to suit your needs
- Download
v11.1_linuxx64_expc.tar.gz
from IBM DB2- Make sure update the name of db2 installation file in db2_install.sh
- Place the installation package at the same dir as
db2_install.sh
- On host system,
cd db2
then runvagrant up
- SSH into vagrant box using
vagrant ssh
- We need to disable SELINUX or set it to permissive mode otherwise DB2 installation will show error. So switch to
root
withsudo su -
, then runsed -i "s/SELINUX=enforcing.*/SELINUX=permissive/g" /etc/selinux/config; reboot
, this will change selinux to permissive mode and reboot the system to make change to SELINUX take effect - Once the system is come back up, run
sudo sh /vagrant/db2_install.sh
, this will install db2 and db2 dependences- db2 username:
db2inst1
- password:
passw0rd
- db2 username:
- Switch to
db2inst1
user withsu - db2inst1
, then rundb2start
will start the db2 - If you want to create a DB2 sample database, run
db2sampl