CASInstall

Instruction to install CAS:

Prerequisites:


You can download the latest snapshot of the CAS code from the github repository [[1]]

The list of currently implemented web-services and servlets: CASCurrentServices


Installation of all components of the system:

  • Tomcat Download and unpack Tomcat 5.5.x
    • Setup the admin and manager users by Correcting the $TOMCAT_PATH/conf/tomcat-users.xml by adding
  <role rolename="manager"/>
  <role rolename="admin"/>
  <user username="yourName" password="yourPassword" roles="manager,admin"/>
    • Reduce the number of default threads of the server by correct the $TOMCAT_PATH/conf/server.xml( the <Connector> tag) (like this:
<Connector port="8080" maxHttpHeaderSize="8192"
               maxThreads="30" minSpareThreads="5" maxSpareThreads="15"
               enableLookups="false" redirectPort="8443" acceptCount="10"
               connectionTimeout="20000" disableUploadTimeout="true" />  
  • Log4j subsystem installation. Download and unpack Apache Log4j installation. Put the jar file of log4j in $TOMCAT_HOME/common/lib (symbolic link will be ok). Download the Commons-Logging installation and put the jar file "commons-logging.jar" also in $TOMCAT_HOME/common/lib. Create the file <it>log4j.properties</it> in $TOMCAT_HOME/common/classes. That file will contain the setup of log4j logging. You can put in that file:
#Main Logger
log4j.rootLogger=INFO, R
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=${catalina.home}/logs/tomcat.log
log4j.appender.R.MaxFileSize=10MB
log4j.appender.R.MaxBackupIndex=10
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %t %c (%l) - %m%n
#log4j.logger.org.apache.catalina=DEBUG, R

#The logger for Axis
log4j.logger.org.apache.axis=INFO

#The logger for SAI_CAS
log4j.logger.sai_cas=DEBUG
  • Axis install
    • Download and unpack Axis 1.3.x.
    • Copy $AXIS_HOME/webapps/axis into $TOMCAT_HOME/webapps
    • After that you can probably remove the log4j*jar and commons-logging*jar from the $TOMCAT_HOME/webapps/axis/WEB-INF/classes since those jars are already in tomcat. !!!!!!!!!!!!!!!! That step is EXTREMELY important. Because if you'll not remove the jar's, axis and Tomcat will log everything differently … (I don't fully understand why…)
    • To enable the AxisAdminClient you need to uncomment the stuff about AxisAdminServlet in the $TOMCAT_HOME/webapps/axis/WEB-INF/web.xml (it is disabled by default)
  • Install of additional components for Axis Download JavaBeansActivation Framework jar and MailApi Jar and put them into $TOMCAT_HOME/common/lib
  • Copy (or create the symbolic link) the commons-fileupload.jar to the $TOMCAT_HOME/common/lib
  • Copy (or create the symbolic link) the commons-io.jar to the $TOMCAT_HOME/common/lib
  • Put also the links of jar files from the JWSDP to $TOMCAT/common/lib (you need to have there these files: $JWSDP_HOME/jaxb/lib/jaxb-api.jar $JWSDP_HOME/jaxb/lib/jaxb-impl.jar $JWSDP_HOME/sjsxp/lib/jsr173_api.jar )
  • Setup of the Database connection pool of Tomcat: Add:
<Resource name="jdbc/DriverAdapterCPDS" auth="Container"
    type="org.apache.tomcat.dbcp.dbcp.cpdsadapter.DriverAdapterCPDS"
    driver="org.postgresql.Driver" url="jdbc:postgresql://127.0.0.1:5432/cas"
    factory="org.apache.tomcat.dbcp.dbcp.cpdsadapter.DriverAdapterCPDS"
    username="" password=""/>

<Resource name="jdbc/postgresPerUser" auth="Container"
    type="org.apache.tomcat.dbcp.dbcp.datasources.PerUserPoolDataSource"
    factory="org.apache.tomcat.dbcp.dbcp.datasources.PerUserPoolDataSourceFactory"
    dataSourceName="java://comp/env/jdbc/DriverAdapterCPDS"/>

int the $TOMCAT_HOME/conf/server.xml (this will enable the global connection pool available for all applications in tomcat). (set the correct IP, port and name of the database) You also MUST correct the context.xml in the cas source directory (in $CAS_SRC/web/META-INF/context.xml) (there you need to set also up the correct parameters for the database connections)

And to enable the connection pool specifically for Axis we need to add

<Context path="/axis" docBase="axis" debug="5" reloadable="true"
    crossContext="true">

<ResourceLink name="jdbc/DriverAdapterCPDS"
    type="org.apache.tomcat.dbcp.dbcp.cpdsadapter.DriverAdapterCPDS"
    global="jdbc/DriverAdapterCPDS"/>

<ResourceLink name="jdbc/postgresPerUser" type="org.apache.tomcat.dbcp.dbcp.datasources.PerUserPoolDataSource"
    global="jdbc/postgresPerUser"/>

</Context>

in the $TOMCAT_HOME/webapps/axis/META-INF/context.xml


Building of SAI_CAS

After downloading and unpacking in principal it should be enough to just run ant in the directory. But currently you must also correct the paths do different libs, to tomcat etc… in the file "build.properties" After the setup of correct properties. Just do:

ant deploy_cas
ant deploy_cas_ws

to deploy the CAS servlets and WebServices