0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

jboss構築

Last updated at Posted at 2025-09-11

環境

OS2台構成
rhel8.10
jboss-eap-7.4.0-installer.jar

RHEL8 事前準備 2台とも

IPアドレス設定
firewalld無効
Selinux無効

yum設定 2台とも

以下を参考に
https://qiita.com/ktooi/items/90c49a912f9776a7aa26

jdkインストール 2台とも

[root@rhel8166 ~]# cat /etc/yum.repos.d/local.repo
[InstallMedia-BaseOS]
name=Red Hat Enterprise Linux 8 - BaseOS
metadata_expire=-1
gpgcheck=0
enabled=1
baseurl=file:///media/BaseOS/

[InstallMedia-AppStream]
name=Red Hat Enterprise Linux 8 - AppStream
metadata_expire=-1
gpgcheck=0
enabled=1
baseurl=file:///media/AppStream/


[root@rhel8166 ~]#
[root@rhel8166 ~]# mount /dev/sr0 /media

[root@rhel8166 ~]# dnf install --disablerepo=\* --enablerepo=InstallMedia-* java-11

インストール済み:
  copy-jdk-configs-4.0-2.el8.noarch                                       java-11-openjdk-1:11.0.22.0.7-2.el8.x86_64
  java-11-openjdk-headless-1:11.0.22.0.7-2.el8.x86_64                     javapackages-filesystem-5.3.0-1.module+el8+2447+6f56d9a6.noarch
  lksctp-tools-1.0.18-3.el8.x86_64                                        ttmkfdir-3.0.9-54.el8.x86_64
  tzdata-java-2024a-1.el8.noarch                                          xorg-x11-fonts-Type1-7.5-19.el8.noarch

完了しました!

Jboss用ユーザ作成 2台とも

[root@rhel8166 ~]# groupadd -g 1100 jboss
[root@rhel8166 ~]#
[root@rhel8166 ~]# useradd -u 1100 -g jboss -M -d /opt/jboss -s /bin/bash jboss
[root@rhel8166 ~]#
[root@rhel8166 ~]# id jboss
uid=1100(jboss) gid=1100(jboss) groups=1100(jboss)
[root@rhel8166 ~]# cd /opt
[root@rhel8166 opt]# mkdir jboss
[root@rhel8166 opt]# chown -R jboss:jboss /opt/jboss

Jbossインストール 2台とも

/tmpにファイルをアップロード

jboss-eap-7.4.0-installer.jar

[root@rhel8166 opt]# cd /tmp/
[root@rhel8166 tmp]# ll
合計 238088
-rw-------. 1 root   root        2751  9月 11  2025 anaconda.log
-rw-------. 1 root   root        2286  9月 11  2025 dbus.log
-rw-------. 1 root   root           0  9月 11  2025 dnf.librepo.log
drwxr-xr-x  2 root   root          18  9月 10 20:34 hsperfdata_root
-rw-r--r--  1 zzz zzz        243781275 9月  3 01:43 jboss-eap-7.4.0-installer.jar
-rwx------. 1 root   root         701  9月 11  2025 ks-script-avdc5kuk
-rwx------. 1 root   root         291  9月 11  2025 ks-script-o0hak36q
-rw-------. 1 root   root           0  9月 11  2025 packaging.log
-rw-------. 1 root   root         131  9月 11  2025 program.log
-rw-------. 1 root   root           0  9月 11  2025 sensitive-info.log
drwx------  3 root   root          17  9月 11  2025 systemd-private-3cbea62c59fc4bd79096b82c224b33cf-ModemManager.service-SjZXAJ
drwx------  3 root   root          17  9月 11  2025 systemd-private-3cbea62c59fc4bd79096b82c224b33cf-chronyd.service-kZWILq
drwx------  3 root   root          17  9月 10 20:25 systemd-private-3cbea62c59fc4bd79096b82c224b33cf-colord.service-FhDIwS
drwx------  3 root   root          17  9月 11  2025 systemd-private-3cbea62c59fc4bd79096b82c224b33cf-rtkit-daemon.service-C3Gfnk
drwx------  2 root   root           6  9月 11  2025 vmware-root_907-4021784429
drwx------. 2 root   root           6  9月 11  2025 vmware-root_957-3988097346
[root@rhel8166 tmp]# su - jboss
[jboss@rhel8166 ~]$
[jboss@rhel8166 ~]$
[jboss@rhel8166 ~]$ cd /tmp/
[jboss@rhel8166 tmp]$ java -jar jboss-eap-7.4.0-installer.jar
以下で言語を選択してください。 :
0: English
1: 中文
2: Deutsch
3: francais
4: 日本語
5: portugues
6: espanol
選択してください。 [4] :
4
END USER LICENSE AGREEMENT
 RED HAT JBOSS(r) MIDDLEWARE(tm)
