Thursday, 24 May 2018

Register the Wildfly, Posgres, and Activemq as services on Windows

To unregister a service:
  • launch command shell as administrator. Run :

    sc delete ServiceName
To register:

Make sure to add JAVA_HOME pointing to your proper JDK installation

Wildfly : 

1. cd to [your wildfly installation]bin\service".
2. Run command : service install /controller localhost:9990

Postgres :
  1. cd to "[Postgre db installation directory]\bin".  
  2. Run command : pg_ctl.exe register -N "postgres-unionvms" -D "[Postgre db installation directory]\data" -w

ActiveMQ
  1. cd to "Activemq installation directory]bin\win64"
  2. Run command : InstallService

Create on JBoss / Wildfly an http access log handler

Launch the cli GUI (under your [widlfy directory]\bin):

       
jboss-cli --gui  controller=machine-name or ip:9990 --user=[wildfly user] --password=[password]

     
 


Run the command to create the access log:

       


/subsystem=undertow/server=default-server/host=default-host/setting=access-log:add(pattern="%A%t%h%l%u%r%s%b%T%I", directory="${jboss.server.log.dir}", prefix=access, suffix=".log")

       
 


If you want to read log files remotely:

List log files:

       
/subsystem=logging/:list-log-files


Recover the entire log file (careful on the size):



       

/subsystem=logging/:read-log-file(name=server.log,lines=-1,skip=0)



Recover just the tail : 


       


/subsystem=logging/:read-log-file(name=server.log,tail=true,lines=10,skip=0)



More can be found here:


http://www.mastertheboss.com/jboss-server/jboss-log/read-wildfly-8-log-files-using-the-cli

About Me

My Photo