2014年2月1日土曜日

OpenDolphin server 作成メモ1

新規仮想マシンの作成

Ubuntu64bit用を選択 メモリ1536MB HDD8GB

ホスト名設定時に ESC 押して固定アドレス指定。

192.168.1.xxx
255.255.255.0 netmask
192.168.1.xx gateway
192.168.1.xx nameserver(s)

ディスク全体を使う
暗号化しない

パッケージでOpenSSH server、PostgreSQLserver選ぶ

インストールのち再起動。別マシンからsshでログイン

OpenJDKインストール

$ sudo apt-get update

$ sudo apt-get -y install openjdk-7-jdk

$ java -version

java version "1.7.0_51"
OpenJDK Runtime Environment (IcedTea 2.4.4) (7u51-2.4.4-0ubuntu0.12.04.2)
OpenJDK 64-Bit Server VM (build 24.45-b08, mixed mode)

PostgreSQLデータベース設定

まずOSにユーザーdolphin追加

$ sudo adduser dolphin -disabled-password


ユーザー `dolphin' を追加しています...
新しいグループ `dolphin' (1001) を追加しています...
新しいユーザー `dolphin' (1001) をグループ `dolphin' に追加しています...
ホームディレクトリ `/home/dolphin' を作成しています...
`/etc/skel' からファイルをコピーしています...
Changing the user information for dolphin
Enter the new value, or press ENTER for the default (以下そのままで変更なし:ENTERのみ)
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
以上で正しいですか? [Y/n] Y


次にPostgreSQLのユーザーdolphin追加

$ sudo -u postgres createuser -P

Enter name of role to add: dolphin
Enter password for new role: *******
Enter it again: *******
Shall the new role be a superuser? (y/n) y

データベースdolphin作成

$ sudo -u dolphin createdb -lC -Ttemplate0 -EUTF-8 dolphin

ビルドしたjboss持ってくる

$ scp jboss-as-7.2.0.Final.zip xxxx@192.168.1.xxx:


解凍&配置

$ sudo apt-get install unzip

$ unzip jboss-as-7.2.0.Final.zip

$ mv jboss-as-7.2.0.Final jboss

$ sudo mv jboss /usr/local

$ sudo useradd jboss

$ sudo chown -R jboss.jboss /usr/local/jboss


管理ユーザー登録

$ sudo -i

# /usr/local/jboss/bin/add-user.sh

What type of user do you wish to add?
 a) Management User (mgmt-users.properties)
 b) Application User (application-users.properties)
(a): そのままENTER

Enter the details of the new user to add.
Realm (ManagementRealm) :
Username : hogehoge (jboss管理コンソールでの名前とパスワード設定:パスワード8文字以上)
Password : ********
 to add user 'xxxxx' for realm 'ManagementRealm'
Is this correct yes/no? yes
Added user 'xxxxx' to file '/usr/local/jboss/standalone/configuration/mgmt-

users.properties'
Added user 'xxxxx' to file '/usr/local/jboss/domain/configuration/mgmt-users.properties'
Is this new user going to be used for one AS process to connect to another AS process?
e.g. for a slave host controller connecting to the master or for a Remoting connection for

server to server EJB calls.
yes/no? no
To represent the user add the following to the server-identities definition <secret

value="xxxxxxxx" />


起動

$  sudo /usr/local/jboss/bin/standalone.sh -b=192.168.1.xxx -bmanagement=192.168.1.xxx

とりあえず JBossAS起動まで。

確認

ブラウザで http://192.168.1.xxx:8080 にアクセス、管理コンソールでは先に決定した名前とパスワードで入ることができる。

0 件のコメント:

コメントを投稿