PLEASE READ THIS END USER LICENSE AGREEMENT CAREFULLY BEFORE USING SOFTWARE FROM RED HAT. BY USING RED HAT SOFTWARE, YOU SIGNIFY YOUR ASSENT TO AND ACCEPTANCE OF THIS END USER LICENSE AGREEMENT AND ACKNOWLEDGE YOU HAVE READ AND UNDERSTAND THE TERMS. AN INDIVIDUAL ACTING ON BEHALF OF AN ENTITY REPRESENTS THAT HE OR SHE HAS THE AUTHORITY TO ENTER INTO THIS END USER LICENSE AGREEMENT ON BEHALF OF THAT ENTITY. IF YOU DO NOT ACCEPT THE TERMS OF THIS AGREEMENT, THEN YOU MUST NOT USE THE RED HAT SOFTWARE. THIS END USER LICENSE AGREEMENT DOES NOT PROVIDE ANY RIGHTS TO RED HAT SERVICES SUCH AS SOFTWARE MAINTENANCE, UPGRADES OR SUPPORT. PLEASE REVIEW YOUR SERVICE OR SUBSCRIPTION AGREEMENT(S) THAT YOU MAY HAVE WITH RED HAT OR OTHER AUTHORIZED RED HAT SERVICE PROVIDERS REGARDING SERVICES AND ASSOCIATED PAYMENTS.
This end user license agreement (EULA) governs the use of the Red Hat JBoss Middleware and any related updates, source code, appearance, structure and organization (the Programs), regardless of the delivery mechanism.
1. License Grant.  Subject to the following terms, Red Hat, Inc. (Red Hat) grants to you a perpetual, worldwide license to the Programs (each of which may include multiple software components) pursuant to the GNU Lesser General Public License v. 2.1. With the exception of certain image files identified in Section 2 below, each software component is governed by a license that permits you to run, copy, modify, and redistribute (subject to certain obligations in some cases) the software component. This EULA pertains solely to the Programs and does not limit your rights under, or grant you rights that supersede, the license terms applicable to any particular component.
2. Intellectual Property Rights.  The Programs and each of their components are owned by Red Hat and other licensors and are protected under copyright law and under other laws as applicable. Title to the Programs and any component, or to any copy, modification, or merged portion shall remain with Red Hat and other licensors, subject to the applicable license. The JBoss trademark, Red Hat trademark, the individual Program trademarks, and the Shadowman logo are registered trademarks of Red Hat and its affiliates in the U.S. and other countries. This EULA does not permit you to distribute the Programs using Red Hat's trademarks, regardless of whether they have been modified. You may make a commercial redistribution of the Programs only if (a) permitted under a separate written agreement with Red Hat authorizing such commercial redistribution or (b) you remove and replaced all occurrences of Red Hat trademarks and logos. Modifications to the software may corrupt the Programs. You should read the information found at http://www.redhat.com/about/corporate/trademark/ before distributing a copy of the Programs.
3. Limited Warranty.  Except as specifically stated in this Section 3, a separate agreement with Red Hat, or a license for a particular component, to the maximum extent permitted under applicable law, the Programs and the components are provided and licensed as is without warranty of any kind, expressed or implied, including the implied warranties of merchantability, non-infringement or fitness for a particular purpose. Red Hat warrants that the media on which the Programs and the components are provided will be free from defects in materials and manufacture under normal use for a period of 30 days from the date of delivery to you. Neither Red Hat nor its affiliates warrant that the functions contained in the Programs will meet your requirements or that the operation of the Programs will be entirely error free, appear or perform precisely as described in the accompanying documentation, or comply with regulatory requirements. This warranty extends only to the party that purchases subscription services for the Programs from Red Hat and/or its affiliates or a Red Hat authorized distributor.
4. Limitation of Remedies and Liability.  To the maximum extent permitted by applicable law, your exclusive remedy under this EULA is to return any defective media within 30 days of delivery along with a copy of your payment receipt and Red Hat, at its option, will replace it or refund the money you paid for the media. To the maximum extent permitted under applicable law, under no circumstances will Red Hat, its affiliates, any Red Hat authorized distributor, or the licensor of any component provided to you under this EULA be liable to you for any incidental or consequential damages, including lost profits or lost savings arising out of the use or inability to use the Programs or any component, even if Red Hat, its affiliates, an authorized distributor, and/or licensor has been advised of the possibility of such damages. In no event shall Red Hat's or its affiliates' liability, an authorized distributor's liability or the liability of the licensor of a component provided to you under this EULA exceed the amount that you paid to Red Hat for the media under this EULA.
5. Export Control. As required by the laws of the United States and other countries, you represent and warrant that you: (a) understand that the Programs and their components may be subject to export controls under the U.S. Commerce Department's Export Administration Regulations (EAR (b) are not located in a prohibited destination country under the EAR or U.S. sanctions regulations (currently Cuba, Iran, Iraq, North Korea, Sudan and Syria, subject to change as posted by the United States government); (c) will not export, re-export, or transfer the Programs to any prohibited destination, persons or entities on the U.S. Bureau of Industry and Security Denied Parties List or Entity List, or the U.S. Office of Foreign Assets Control list of Specially Designated Nationals and Blocked Persons, or any similar lists maintained by other countries, without the necessary export license(s) or authorizations(s); (d) will not use or transfer the Programs for use in connection with any nuclear, chemical or biological weapons, missile technology, or military end-uses where prohibited by an applicable arms embargo, unless authorized by the relevant government agency by regulation or specific license; (e) understand and agree that if you are in the United States and export or transfer the Programs to eligible end users, you will, to the extent required by EAR Section 740.17(e), submit semi-annual reports to the Commerce Department's Bureau of Industry and Security, which include the name and address (including country) of each transferee; and (f) understand that countries including the United States may restrict the import, use, or export of encryption products (which may include the Programs and the components) and agree that you shall be solely responsible for compliance with any such import, use, or export restrictions.
6. Third Party Programs. Red Hat may distribute third party software programs with the Programs that are not part of the Programs. These third party software programs are not required to run the Programs, are provided as a convenience to you, and are subject to their own license terms. The license terms either accompany the third party software programs or can be viewed at http://www.redhat.com/licenses/thirdparty/eula.html. If you do not agree to abide by the applicable license terms for the third party software programs, then you may not install them. If you wish to install the third party software programs on more than one system or transfer the third party software programs to another party, then you must contact the licensor of the applicable third party software programs.
7. General. If any provision of this EULA is held to be unenforceable, the enforceability of the remaining provisions shall not be affected. Any claim, controversy or dispute arising under or relating to this EULA shall be governed by the laws of the State of New York and of the United States, without regard to any conflict of laws provisions. The rights and obligations of the parties to this EULA shall not be governed by the United Nations Convention on the International Sale of Goods.
Copyright (c) 2013 Red Hat, Inc. All rights reserved. Red Hat, JBoss and the JBoss logo are registered trademarks of Red Hat, Inc. All other trademarks are the property of their respective owners.
継続するには 1 を、終了するには 2 を、再表示するには 3 を押してください。
1

