Product SiteDocumentation Site

2.2.5. Setting the CATALINA_HOME Environment Variable

Before running the Mobicents server you are installing, you should consider if you need to set the CATALINA_HOME environment variable. Setting it (or re-setting it) will always work. Whether or not you need to set CATALINA_HOME depends on the following factors:
The following instructions detail how to set CATALINA_HOME on both Linux and Windows.
Procedure 2.14. Setting the CATALINA_HOME Environment Variable on Linux
  1. The CATALINA_HOME environment variable must point to the location of your Tomcat installation. Any Mobicents server which runs on top of the Tomcat servlet container has a topmost directory, i.e. the directory in which you unzipped the zip file to install the server, and underneath that directory, a bin directory. CATALINA_HOME must be set to the topmost directory of your Mobicents server installation.
    Setting this variable in your personal ~/.bashrc file has the advantage that it will always be set (for you, as a user) each time you log in or reboot the system. To do so, open ~/.bashrc in a text editor (or create the file if it doesn't already exist) and insert the following line anywhere in the file, taking care to substitute <mobicents_server> for the topmost directory of the Mobicents server you installed:
    export CATALINA_HOME="/home/<username>/<path>/<to>/<mobicents_server>"
    
    Save and close .bashrc.
  2. You can—and should—source your .bashrc file to make your change take effect (so that CATALINA_HOME is set) for the current session:
    ~]$ source ~/.bashrc
    
  3. Finally, make sure that CATALINA_HOME has been set correctly (that it leads to the right directory), and has taken effect in the current session.
    The following command will show the path to the directory pointed to by CATALINA_HOME:
    ~]$ echo $CATALINA_HOME
    
    To be absolutely sure, change your directory to the one pointed to by CATALINA_HOME:
    ~]$ cd $CATALINA_HOME && pwd
    
Procedure 2.15. Setting the CATALINA_HOME Environment Variable on Windows