This guide is aimed at developers wanting to set up their development environment.
First, you should have a JDK-7 installed on your machine. If you have a JDK-8, JBoss AS 7.x will not start.
Then, in your .profile file, set the JAVA_HOME environment variable pointing to java installation.
To download JBoss 7 application server issue the following command on terminal:
wget http://download.jboss.org/jbossas/7.1/jboss-as-7.1.1.Final/jboss-as-7.1.1.Final.tar.gz
Untar the archive:
tar -xvf jboss-as-7.1.1.Final.tar.gz
Copy the directory to /opt/redhat-jboss-as-7:
sudo cp -r jboss-as-7.1.1.Final /opt/redhat-jboss-as-7
You don't want the jboss process to run as root on your machine, so you need to change the owner and owner group of jboss. Assume you are logged as the user max, to set the owner user and owner group on the jboss directory, issue the following command:
sudo chown -R max:max /opt/redhat-jboss-as-7
To start JBoss type on the shell:
max@ubuntu-host:/opt/redhat-jboss-as-7/bin$ ./standalone.sh
If everything went well, you should see an output like this:
max@ubuntu-host:/opt/redhat-jboss-as-7/bin$ ./standalone.sh ========================================================================= JBoss Bootstrap Environment JBOSS_HOME: /opt/redhat-jboss-as-7 JAVA: /usr/lib/jvm/java-7-oracle/bin/java JAVA_OPTS: -server -XX:+UseCompressedOops -XX:+TieredCompilation -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=standalone.xml ========================================================================= 11:13:19,245 INFO [org.jboss.modules] JBoss Modules version 1.1.1.GA 11:13:20,281 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA 11:13:20,394 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting 11:13:26,558 INFO [org.xnio] XNIO Version 3.0.3.GA 11:13:26,561 INFO [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http) 11:13:26,640 INFO [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA 11:13:26,696 INFO [org.jboss.remoting] JBoss Remoting version 3.2.3.GA 11:13:26,800 INFO [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers 11:13:26,816 INFO [org.jboss.as.configadmin] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem 11:13:26,883 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem. 11:13:26,869 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem 11:13:26,950 INFO [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem 11:13:26,985 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension 11:13:27,027 INFO [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem 11:13:27,040 INFO [org.jboss.as.security] (MSC service thread 1-2) JBAS013100: Current PicketBox version=4.0.7.Final 11:13:27,305 INFO [org.jboss.as.connector] (MSC service thread 1-3) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final) 11:13:29,376 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3) 11:13:29,832 INFO [org.jboss.as.naming] (MSC service thread 1-4) JBAS011802: Starting Naming Service 11:13:29,888 INFO [org.jboss.as.mail.extension] (MSC service thread 1-3) JBAS015400: Bound mail session [java:jboss/mail/Default] 11:13:30,593 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-4) Starting Coyote HTTP/1.1 on http--127.0.0.1-8080 11:13:31,556 INFO [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-1) JBoss Web Services - Stack CXF Server 4.0.2.GA 11:13:31,710 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-2) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS] 11:13:32,185 INFO [org.jboss.as.remoting] (MSC service thread 1-1) JBAS017100: Listening on /127.0.0.1:4447 11:13:32,185 INFO [org.jboss.as.remoting] (MSC service thread 1-3) JBAS017100: Listening on /127.0.0.1:9999 11:13:32,225 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-2) JBAS015012: Started FileSystemDeploymentService for directory /opt/redhat-jboss-as-7/standalone/deployments 11:13:32,671 INFO [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990 11:13:32,671 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in 14359ms - Started 133 of 208 services (74 services are passive or on-demand)
To test JBoss installation, point your browser to: http://localhost:8080
Managing JBoss Application Server
To create a management user, running the JBoss' utility script:
cd /opt/redhat-jboss-as-7/bin ./add-user.sh
The output is:
max@ubuntu-host:/opt/redhat-jboss-as-7/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. Realm (ManagementRealm) : Username : admin Password : password Re-enter Password : password The username 'admin' is easy to guess Are you sure you want to add user 'admin' yes/no? y About to add user 'admin' for realm 'ManagementRealm' Is this correct yes/no? y Added user 'admin' to file '/opt/redhat-jboss-as-7/standalone/configuration/mgmt-users.properties' Added user 'admin' to file '/opt/redhat-jboss-as-7/domain/configuration/mgmt-users.properties'
To open the web administration console, point your browser to: http://localhost:9990/console
Read the reference Getting Started Guide on JBoss Documentation Project.
Application server documentation
No comments:
Post a Comment