インストールパスの選択: [/opt/jboss/EAP-7.4.0]

継続するには 1 を、終了するには 2 を、再表示するには 3 を押してください。
1


インストールしたいパッケージを選択してください:
1    [x] [必須]            [Red Hat JBoss Enterprise Application Platform] (33.15 MB)
2    [x]                 [AppClient] (31.93 KB)
3    [x]                 [Docs] (19.94 MB)
4    [x] [必須]            [モジュール] (195.61 MB)
5    [x] [必須]            [Welcome コンテンツ] (2.1 MB)
Total Size Required: 250.83 MB
0 を押して選択を確認
インストールしたいパックを選択してください
0
パックの選択完了
継続するには 1 を、終了するには 2 を、再表示するには 3 を押してください。
1

管理ユーザーの作成
このユーザーは、管理上の目的でホストコンテナの管理レルムに追加されます。このユーザーを使用して、管理コンソール、管理 CLI、またはこのレルムでセキュア化された 他のアプリケーションにアクセスできます。

最小限のセキュリティーを確保するために、パスワードは 8 文字以上である必要があり、アルファベット、数字、および & を除く英数字以外の文字がそれぞれ 1 文字以上含まれている必要があります。

管理ユーザー名: [admin]


管理パスワード: []
**********
管理パスワードを再入力:  [**********]
**********
継続するには 1 を、終了するには 2 を、再表示するには 3 を押してください。
1

