Set up the Environment Variables

To run all installed components together, a series of environment variables must be created. To do so, create a file named as a ejbca.sh under /etc/profile.d and add lines those are given below. Always remember that the paths provided in this guide are relative to your installation.

#!/bin/sh

export JAVA_HOME=/usr/lib/jvm/java-6-openjdk  
export JBOSS_HOME=/opt/pki/jboss  
export APPSERV_HOME=/opt/pki/jboss  
export ANT_OPTS=-Xmx512m  
export JBOSS_HOST=0.0.0.0  
export ANT_HOME=/opt/pki/ant  
export EJBCA_HOME=/opt/pki/ejbca  
export JBOSS_CONSOLE=/var/log/jboss.log  
export JBOSSUS=jboss  
export JBOSS_SERVER=default  
export PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH  

Once you are done editing the ejbca.sh file, save and close it. The file ejbca.sh in the /etc/profile.d directory will be executed whenever a bash login shell is entered. This finishes the basic configuration of all the components needed to install EJBCA.