Sun Download Centerから、
Solaris x86 SVR4 packages in self-extracting file, Englishを選択してダウンロードします。

ダウンロード方法は前回と同じです。

ダウンロードしてきたファイルの確認をします。
以下のようなファイルがダウンロードされているはずです。

-bash-3.00# ls
javadb-10_3_1_4-solaris-x86-pkg.sh

シェルを実行して解凍します。

-bash-3.00# ./javadb-10_3_1_4-solaris-x86-pkg.sh
Unpacking...
Checksumming...
Extracting...
Java DB 10.3.1.4 packages extracted into directory javadb-10.3.1.4
Done.

javadb-10.3.1.4というフォルダが作成されるのでそのフォルダへ移動します。

cd javadb-10.3.1.4/

次に、パッケージをインストールします。以下のコマンドを入力します。

pkgadd -d .

するとどのパッケージをインストールするか聞いてきますので、デフォルトのままEnterを押してください。

The following packages are available:
  1  SUNWjavadb-client      Java DB client
                            (i386) 10.3.1,REV=2007.08.15
  2  SUNWjavadb-common      Java DB common files
                            (i386) 10.3.1,REV=2007.08.15
  3  SUNWjavadb-core        Java DB core
                            (i386) 10.3.1,REV=2007.08.15
  4  SUNWjavadb-demo        Java DB demo
                            (i386) 10.3.1,REV=2007.08.15
  5  SUNWjavadb-docs        Java DB documentation
                            (i386) 10.3.1,REV=2007.08.15
  6  SUNWjavadb-javadoc     Java DB javadoc
                            (i386) 10.3.1,REV=2007.08.15

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]:

以降、以下には全部yと回答してください。

Do you want to install these conflicting files [y,n,?,q]

インストールが終了したら、javadbのインストール先ディレクトリへ移動します。

-bash-3.00# cd /opt/SUNWjavadb
-bash-3.00# ls
3RDPARTY                   NOTICE                     demo                       frameworks.DEPRECATED.txt  lib
CHANGES.html               RELEASE-NOTES.html         docs                       index.html
LICENSE                    bin                        frameworks                 javadoc

Windowsの時と同様に、binディレクトリへ移動します。

cd bin

derby_common.shを編集して以下を追加します。
#一番上のコメントの後あたりでOKです

DERBY_OPTS=-Dderby.system.home=/opt/SUNWjavadb/demo/databases

こんな感じです

# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
DERBY_OPTS=-Dderby.system.home=/opt/SUNWjavadb/demo/databases
if [ -n "$derby_common_debug" ] ; then
  set -x
fi

 

環境変数にDERBY_HOME=/opt/SUNWjavadbをセットします。

-bash-3.00# DERBY_HOME=/opt/SUNWjavadb
-bash-3.00# export DERBY_HOME

 

ネットワークサーバーを起動します。

-bash-3.00# ./startNetworkServer &
Security manager installed using the Basic server security policy.
Apache Derby Network Server - 10.3.1.4 - (561794) started and ready to accept connections on port 1527 at 2007-10-10 03:53:48.338 GMT

 

Windowsの時と同じく、ijでデータベースにアクセスできるかテストしてみます。

サンプルデータベースtoursdbに接続します。

-bash-3.00# ./ij
ij version 10.3
ij> connect 'jdbc:derby://localhost:1527/toursdb';
ij>

 

SQL文を発行してみます。

ij> select * from airlines;
A&|AIRLINE_FULL            |BASIC_RATE            |DISTANCE_DISCOUNT     |BUSINESS_LEVEL_FACTOR
------------------------------------------------------------------------------------------------
AA|Amazonian Airways       |0.18                  |0.03                  |0.5
US|Union Standard Airlines |0.19                  |0.05                  |0.4

2 rows selected

 

きちんと照会されていればインストールOKです。

ijを終了する場合

ij> quit;

投稿されたコメント:

コメント
コメントは無効になっています。

This blog copyright 2009 by naokitakemura