[ アンパックを開始中 ]
[ パッケージの処理中: Red Hat JBoss Enterprise Application Platform (1/5) ]
[ パッケージの処理中: AppClient (2/5) ]
[ パッケージの処理中: Docs (3/5) ]
[ パッケージの処理中: モジュール (4/5) ]
[ パッケージの処理中: Welcome コンテンツ (5/5) ]
[ アンパックが終了しました。 ]

ランタイム環境の設定
サーバーがインストールされたため、Red Hat JBoss Enterprise Application Platform に複数の設定オプションが追加されました。オプションは個別に選択でき、「次へ」 を押すと表示順に設定されます。ここで設定を行いますか?
0  [x] デフォルト設定の実行
1  [ ] 詳細設定の実行
入力事項の選択:
0

継続するには 1 を、終了するには 2 を、再表示するには 3 を押してください。
1

[ 処理開始 ]
プロセス開始 インストール情報をログに記録中 (1/3)
IzPack 変数の状態が次に書き込まれました: /opt/jboss/EAP-7.4.0/installation/InstallationLog.txt
プロセス開始 管理ユーザーの追加中 (2/3)
プロセス開始 無関係なフォルダーおよび一時ファイルのクリーンアップ (3/3)

スタートメニューにショートカットを作成します。 (y/n) [y]:
n
インストールが正常に完了しました。
アプリケーションがインストールされました。 /opt/jboss/EAP-7.4.0

自動インストールスクリプトとプロパティーファイルを生成しますか? (y/n) [n]:
n
[ Console installation done ]
[jboss@rhel8166 tmp]$

master側のファイルの名前を修正 1号機のみ

[jboss@rhel8166 configuration]$ cp -pi host-master.xml host-master.xml.20250911
[jboss@rhel8166 configuration]$ vi host-master.xml
[jboss@rhel8166 configuration]$
[jboss@rhel8166 configuration]$
[jboss@rhel8166 configuration]$ diff host-master.xml host-master.xml.20250911
3c3
< <host xmlns="urn:jboss:domain:16.0" name="ap01">
---
> <host xmlns="urn:jboss:domain:16.0" name="master">
167c167
< </host>
---
> </host>
\ ファイル末尾に改行がありません

