stevenui-MacBookPro:pgmodeler steven$ ls pgmodeler stevenui-MacBookPro:pgmodeler steven$ cd pgmodeler/ stevenui-MacBookPro:pgmodeler steven$ ls CHANGELOG.md RELEASENOTES.md dbm-mime-type.sh installer libparsers libpgmodeler_ui macdeploy.sh pgmodeler-intl.pro pgmodeler.pro samples tests LICENSE conf docmainpage.doxy lang libpgconnector libutils main pgmodeler.appdata.xml pgmodeler.vars schemas windeploy.sh README.md crashhandler doxygen.conf libobjrenderer libpgmodeler linuxdeploy.sh main-cli pgmodeler.pri plugins start-pgmodeler.sh wingetdate.bat
stevenui-MacBookPro:pgmodeler steven$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" ==> This script will install: /usr/local/bin/brew /usr/local/share/doc/homebrew /usr/local/share/man/man1/brew.1 /usr/local/share/zsh/site-functions/_brew /usr/local/etc/bash_completion.d/brew ....
stevenui-MacBookPro:pgmodeler steven$ brew link qt5 --force Linking /usr/local/Cellar/qt/5.13.0... 432 symlinks created
If you need to have this software first in your PATH instead consider running: echo 'export PATH="/usr/local/opt/qt/bin:$PATH"' >> ~/.bash_profile stevenui-MacBookPro:pgmodeler steven$ brew install postgresql ==> Installing dependencies for postgresql: icu4c, openssl and readline ==> Installing postgresql dependency: icu4c ==> Downloading https://homebrew.bintray.com/bottles/icu4c-64.2.mojave.bottle.tar.gz ==> Downloading from https://akamai.bintray.com/e8/e858556120acc0c2d52b8fb572b677856724cc28d24a7e1b2762d458a2977c8e?__gda__=exp=1564652424~hmac=3522026e42dc3ea211ca26046ab79b0808f40a2a5dd89b19cd01eb25f612b768&response-content-disposition=attachment%3Bfilename%3D%22icu4c ######################################################################## 100.0% ==> Pouring icu4c-64.2.mojave.bottle.tar.gz ==> Caveats ....
wildfly administator 또는 remote cli등의 작업을 위해 사용자 등록을 처리한다.
[root@localhost bin]# pwd /opt/wildfly/bin
[root@localhost 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
Enter the details of the new user to add. Using realm 'ManagementRealm' as discovered from the existing property files. Username : sample 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 : WFLYDM0102: Password should have at least 1 non-alphanumeric symbol. Are you sure you want to use the password entered yes/no? yes 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 'sample'for realm 'ManagementRealm' Is this correct yes/no? yes Added user 'sample' to file '/opt/wildfly-17.0.1.Final/standalone/configuration/mgmt-users.properties' Added user 'sample' to file '/opt/wildfly-17.0.1.Final/domain/configuration/mgmt-users.properties' Added user 'sample' with groups to file '/opt/wildfly-17.0.1.Final/standalone/configuration/mgmt-groups.properties' Added user 'sample' with groups to file '/opt/wildfly-17.0.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? yes To represent the user add the following to the server-identities definition <secret value="dGhl1gmM3ODk=" />
Cli 사용법
접속 방법
[root@localhost bin]# ./jboss-cli.sh You are disconnected at the moment. Type 'connect' to connect to the server or 'help'for the list of supported commands. [disconnected /] connect 127.0.0.1:10090 [standalone@127.0.0.1:10090 /] exit [root@localhost bin]# ./jboss-cli.sh --connect --controller=127.0.0.1:10090
제공 가능한 명령어
[standalone@127.0.0.1:10090 /] help --commands Commands available in the current context: attachment deployment-info run-batch batch deployment-overlay security disable-http-auth-http-server cdecho security disable-http-auth-management clear echo-dmr security disable-sasl-management commandfor security disable-ssl-http-server command-timeout grep security disable-ssl-management connect help security enable-http-auth-http-server connection-info history security enable-http-auth-management data-source if security enable-sasl-management deploy jdbc-driver-info security enable-ssl-http-server deployment deploy-cli-archive ls security enable-ssl-management deployment deploy-file module security reorder-sasl-management deployment deploy-url patch apply set deployment disable patch history shutdown deployment disable-all patch info try deployment enable patch inspect undeploy deployment enable-all pwdunset deployment info quit version deployment list read-attribute xa-data-source deployment undeploy read-operation deployment undeploy-cli-archive reload To read a description of a specific command execute 'help <command name>'.
서로 다른 서비스를 갖는 프로젝트 2개가 있고 두개의 프로젝트가 intellij에서 동시에 wildfly(jboss) 상에서 실행 되어야 할때, 어떻게 로컬 세팅을 하는지에 대한 기록 임
전제
각 프로젝트는 독립 적으로 이미 작동 시킬 수 있는 상태이다.
wildfly standalone 버전으로 서비스를 start할 거다
port는 서로 달라도 된다
Wildfly가 특정 폴더에 인스톨 되어있다.
wildfly 설정
wildfly 디렉토리 이하 standalone 폴더를 하나더 copy한다.
standalone2 라는 이름으로 standalone폴더와 같은 위치에 만든다
Wildfly > bin 디렉토리 이하 standalone.sh 또는 standalone.bat을 하나더 copy한다.
standalone2.sh 라는 이름으로 같은 위치에 만든다
standalone2.sh 를 수정한다
# determine the default base dir, if not set if [ "x$JBOSS_BASE_DIR" = "x" ]; then - JBOSS_BASE_DIR="$JBOSS_HOME/standalone" + JBOSS_BASE_DIR="$JBOSS_HOME/standalone2" fi
intellij 설정
A프로젝트와 B프로젝트를 intellij에서 연다
A프로젝트는 다음과 같이 기본 설정한다. (Run > Run/Debug Configuration)
'+' > JBoss Server > wildfly > local > Application Server > 로컬 Jboss선택
만약에 Jboss 선택에 아무것도 없다면 "Configuration" 버튼 클릭 JbossHome 선택
'url' : http://localhost:8080/
Operating mode > standalone 선택
Deployment 탭 선택
디플로이 하고자 하는 Artifact 선택
Startup/Connection 탭 선택
Startup Script : <>/bin/standalone.sh 선택
B프로젝트는 다음과 같이 기본 설정한다. (Run > Run/Debug Configuration)
'+' > JBoss Server > wildfly > local > Application Server > 로컬 Jboss선택
만약에 Jboss 선택에 아무것도 없다면 "Configuration" 버튼 클릭 JbossHome 선택
'url' : http://localhost:8090/
Operating mode > standalone 선택
Port offset : 10 선택
Deployment 탭 선택
디플로이 하고자 하는 Artifact 선택
Startup/Connection 탭 선택
Startup Script : <>/bin/standalone2.sh 선택
offset 설정을 standalone.xml에서 설정할 경우 해당 설정 값을 intellij가 감지 하지 못한다. 반듯이 intellij에서 제공하는 offset으로 수정해줘야 한다. (management port 때문에라도 이렇게 해야한다.)
상위와 같이 했음에도 **Caused by: org.jboss.msc.service.DuplicateServiceException: Service jboss.undertow.deployment.default-server.default-host./.session is already registered**이런 오류가 나오는 경우에는 standalone2 디렉토리 이하에 있는 standalone.xml에 앞서 설정한 deployment가 남아 있을 수도 있다. 이경우에는 deployments tag를 아예 삭제하고 intellij에서 실행하자
[root@localhost data]# pwd /var/lib/pgsql/11/data [root@localhost data]# vi pg_hba.conf
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only local all all peer # IPv4 local connections: + host all all 0.0.0.0/0 md5 # IPv6 local connections: host all all ::1/128 md5 # Allow replication connections from localhost, by a user with the # replication privilege. local replication all peer host replication all 127.0.0.1/32 ident host replication all ::1/128 ident
[root@localhost data]# vi postgresql.conf
#------------------------------------------------------------------------------ # CONNECTIONS AND AUTHENTICATION #------------------------------------------------------------------------------
# - Connection Settings -
+ listen_addresses = '*' # what IP address(es) to listen on; # comma-separated list of addresses; # defaults to 'localhost'; use '*' for all # (change requires restart) #port = 5432 # (change requires restart) max_connections = 100 # (change requires restart) #superuser_reserved_connections = 3 # (change requires restart) #unix_socket_directories = '/var/run/postgresql, /tmp' # comma-separated list of directories # (change requires restart)