Clustering for High Availability (HA) with JBoss AS7
차례:
이전에 JBoss로 알려진 WildFly는 Java로 작성된 크로스 플랫폼 오픈 소스 응용 프로그램 런타임으로 놀라운 응용 프로그램을 구축 할 수 있습니다. WildFly는 유연하고 가벼우 며 필요에 따라 추가하거나 제거 할 수있는 플러그 가능한 하위 시스템을 기반으로합니다.
이 튜토리얼에서는 데비안 9에 WildFly 응용 프로그램 서버를 설치하는 데 필요한 단계를 안내합니다.
전제 조건
로그인 한 사용자는 패키지를 설치할 수있는 sudo 권한이 있어야합니다.
Java OpenJDK 설치
WildFly를 사용하려면 Java를 설치해야합니다. 데비안 9의 기본 Java 개발 및 런타임 인 OpenJDK를 설치합니다.
sudo apt update
sudo apt install default-jdk
사용자 생성
WildFly 서비스를 실행할 홈 디렉토리
/opt/wildfly
를 사용하여 wildfly라는 새 시스템 사용자 및 그룹을 작성하십시오.
sudo groupadd -r wildfly
sudo useradd -r -g wildfly -d /opt/wildfly -s /sbin/nologin wildfly
WildFly 설치
작성 당시 최신 WildFly 버전은 16.0.0입니다. 다음 단계를 계속하기 전에 다운로드 페이지에서 새 버전을 확인해야합니다. 새 버전이 있으면 아래 명령에서
WILDFLY_VERSION
변수를 바꾸십시오.
다음
wget
명령을 사용하여
/tmp
디렉토리에서 WildFly 아카이브를 다운로드하십시오.
WILDFLY_VERSION=16.0.0.Final
wget https://download.jboss.org/wildfly/$WILDFLY_VERSION/wildfly-$WILDFLY_VERSION.tar.gz -P /tmp
다운로드가 완료되면 tar.gz 파일을 추출하여
/opt
디렉토리로 이동하십시오.
sudo tar xf /tmp/wildfly-$WILDFLY_VERSION.tar.gz -C /opt/
WildFly 설치 디렉토리를 가리키는 기호 링크
wildfly
를 작성하십시오.
sudo ln -s /opt/wildfly-$WILDFLY_VERSION /opt/wildfly
WildFly는 WildFly 설치 디렉토리에 액세스
wildfly
사용자로 실행됩니다. 디렉토리 소유권을 사용자 및 그룹
wildfly
로 변경하십시오.
sudo chown -RH wildfly: /opt/wildfly
Systemd 구성
WildFly 패키지에는 WildFly를 서비스로 실행하는 데 필요한 파일이 포함되어 있습니다.
WildFly 구성 파일을 보유 할 디렉토리를 작성하여 시작하십시오.
sudo mkdir -p /etc/wildfly
구성 파일을
/etc/wildfly
디렉토리에 복사하십시오.
sudo cp /opt/wildfly/docs/contrib/scripts/systemd/wildfly.conf /etc/wildfly/
이 파일을 사용하면 WildFly 모드 및 바인드 주소를 지정할 수 있습니다. 기본적으로 WildFly는 독립형 모드로 실행되며 모든 인터페이스에서 수신 대기합니다. 필요에 따라 파일을 편집하십시오.
/etc/wildfly/wildfly.conf
# The configuration you want to run WILDFLY_CONFIG=standalone.xml # The mode you want to run WILDFLY_MODE=standalone # The address to bind to WILDFLY_BIND=0.0.0.0
다음으로 WildFly
launch.sh
스크립트를
/opt/wildfly/bin/
디렉토리에 복사하십시오.
sudo cp /opt/wildfly/docs/contrib/scripts/systemd/launch.sh /opt/wildfly/bin/
bin
디렉토리 내의 스크립트에는 실행 가능 플래그가 있어야합니다.
sudo sh -c 'chmod +x /opt/wildfly/bin/*.sh'
마지막 단계는
/etc/systemd/system/
장치 파일을
/etc/systemd/system/
디렉토리에 복사하는 것입니다.
sudo cp /opt/wildfly/docs/contrib/scripts/systemd/wildfly.service /etc/systemd/system/
systemd manager 구성을 다시로드하십시오.
sudo systemctl daemon-reload
부팅시 WildFly 서비스가 자동으로 시작되도록 시작 및 활성화:
sudo systemctl start wildfly
sudo systemctl enable wildfly
다음 명령으로 서비스 상태를 확인하십시오.
sudo systemctl status wildfly
* wildfly.service - The WildFly Application Server Loaded: loaded (/etc/systemd/system/wildfly.service; disabled; vendor preset: enabled) Active: active (running) since Sun 2019-02-17 04:59:39 PST; 2s ago Main PID: 10005 (launch.sh) Tasks: 62 (limit: 2319) CGroup: /system.slice/wildfly.service
방화벽 조정
서버가 방화벽으로 보호되고 로컬 네트워크 외부에서 WildFly 인터페이스에 액세스하려면 포트
8080
을 열어야합니다.
포트
8080
트래픽을 허용하려면 다음 명령을 입력하십시오.
sudo ufw allow 8080/tcp
프로덕션 환경에서 WildFly 응용 프로그램을 실행하는 경우 대부분로드 밸런서 또는 리버스 프록시가 있으며 포트 8080에 대한 액세스를 내부 네트워크로만 제한하는 것이 가장 좋습니다.
WildFly 인증 구성
WildFly가 설치되어 다음 단계를 실행하는 것은 관리 콘솔을 사용하거나 CLI를 사용하여 원격으로 연결할 수있는 사용자를 만드는 것입니다.
새 사용자를 추가하려면 WildFly의 bin 디렉토리에있는 add-user.sh 스크립트를 사용하십시오.
sudo /opt/wildfly/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):
a
선택
a
Enter
누르
Enter
.
다음으로, 새 사용자의 세부 사항을 입력하라는 메시지가 스크립트에 표시됩니다.
Enter the details of the new user to add. Using realm 'ManagementRealm' as discovered from the existing property files. Username: linuxize Password recommendations are listed below. To modify these restrictions edit the add-user.properties configuration file. - The password should be different from the username - The password should not be one of the following restricted values {root, admin, administrator} - The password should contain at least 8 characters, 1 alphabetic character(s), 1 digit(s), 1 non-alphanumeric symbol(s) 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): About to add user 'linuxize' for realm 'ManagementRealm' Is this correct yes/no? yes Added user 'linuxize' to file '/opt/wildfly-16.0.0.Final/standalone/configuration/mgmt-users.properties' Added user 'linuxize' to file '/opt/wildfly-16.0.0.Final/domain/configuration/mgmt-users.properties' Added user 'linuxize' with groups to file '/opt/wildfly-16.0.0.Final/standalone/configuration/mgmt-groups.properties' Added user 'linuxize' with groups to file '/opt/wildfly-16.0.0.Final/domain/configuration/mgmt-groups.properties' Is this new user going to be used for one AS process to connect to another AS process? eg for a slave host controller connecting to the master or for a Remoting connection for server to server EJB calls. yes/no? yes To represent the user add the following to the server-identities definition
새 사용자가 인증에 사용 된 특성 파일에 추가됩니다.
WildFly 설치 테스트
기본 WildFly 페이지에 액세스하려면 브라우저를 열고
http://:8080
입력
http://:8080
http://:8080
성공적으로 설치되면 다음과 유사한 화면이 나타납니다.
wildfly.conf
열고 파일 끝에
WILDFLY_CONSOLE_BIND=0.0.0.0
을 추가하십시오.
# The configuration you want to run WILDFLY_CONFIG=standalone.xml # The mode you want to run WILDFLY_MODE=standalone # The address to bind to WILDFLY_BIND=0.0.0.0 # The address console to bind to WILDFLY_CONSOLE_BIND=0.0.0.0
launch.sh
열고 강조 표시된 행을 편집하십시오.
#!/bin/bash if; then WILDFLY_HOME="/opt/wildfly" fi if]; then $WILDFLY_HOME/bin/domain.sh -c $2 -b $3 -bmanagement $4 else $WILDFLY_HOME/bin/standalone.sh -c $2 -b $3 -bmanagement $4 fi
변경 사항을 적용하려면 서비스를 다시 시작하십시오.
sudo systemctl restart wildfly
wildfly.service
열고 강조 표시된 줄을 편집하십시오.
Description=The WildFly Application Server After=syslog.target network.target Before=httpd.service Environment=LAUNCH_JBOSS_IN_BACKGROUND=1 EnvironmentFile=-/etc/wildfly/wildfly.conf User=wildfly LimitNOFILE=102642 PIDFile=/var/run/wildfly/wildfly.pid ExecStart=/opt/wildfly/bin/launch.sh $WILDFLY_MODE $WILDFLY_CONFIG $WILDFLY_BIND $WILDFLY_CONSOLE_BIND StandardOutput=null WantedBy=multi-user.target
/var/run/wildfly
디렉토리를 작성하고 올바른 권한을 설정하십시오.
sudo mkdir /var/run/wildfly/
sudo chown wildfly: /var/run/wildfly/
systemd manager 구성을 다시로드하십시오.
sudo systemctl daemon-reload
다음을 실행하여 WildFly 서비스를 다시 시작하십시오.
sudo systemctl restart wildfly
방화벽이 포트
9990
차단하지 않는 경우
http://:9990/console
에서 WildFly 관리 콘솔에 액세스 할 수 있어야합니다
http://:9990/console
http://:9990/console
.
결론
데비안 9 서버에 WildFly를 성공적으로 설치했습니다. WildFly 공식 문서를 방문하여 WildFly 기능에 대해 자세히 알아보십시오.
자바 와일드 플라이 데비안centos 7에 wildfly (jboss)를 설치하는 방법

이전에 JBoss로 알려진 WildFly는 Java로 작성된 크로스 플랫폼 오픈 소스 응용 프로그램 런타임으로 놀라운 응용 프로그램을 구축 할 수 있습니다. 이 자습서에서는 CentOS 7에 WildFly 응용 프로그램 서버를 설치하는 방법에 대해 설명합니다.
우분투 18.04에 wildfly (jboss)를 설치하는 방법

이전에 JBoss로 알려진 WildFly는 Java로 작성된 크로스 플랫폼 오픈 소스 응용 프로그램 런타임으로 놀라운 응용 프로그램을 구축 할 수 있습니다. 이 튜토리얼은 Ubuntu 18.04에 WildFly 응용 프로그램 서버를 설치하는 방법을 보여줍니다.
데비안 9 스트레치를 데비안 10 버스터로 업그레이드하는 방법

2 년 이상의 개발 끝에 2019 년 7 월 6 일 새로운 데비안 안정 버전 인 데비안 10 코드 명 Buster가 출시되었습니다.이 튜토리얼에서는 데비안 9 스트레치 시스템을 데비안 10 버스터로 업그레이드하는 방법을 보여줍니다.