スレーブユーザを登録 1号機のみ

※間違えないように

[jboss@rhel8166 bin]$ ./add-user.sh

どのようなユーザータイプを追加しますか?
 a) 管理ユーザー (mgmt-users.properties)
 b) アプリケーションユーザー (application-users.properties)
(a): a

追加する新規ユーザーの詳細を入力します。
レルム 'ManagementRealm' を既存のプロパティーファイルで検出されたとおりに使用しています。
ユーザ名 : ap02
パスワードの推奨事項は以下のとおりです。この制限を変更するには、add-user.properties 設定ファイルを編集します。
 - パスワードとユーザー名は異なるものにする必要があります
 - パスワードは、制限された次の値のいずれかでない必要があります {root, admin, administrator}
 - パスワードは 8 文字, 1 英字, 1 桁, 1 文字 (英数字以外の記号) 文字以上にしてください。
パスワード :
WFLYDM0048: パスワードの強度が足りません。現在の強度は 'WEAK' ですが最低でも 'MEDIUM' である必要があります。
本当に入力したパスワードを使用しますか? yes/no? yes
パスワードを再度入力してください。 :
このユーザーが所属するグループはどれですか? (カンマ区切りリストを入力してください。所属グループがない場合は空白のままにしてください。)[  ]: jboss
レルム 'ManagementRealm' にユーザー 'ap02' を追加します。
正しいですか yes/no? yes
ユーザー 'ap02' をファイル '/opt/jboss/EAP-7.4.0/standalone/configuration/mgmt-users.properties' に追加しました。
ユーザー 'ap02' をファイル '/opt/jboss/EAP-7.4.0/domain/configuration/mgmt-users.properties' に追加しました。
グループ 'jboss' のユーザー 'ap02' をファイル '/opt/jboss/EAP-7.4.0/standalone/configuration/mgmt-groups.properties' に追加しました
グループ 'jboss' のユーザー 'ap02' をファイル '/opt/jboss/EAP-7.4.0/domain/configuration/mgmt-groups.properties' に追加しました
新規ユーザーは、AS プロセスの 1 つとして使用され、別の AS プロセスに接続しますか。
例: マスターに接続するスレーブホストコントローラー、サーバー間 Jakarta Enterprise Beans 呼び出しの Remoting 接続。
yes/no? yes
ユーザーを参照するには、server-identities 定義に次を追加します。 <secret value="WmFxMTJ3c3hAMQ==" />

マスター用のユーザを作成 1号機のみ

jbossグループに所属させたがまずかったかな・・・

[jboss@rhel8166 bin]$ ./add-user.sh

どのようなユーザータイプを追加しますか?
 a) 管理ユーザー (mgmt-users.properties)
 b) アプリケーションユーザー (application-users.properties)
(a): a

追加する新規ユーザーの詳細を入力します。
レルム 'ManagementRealm' を既存のプロパティーファイルで検出されたとおりに使用しています。
ユーザ名 : mgmtusr
パスワードの推奨事項は以下のとおりです。この制限を変更するには、add-user.properties 設定ファイルを編集します。
 - パスワードとユーザー名は異なるものにする必要があります
 - パスワードは、制限された次の値のいずれかでない必要があります {root, admin, administrator}
 - パスワードは 8 文字, 1 英字, 1 桁, 1 文字 (英数字以外の記号) 文字以上にしてください。
パスワード :
WFLYDM0048: パスワードの強度が足りません。現在の強度は 'WEAK' ですが最低でも 'MEDIUM' である必要があります。
本当に入力したパスワードを使用しますか? yes/no? Zaq12wsx@1

 * エラー *
WFLYDM0029: 無効な応答です (有効な応答は yes, y, no および n)

