LoginSignup
14
14

More than 5 years have passed since last update.

WildFlyのインストールとNetbeansとの連携

Last updated at Posted at 2014-04-06

概要

GlassFishのプロジェクトの雲行きが怪しくなってきたので、WildFlyの調査を開始。
WildFlyをインストールして、NetBeansで使えるようにする。

環境

  • Linux Mint 16 Petra
  • WildFly 8.0.0.Final
  • NetBeans 8.0

内容

WildFlyのインストール

  • ダウンロード
$ wget http://download.jboss.org/wildfly/8.0.0.Final/wildfly-8.0.0.Final.zip
  • 適当な場所に解凍する。
$ unzip wildfly-8.0.0.Final.zip
  • ポートを設定する。

wildfly-8.0.0.Final/standalone/configuration/standalone.xml の${jboss.http.port:8080}を修正する。8080のところを設定したいポートに変える。今回は9080を設定。管理者ポート${jboss.management.http.port:9990}も10990に変えてみる。
standalone.xmlはWeb Profile用、standalone-full.xmlはフルプロファイル用の設定ファイル。

デフォルトポートからのオフセットで指定することもできる。
以下のようにoffsetに1000を指定することで9080になる。管理コンソールなども+1000される。

wildfly-8.0.0.Final/standalone/configuration/standalone.xml
- socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
+ socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:1000}">

一括でポートをずらせるので複数のWildFlyを使う場合は便利。
ただし、NetBeansとの連携で使用する場合はこの方法だとNetBeansから停止できない。

  • 起動する。
$ cd wildfly-8.0.0.Final/bin
$ ./standalone.sh
  • ブラウザでlocalhost:9080を開いて、起動していることを確認。

wildfly_top.png

  • 管理者ユーザを追加。
$ ./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.
Using realm 'ManagementRealm' as discovered from the existing property files.
Username : [ユーザ名を入力]
...
 - The password should be different from the username
Password : [パスワードを入力]
...
Re-enter Password : [パスワードを再入力]
What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)[  ]: [Enter]
About to add user 'admin' for realm 'ManagementRealm'
Is this correct yes/no? yes
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
  • ブラウザでlocalhost:10990を開いて、管理コンソールにアクセスできることを確認。

wildfly_admin.png

NetBeansとの連携

先ほど、ダウンロードした.nbmを選択してインストール。

  • NetBeansが再起動される。

  • ツール -> サーバー -> サーバーの追加。

  • WildFlyを選択。

nb_add_server_wf.png

  • サーバーの場所を指定。

nb_add_server_instance.png

  • サーバーのインスタンスを指定。

nb_add_server_port3.png

  • サービスからWildFlyを右クリックしてプロパティを選択。

  • PlatformタブのConfiguration Fileでstandalone.xmlが選択されていることを確認する。

  • サービスからWildFlyを右クリックして起動と停止がおこなえる。

nb_service.png

14
14
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
14
14