Дистрибутивы WildFly

Установка jdk 1.8.1

сслыка на материал позже

Установка WildFly 8.2.1 Final

Создание пользователя и группы

создаем группу

$ sudo groupadd -g 1001 wildfly_admins

создаем пользователя

$ sudo useradd -g wildfly_admins -d /home/wildfly -m wildfly

если пользователь уже создан, нужно добавить его в группу
# usermod -a -G jboss_admins <user_name>

пароль пользователя
$ sudo passwd wildfly

Создание каталогов для установки, настройка прав.

$ sudo mkdir -p /opt/wildfly
$ sudo chown -R wildfly:wildfly_admins /opt/wildfly
$ sudo chmod -R 775 /opt/wildfly

Установка

# sudo su - wildfly
$ cd /opt/wildfly
$ wget http://download.jboss.org/wildfly/8.2.1.Final/wildfly-8.2.1.Final.zip
$ unzip wildfly-8.2.1.Final.zip

удаления дистрибутива

$ rm wildfly-8.2.1.Final.zip

Установка параметров пользователя

$ vi ~/.bash_profile
export WILDFLY_HOME=/opt/wildfly/wildfly-8.2.1.Final
export PATH=$PATH:$HOME/bin:$WILDFLY_HOME/bin 

Применяем параметры

$ source ~/.bash_profile

Создаем пользователя для консоли

$ 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 : admin

The username 'admin' is easy to guess
Are you sure you want to add user 'admin' yes/no? yes
Password recommendations are listed below. To modify these restrictions edit the add-user.properties configuration file.
 - 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)
 - The password should be different from the username
Password :

JBAS152565: Password must not be equal to 'admin', this value is restricted.
Are you sure you want to use the password entered yes/no?


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 'admin' for realm 'ManagementRealm'
Is this correct yes/no?

Added user 'admin' to file '/opt/wildfly/wildfly-8.2.1.Final/standalone/configuration/mgmt-users.properties' 
Added user 'admin' to file '/opt/wildfly/wildfly-8.2.1.Final/domain/configuration/mgmt-users.properties' 
Added user 'admin' with groups to file '/opt/wildfly/wildfly-8.2.1.Final/standalone/configuration/mgmt-groups.properties' 
Added user 'admin' with groups to file '/opt/wildfly/wildfly-8.2.1.Final/domain/configuration/mgmt-groups.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?

Запуск

Ручной запуск

$ standalone.sh -b=0.0.0.0 -bmanagement=0.0.0.0

http://localhost:8080/
http://localhost:8080/console

 Установка как сервис

В дистрибутиве есть скрипты для запуска JBOSS_HOME/bin/init.d

  • wildfly-init-redhat.sh : для Red Hat дистрибутивов ( RHEL, Centos)
  • wildfly-init-debian.sh: для Debian дистрбутиво ( Debian, Ubuntu)
  • wildfly.conf: настройки

копируем скрипты в систему:

cp wildfly-init-redhat.sh /etc/init.d/wildfly

копируем настройки:

mkdir –p /etc/default
cp wildfly.conf /etc/default

Редактируем wildfly.conf

JAVA_HOME=/usr/java/jdk1.8
# Location of WildFly
JBOSS_HOME=/opt/wildfly/wildfly-8.2.1.Final
# The username who should own the process.
JBOSS_USER=wildfly
# The mode WildFly should start, standalone or domain
JBOSS_MODE=standalone
# Configuration for standalone mode
JBOSS_CONFIG=standalone.xml

Добавляем wildfly в список сервисов

chkconfig --add wildfly

Загрузка

chkconfig --level 2345 wildfly on

Управление сервисом

service wildfly start
service wildfly stop

Written by 

Добавить комментарий

Ваш e-mail не будет опубликован. Обязательные поля помечены *