WFLYDM0048: パスワードの強度が足りません。現在の強度は 'WEAK' ですが最低でも 'MEDIUM' である必要があります。
本当に入力したパスワードを使用しますか? yes/no? yes
パスワードを再度入力してください。 :
このユーザーが所属するグループはどれですか? (カンマ区切りリストを入力してください。所属グループがない場合は空白のままにしてください。)[  ]: jboss
レルム 'ManagementRealm' にユーザー 'mgmtusr' を追加します。
正しいですか yes/no? yes
ユーザー 'mgmtusr' をファイル '/opt/jboss/EAP-7.4.0/standalone/configuration/mgmt-users.properties' に追加しました。
ユーザー 'mgmtusr' をファイル '/opt/jboss/EAP-7.4.0/domain/configuration/mgmt-users.properties' に追加しました。
グループ 'jboss' のユーザー 'mgmtusr' をファイル '/opt/jboss/EAP-7.4.0/standalone/configuration/mgmt-groups.properties' に追加しました
グループ 'jboss' のユーザー 'mgmtusr' をファイル '/opt/jboss/EAP-7.4.0/domain/configuration/mgmt-groups.properties' に追加しました
新規ユーザーは、AS プロセスの 1 つとして使用され、別の AS プロセスに接続しますか。
例: マスターに接続するスレーブホストコントローラー、サーバー間 Jakarta Enterprise Beans 呼び出しの Remoting 接続。
yes/no? no
[jboss@rhel8166 bin]$

マスターの起動

/opt/jboss/EAP-7.4.0/bin/domain.sh --host-config=host-master.xml -Djboss.bind.address.management=192.168.2.166 -Djboss.bind.address=192
.168.2.166

スレーブのconf修正

host-slave.xml 以下修正

[kenken@rhel8167 configuration]$ diff host-slave.xml host-slave.xml.20250911
3c3
< <host xmlns="urn:jboss:domain:16.0" name="ap02">
---
> <host xmlns="urn:jboss:domain:16.0">
13c13
<                     <secret value="WmFxMTJ3c3hAMQ=="/>
---
>                     <secret value="c2xhdmVfdXMzcl9wYXNzd29yZA=="/>
183c183
< </host>
---
> </host>
\ ファイル末尾に改行がありません

スレーブの起動

/opt/jboss/EAP-7.4.0/bin/domain.sh --host-config=host-slave.xml -Djboss.domain.master.address=192.168.2.166 -Djboss.bind.add
ress=192.168.2.167

マスター側からのログ確認

登録成功

[Host Controller] 22:18:49,016 INFO  [org.jboss.as.domain.controller] (Host Controller Service Threads - 22) WFLYHC0019: リモートのスレーブホスト "ap02", JBoss JBoss EAP 7.4.0.GA (WildFly 15.0.2.Final-redhat-00001) を登録しました。

GUIから確認しても
http://192.168.2.166:9990
ap01
ap02
が確認できました

jbossの管理CLIからのログイン

今回、起動時に、address.managementに対して、IPアドレス設定を行っているので、以下のコマンドになる

「/opt/jboss/EAP-7.4.0/bin/domain.sh --host-config=host-master.xml -Djboss.bind.address.management=192.168.2.166 -Djboss.bind.address=192
.168.2.166」

マスター側からの実施

[jboss@rhel8166 ~]$ /opt/jboss/EAP-7.4.0/bin/jboss-cli.sh --controller=192.168.2.166:9990
You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands.
[disconnected /]
[disconnected /] connect
[domain@192.168.2.166:9990 /]

スレーブ側からの実施した場合は
ユーザ名とパスワードが必要になる

[jboss@rhel8167 ~]$ /opt/jboss/EAP-7.4.0/bin/jboss-cli.sh --controller=192.168.2.166:9990
You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands.
[disconnected /]
[disconnected /]
[disconnected /] connect
Authenticating against security realm: ManagementRealm

[disconnected /] connect
Authenticating against security realm: ManagementRealm

Username: admin
Password: 構築時に入れたパスワード

[domain@192.168.2.166:9990 /]
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?