All Downloads are FREE. Search and download functionalities are using the official Maven repository.

en-US.mob-task-section-Setting_the_JBOSS_HOME_Environment_Variable.xml Maven / Gradle / Ivy

There is a newer version: 3.0.2.FINAL
Show newest version
<?xml version='1.0'?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "Media_Server_User_Guide.ent">
%BOOK_ENTITIES;
]>
<section>
	<title>Setting the JBOSS_HOME Environment Variable</title>
	<para>
		The <application>Mobicents Platform</application> (<application>Mobicents</application>) is built on top of the <application>JBoss Application Server</application> (<application>JBoss AS</application>). You do not need to set the <envar>JBOSS_HOME</envar> environment variable to run any of the <application>Mobicents Platform</application> servers <emphasis>unless</emphasis> <envar>JBOSS_HOME</envar> is <emphasis>already</emphasis> set.
	</para>
	<para>The best way to know for sure whether <envar>JBOSS_HOME</envar> was set previously or not is to perform a simple check which may save you time and frustration.</para>
	<formalpara>
		<title>Checking to See If JBOSS_HOME is Set on Linux</title>
		<para>At the command line, <command>echo</command>
			<userinput>$JBOSS_HOME</userinput> to see if it is currently defined in your environment:</para>
	</formalpara>
	<!--  ~]$ echo $JBOSS_HOME  -->
	<screen>~]$ echo $JBOSS_HOME</screen>
	<para>The <application>Mobicents Platform</application> and most Mobicents servers are built on top of the <application>JBoss Application Server</application> (<application>JBoss AS</application>). When the <application>Mobicents Platform</application> or Mobicents servers are built <emphasis>from source</emphasis>, then <envar>JBOSS_HOME</envar> <emphasis>must</emphasis> be set, because the Mobicents files are installed into (or <quote>over top of</quote> if you prefer) a clean <application>JBoss AS</application> installation, and the build process assumes that the location pointed to by the <envar>JBOSS_HOME</envar> environment variable at the time of building is the <application>JBoss AS</application> installation into which you want it to install the Mobicents files.</para>
	<para>This guide does not detail building the <application>Mobicents Platform</application> or any Mobicents servers from source. It is nevertheless useful to understand the role played by <application>JBoss AS</application> and <envar>JBOSS_HOME</envar> in the Mobicents ecosystem.</para>
	<para>
		The immediately-following section considers whether you need to set <envar>JBOSS_HOME</envar> at all and, if so, when. The subsequent sections detail how to set <envar>JBOSS_HOME</envar> on Linux and Windows
	</para>
	<important>
		<para>
			Even if you fall into the category below of <emphasis>not needing</emphasis> to set <envar>JBOSS_HOME</envar>, you may want to for various reasons anyway. Also, even if you are instructed that you do <emphasis>not need</emphasis> to set <envar>JBOSS_HOME</envar>, it is good practice nonetheless to check and make sure that <envar>JBOSS_HOME</envar> actually <emphasis>isn&#39;t</emphasis> set or defined on your system for some reason. This can save you both time and frustration.
		</para>
	</important>
	<bridgehead>You <emphasis>DO NOT NEED</emphasis> to set <envar>JBOSS_HOME</envar> if...</bridgehead>
	<itemizedlist>
		<listitem>
			<para>
				...you have installed the <application>Mobicents Platform</application> binary distribution.
			</para>
		</listitem>
		<listitem>
			<para>
				...you have installed a Mobicents server binary distribution <emphasis>which bundles <application>JBoss AS</application>.</emphasis>
			</para>
		</listitem>
	</itemizedlist>
	<bridgehead>You <emphasis>MUST</emphasis> set <envar>JBOSS_HOME</envar> if you are:</bridgehead>
	<itemizedlist>
		<listitem>
			<para>installing the <application>Mobicents Platform</application> or any of the Mobicents servers <emphasis>from source</emphasis>.
			</para>
		</listitem>
		<listitem>
			<para>installing the <application>Mobicents Platform</application> binary distribution, or one of the Mobicents server binary distributions, which <emphasis>do not</emphasis> bundle <application>JBoss AS</application>.
			</para>
		</listitem>
	</itemizedlist>
	<para>Naturally, if you installed the <application>Mobicents Platform</application> or one of the Mobicents server binary releases which <emphasis>do not</emphasis> bundle <application>JBoss AS</application>, yet requires it to run, then you should <ulink url="http://www.jboss.org/file-access/default/members/jbossas/freezone/docs/Installation_Guide/4/html/index.html">install <application>JBoss AS</application></ulink> before setting <envar>JBOSS_HOME</envar> or proceeding with anything else.</para>
	<formalpara>
		<title>Setting the JBOSS_HOME Environment Variable on Linux</title>
		<para>
			The <envar>JBOSS_HOME</envar> environment variable must point to the directory which contains all of the files for the <phrase><application>Mobicents Platform</application> or individual Mobicents server</phrase> that you installed. As another hint, this topmost directory contains a <filename>bin</filename> subdirectory.
		</para>
	</formalpara>
	<para>Setting <envar>JBOSS_HOME</envar> in your personal <filename>~/.bashrc</filename> startup script carries the advantage of retaining effect over reboots. Each time you log in, the environment variable is sure to be set for you, as a user. On Linux, it is possible to set <envar>JBOSS_HOME</envar> as a system-wide environment variable, by defining it in <filename>/etc/bashrc</filename>, but this method is neither recommended nor detailed in these instructions.</para>
	<procedure>
		<title>To Set JBOSS_HOME on Linux</title>
		<step>
			<para>Open the <filename>~/.bashrc</filename> startup script, which is a hidden file in your home directory, in a text editor, and insert the following line on its own line while substituting for the actual install location on your system:</para>
			<!--  export JBOSS_HOME="/home/<replaceable>&lt;username&gt;</replaceable>/<replaceable>&lt;path&gt;</replaceable>/<replaceable>&lt;to&gt;</replaceable>/<replaceable>&lt;install_directory&gt;</replaceable>"  -->
			<screen>export JBOSS_HOME="/home/&lt;username&gt;/&lt;path&gt;/&lt;to&gt;/&lt;install_directory&gt;"</screen>
		</step>
		<step>
			<para>Save and close the <filename>.bashrc</filename> startup script.</para>
		</step>
		<step>
			<para>You should <command>source</command> the <filename>.bashrc</filename> script to force your change to take effect, so that <envar>JBOSS_HOME</envar> becomes set for the current session.  Note that any other terminals which were opened prior to altering <filename>.bashrc</filename> will need to <command>source</command><filename>~/.bashrc</filename> as well should they require access to <envar>JBOSS_HOME</envar>.</para>
			<screen>~]$ source ~/.bashrc</screen>
		</step>
		<step>
			<para>Finally, ensure that <envar>JBOSS_HOME</envar> is set in the current session, and actually points to the correct location:
			</para>
			<note>
				<para>
					The command line usage below is based upon a binary installation of the <application>Mobicents Platform</application>. In this sample output, <envar>JBOSS_HOME</envar> has been set correctly to the <replaceable>topmost_directory</replaceable> of the <application>Mobicents</application> installation. Note that if you are installing one of the standalone <application>Mobicents</application> servers (with <application>JBoss AS</application> bundled!), then <envar>JBOSS_HOME</envar> would point to the <replaceable>topmost_directory</replaceable> of your server installation.
				</para>
			</note>
			<screen>~]$ echo $JBOSS_HOME
/home/user/&MOB_JBOSS_HOME_LIN;</screen>
		</step>
	</procedure>

	<formalpara>
		<title>Setting the JBOSS_HOME Environment Variable on Windows</title>
		<para>
			The <envar>JBOSS_HOME</envar> environment variable must point to the directory which contains all of the files for the <phrase>Mobicents Platform or individual Mobicents server</phrase> that you installed. As another hint, this topmost directory contains a <filename>bin</filename> subdirectory.
		</para>
	</formalpara>
	<para>For information on how to set environment variables in recent versions of Windows, refer to <ulink url="http://support.microsoft.com/kb/931715"></ulink>.</para>
</section>






© 2015 - 2025 Weber Informatics LLC | Privacy Policy