Showing posts with label CAS. Show all posts
Showing posts with label CAS. Show all posts

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.


Tuesday, February 14, 2012

Intergrate CAS, LDAP with Drupal

Today I and Sis Salina successfully connect cas, ldap with our new drupal 7.
ALHAMDULILLAH :)

Actually this in not the actual objective that we want to do. Our first plan is to integrate cas, ldap with wordpress as per requested by our webmaster. The problem is, the configuration in wordpress are to complicated. Because of that we doing underground project which we intergrate it to drupal 7. Ha.. and then it is working..Hoyeee..

Here is the pros and cons; drupal can easily integrate with cas, ldap and it also have multisite features. While wordpress have problem during integrate with cas and ldap... where the we cannot login to wp-admin. Some more, we also have problem to setup multisite which need complex configuration and manual things... and really make myself headache.. Houuhh.. Hope our Web master do understand on this plan B.

Ok let move to another topic where is problem that we are facing during intergrate Ldap and Cas with ldap.

1. Install Drupal
a. The problem that we are facing here where we cannot see the mysql setting gui.
REMINDER: read the prerequisite so that you will not be crazy because cannot see the setting.
Solution : 1. Drupal 7: MySQL 5.0.15 or higher with PDO, SQLite 3.3.7 or higher
php5-pdo_mysql-5.3.10 (install this then the setting will come out)

2. Configure cas and ldap
a. Password for ldapadmin are wrong. Thanks to Sifu Zaman for his expertise in troubleshoot the password validity.
b. Cas need php-curl (extention)