Friday, April 13, 2012

howto install FreeBSD9 CAS Server


The steps was given by sifu zaman..


1. Download latest diablo-jdk-freebsd and cp to /usr/ports/distfiles
2. Download latest tzupdater and cp to /usr/ports/distfiles
3. cd /usr/ports/java/diablo-jdk16/ && make install clean
4. cd /usr/ports/www/tomcat6/ && make install clean
5 install apache2
6 install mod_jk (connector used by appche to connect to servlet container)
7 install and configure Apache SSL (HTTPS) - refer to apache documentation

edit /usr/local/etc/apache/httpd.conf

change this parameter -> Listen 80 to Listen 443

make sure this module load at apache start

add this in httpd.conf -> LoadModule jk_module          libexec/apache22/mod_jk.so

add this in httpd.conf ->  Include etc/apache22/mod_jk.conf

create new file

ee /usr/local/etc/apache22/mod_jk.conf

and add this



        JkWorkersFile /usr/local/etc/apache22/workers.properties
        JkLogFile  /var/log/jk.log
        JkShmFile  /var/log/jk-runtime-status
        JkLogLevel error



save mod_jk.conf

create new file

ee /usr/local/etc/apache22/workers.properties

and add this

worker.list=co-t-newsso01

worker.co-t-newsso01.port=8009
worker.co-t-newsso01.host=colo-vst-newsso01
worker.co-t-newsso01.type=ajp13
worker.co-t-newsso01.lbfactor=1

save workers.properties

note :  please change all "colo-vst-newsso01" with your own server name


edit /usr/local/etc/apache22/extra/httpd-ssl.conf


disable Listen 443

add this (bottom of file before )

JkMount /* co-t-newsso01
JkMount /*.jsp co-t-newsso01


note :  please change all "co-t-newsso01" with your own server name

cd /usr/local/apache-tomcat-6.0/conf

ee server.xml

make sure you add or enable this



               connectionTimeout="20000"
               redirectPort="8443" />



               maxThreads="150" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLS" />

save server.xml

8. Edit /etc/rc.conf and add this line

apache22_enable="YES"
tomcat60_enable="YES"

save rc.conf

start apache and tomcat

test access tomcat (non secure using http://servername:8080)
then try access secure connection https using https://servername:8080


9. Install apache MAVEN - cd /usr/ports/devel/maven && make install clean ; rehash
10. Download latest JASIG CAS Server from http://downloads.jasig.org/cas/ and save in your home directory
11. Extract downloaded CAS Server


for example if latest version is cas-server-3.4.11-release.tar.gz

tar -xzf cas-server-3.4.11-release.tar.gz

cd cas-server-3.4.11/cas-server-webapp

ee pom.xml  and add this line

       
             ${project.groupId}
             cas-server-support-ldap
             ${project.version}
       

save file

run this command in cas-server-3.4.11/cas-server-webapp directory

mvn clean package

12. Replace all content in /usr/local/apache-tomcat-6.0/webapps/ROOT/ with content from cas-server-3.4.11/cas-server-webapp/target/cas-server-webapp-3.4.11/

Run this command in cas-server-3.4.11/cas-server-webapp/target/cas-server-webapp-3.4.11/

stop apache tomcat

cp -Rp * /usr/local/apache-tomcat-6.0/webapps/ROOT/


ee /usr/local/apache-tomcat-6.0/webapps/ROOT/WEB-INF/deployerConfigContext.xml

make sure you configure this parameter same like this






and put this in ldap server parameter

ldap://XXX.XX.XXX.XX/

Start apache tomcat

Now you should able to access you CAS server

https://servername/login

Done.


3 comments:

  1. Thank you for your doc nice job i will try it !

    ReplyDelete
  2. Hi Nikko, this is the old documentation.. sometimes there is some changes on the structure of the files. :) but this may assist u as a guideline..

    ReplyDelete
  3. Hi Nikko, this is the old documentation.. sometimes there is some changes on the structure of the files. :) but this may assist u as a guideline..

    ReplyDelete