The installation of JBoss is not very difficult. I was in doubt whether or not I would take the whole application server under version control using Git. For now, I took a simple approach and I did the following steps:
- su
- wget http://download.jboss.org/jbossas/7.1/jboss-as-7.1.0.Final/jboss-as-7.1.0.Final.tar.gz
- tar -xvvzf jboss-as-7.1.0.Final.tar.gz
- mv jboss-as-7.1.0.Final /usr/share/jboss/
- cd /usr/share/jboss/
- ln -s jboss-as-7.1.0.Final jboss-current
- adduser --system --no-create-home --disabled-password --disabled-login --group jboss
- cd /usr/share/
- chown -R jboss:jboss jboss/
- exit
The next step is to install JBoss as a service. The explanation on Stackoverflow is clear, but requires some tweaks to set the path correct to your settings. Moreover, to stop the server you do not call sudo -u jboss sh ${JBOSS_HOME}/bin/jboss-admin.sh, but sudo -u jboss sh ${JBOSS_HOME}/bin/jboss-cli.sh.
That's it enjoy!

