This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ===== DB2 Express C on CentOS or RHEL and like ===== Set SELinux to permissive, editing /etc/selinux/config. <code> $ sudo yum install kernel-headers gcc-c++ cpp gcc pam.i686 compat-libstdc++-33 </code> Create a db2 user: <code> $ sudo useradd db2 $ sudo passwd db2 </code> Change to db2 user. If you run db2prereqcheck utility you will receive a this message: //The db2prereqcheck utility determined that the current platform is not supported by the following version: "9.8.0.2".// You can ignore it if you are using CentOS. <code> $ ./db2_install </code> ==== Systemd ==== <code> [Unit] Description=Starts db2. [Service] Type=forking User=db2 ExecStart=/bin/bash -c "source /home/db2/sqllib/db2profile ; /home/db2/sqllib/adm/db2start" ExecStop=/bin/bash -c "source /home/db2/sqllib/db2profile ; /home/db2/sqllib/adm/db2stop" [Install] WantedBy=multi-user.target </code> If you have more databases: <code> [Unit] Description=Starts db2. [Service] Type=forking User=db2inst1 ExecStart=/bin/bash -c "source /home/db2inst1/sqllib/db2profile ; /home/db2inst1/sqllib/adm/db2start" ExecStartPost=/bin/bash -c "source /home/db2inst1/sqllib/db2profile; /home/db2inst1/sqllib/bin/db2 activate database APPCNTR ; /home/db2inst1/sqllib/bin/db2 activate database MFPDATA" ExecStop=/bin/bash -c "source /home/db2inst1/sqllib/db2profile ; /home/db2inst1/sqllib/bin/db2 deactivate database MFPDATA" ExecStop=/bin/bash -c "source /home/db2inst1/sqllib/db2profile ; /home/db2inst1/sqllib/bin/db2 deactivate database APPCNTR" ExecStop=/bin/bash -c "source /home/db2inst1/sqllib/db2profile ; /home/db2inst1/sqllib/adm/db2stop" [Install] WantedBy=multi-user.target </code>