How do I install db2 Express-C 10.1 on OSX Mavericks -
I have tried to install DB2 Express-C10.1 on OSX Mavericks, but I get the error listed here:
The steps I have taken to set up DB2 Express C on Mac OSX Mavericks All logged in user orders; When I needed to run as a different user, I used sudo.
Step:
-
Download DB2 Express C from:
-
Modify the system parameter with this command:
sudo Vi /etc/sysctl.conf
And populate with this information:
kern.sysv.shmmax = 1073741824 kern.sysv.shmmin = 1 kern. Sysv.shmmni = 4096 kern.sysv.shmseg = 32 kern.sysv.shmall = 1179648 kern.maxfilesperproc = 65536 kern.maxfiles = 65536
-
Reboot the computer # With very sad I added that instruction.
-
Start the installation process with these commands:
cd ~ / Downloads / expc;
Accept the default path of '/opt/IBM/db2/V10.1'
Run the script Wait for about three minutes.
Note that a successful run has ended in 'execution successfully completed'.
Create a db2inst1 user using the Mac GUI (System Preferences -> Users and Groups). Use standard (non-administrator) privileges
Example with these commands:
cd /opt/IBM/db2/V10.1/instance ; Sudo ./db2icrt -u db2inst1 db2inst1
Modify your profile with this command:
vim ~ /. Bash_profile
and adding these lines (perhaps at the end of the file):
Pat = $ Pat: /opt/IBM/db2/V10.1/bin
If [[-f ~ db2inst1 / Sqllib / db2profile]] so
source ~ db2inst1 / sqlib / db2profile
fienter the new terminal window to receive new settings from .bash_profile Please. Exit the old window to avoid confusion.
Begin sample database using this command:
db2sampl
-
Test the sample database using these commands:
> -
Add Service Commands By using this service:
sudo vim / etc / services
And add this line as the last line in the file. The real situation is not important.
db2c_db2inst1 50000 / tcp
-
Set up DB2 should use TCP / IP using this command :
sudo -u db2inst1 db2set DB2COMM = TCPIP
-
stop and start the database with these commands:
sudo -u db2inst1 db2stop force
sudo -u db2inst1 db2start
Note
force < / Code> stop command will open an existing connection with it. If you want to be kind to those users who are connected, do not use force and After prompting users to disconnect, try the command again. I used to include the force in the original instructions because it is possible that any database that follows these instructions is the only user on the database.
< Li>
Open the downloaded file twice and open it.
Connect to the DB2 sample
db2 list tables If you have to connect to this database from a remote machine or connect to this database using Java Want to make the connection where host and port number is required , Then remove and follow the instructions to enable connection. Unless you really need to be connected in this fashion, you can stop these instructions from running. After running these instructions without having to run these instructions, you can connect using the db2 command line, you will be able to connect to any number of devices, which requires the host and port number.
Steps to enable remote connections:
cd ~ db2inst1
sudo - U db2inst1 db2 update dbm cfg svcename using db2c_db2inst1
The CD is required because the command must be typed in the current directory.
Reference:
If you determine the improvement in these instructions If so, please post comments. I will be informed and will make changes.
Comments
Post a Comment