I have posted the question yesterday, then I was able to figure it out by myself. As I haven't found any complete guide, I'm writing down the steps just in case.

So the question is: "How do I install db2 express c on Mac OS X?".


First of all you need to edit/create the /etc/sysctl.conf and insert the following:


reboot. Then google db2 express c mac osx and download db2 express c 9.5.2 for mac osx. Once downloaded uncompress the file

tar -xzvf db2exc_952_MAC_x86_64.tar.gz

enter the exp directory and start the installation wizard as root

cd exp
sudo ./db2setup

before continuing you need to create 2 users, one for administration purposes and another one as instance owner. For the second user name use no more than 8 characters and use just letters, otherwise the node name won't be accepted later on. Follow the installation wizard steps: enter the username for the DAS and for the instance owner. Once the installation is complete, you need to switch to the instance owner (dbuser in our case):

su dbuser

add the following line to your .bashrc file:

. ~/sqllib/db2profile

exit and relogin. If everything went well you should be able to start db2 (as a root) and create the SAMPLE database

sudo db2start

That's it!

  • I have to wait two more days :)
    – gcedo
    Jul 16 '12 at 16:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.