Db2 Expressc 10.1 For Mac Os X Download



DB2(AIX)を仕事で使うことになったので勉強をかねて自宅PCにインストールすることにしました。AIXに近い環境じゃないと意味がないので、Linuxの仮想環境でDB2を入れる予定でしたが、よく考えたら、MacがそもそもUnixでした^^;
というわけで、DB2 Express-C for Mac OS X を自宅のiMacに入れてみましたので、その手順をメモとして残しておきます。

  1. DB2 Express-C is free to develop, deploy and distribute. It is a fast, secure, reliable, and amazingly scalable dataserver, ideal for most startups and small/medium sized businesses. DB2 Express-C is available on Linux, Unix, Windows, and now Mac OS X as well!
  2. DbExpress is a database-independent layer that defines common interface for fast access to SQLite from Delphi on Windows and Mac OS X for both 32-bit and 64-bit platforms.
  3. I B M I N F O R M AT ION MANAGEMENT SOFTWARE DB2 FOR MAC OS X INSTALLATION & SETUP GUIDE DB2 9.5 Ryan Chase, Software Engineer IBM Toronto Lab Version 2.0 Dece.
  4. DB2 on Mac natively. Here are the current instructions for installing DB2 10.1 on Mac OS X, courtesy of my colleague Kevin Rose: Instructions to install DB2 v10.1 on Mac OS X Yosemite: Prerequisite: XCode developer tools must be installed. These can be installed from the Mac App Store.

Download db2 express c for free. Development Tools downloads - DB2 Express-C by IBM and many more programs are available for instant and free download.

Download DB2 Express-CのDB2 Express-C 9.5.2 beta for Mac OS Xをクリックして、「db2exc_952beta_MAC_x86_64.tar.gz」をダウンロード後、適当な場所に展開します。
展開して出来た ./exp/db2/db2exc_guide_952_MAC_x86_64.pdf を元にインストールしていきます。
P2.でルートユーザーを有効にしましょう。とあります。(以下)
1. From the Finder's Go menu, choose Utilities.

Db2 Express 10.1 For Mac Os X Download Full

2. Open Directory Utility.
3. Click the lock in the Directory Utility window.
4. Enter an administrator account name and password, then click OK.
5. Choose Enable Root User from the Edit menu.
6. Enter the root password you wish to use in both the Password and Verify fields, then click OK.
しかしUtilityディレクトリを探してもDirectoryUtilityが見つかりません。
以下のようにしましょう。
1.システム環境設定>アカウント>左下の錠前アイコンをクリック(パスワード入力して解錠)>左ペインの「ログインオプション」を選択>右ペイン下の「ネットワークアカウントサーバ:(接続)」をクリック>「ディレクトリユーティリティを開く」をクリック>開いた画面の左下の錠前を解錠>ツールバーの「編集」→「ルートユーザーを有効にする」をクリック。
以上で、ルートユーザーが有効になりました。
次にシステム定義ファイルを作成します。
P3.の内容に従って、Sysctl.confというファイルを作成します。
Increase system parameters (sysctl.conf)
Open /etc/sysctl.conf (or create it if it doesn't already exist) and insert the following settings. These settings increase
some settings for shared memory and user limits that DB2 needs in order to work on Mac.
Add the following to /etc/sysctl.conf
Save the file and reboot your computer. You don't need to reboot after you install DB2, only after you increase the
System Parameters.
kern.sysv.shmmax=1073741824
kern.sysv.shmmin=1
kern.sysv.shmmni=4096
kern.sysv.shmseg=32
Download
kern.sysv.shmall=1179648
kern.maxfilesperproc=65536
kern.maxfiles=65536

ターミナルを開いてrootになってviエディタで/etc/にsysctl.confを作成します。中身には上記のkern.で始まる行を記述します。
次に、いよいよインストールです。
P4.には4種類のインストール方法が書いてあります。ここでは3番目の「rootユーザーでGUIインストール」をやってみます。
※インストールの途中でDB2のユーザーを指定する必要があります。※システム環境設定のアカウントから、適当なユーザー(db2admin等)を予め作成しておいてください。
• Graphical install, standard user - double click on db2setup in the finder.
• Script install, standard user - double click on db2_install in the finder.
• Graphical install, root user - open a terminal, run sudo ./db2setup,
• Script install, root user - open a terminal, run sudo ./db2_install, then run sudo /instance/db2icrt -u
最初にダウンロードしたtar.gzが展開されているディレクトリ ./exp/db2配下のdb2setupを sudo ./db2setup のようにrootで起動します。GUI画面が立ち上がり、そのままウィザードに従いインストールをすすめれば完了です。
次に、DB2を使うためのコマンドラインの設定をします。
P15.に記載されている内容のとおりです。

Db2 Express 10.1 For Mac Os X Downloads

DBI1272I To start using the DB2 instance rchase, you must set up the
DB2 instance environment by sourcing db2profile or db2cshrc in the
sqllib directory, or you can open a new login window of the DB2 instance
user.
Mac
Explanation:
The DB2 instance cannot be used before db2profile (for Bourne or Korn
shell users) or db2cshrc (for C shell users) is sourced.
User response:
To set up the DB2 instance environment, you can open a new login window
under the ID that owns the DB2 instance, or source the DB2 instance environment
by running the appropriate following command under the ID that
owns the DB2 instance:
. $HOME/sqllib/db2profile
source $HOME/sqllib/db2cshrc
where $HOME represents the home directory of the user ID that owns the
DB2 instance.
インストール時に指定したDB2のユーザーでシェルを開いて、

Db2 Express 10.1 For Mac Os X Download


. ~/sqllib/db2profile でOKです。(C shellなら db2cshrcのほうです)
以上、インストールマニュアル(db2exc_guide_952_MAC_x86_64.pdf )の内容は完了です。
$ db2sampl

Db2 Express 10.1 For Mac Os X Download Free


※サンプルデータベースへの接続
※などなどやってみましょう。
以上