Vtiger CRM



How to install and configure Cas Server

(Fedora Core 5, Java 1.5.11, Tomcat 5.5.20, openLDAP, Ant 1.7.0, Cas 3.0,6)

|Version |1.0 |

|Status |Draft |

|Author |Ha Dao |

|Reviewed by |Ha Dao |

|Date |May 8 2007 |

1. Install & Configure Java:

• OpenLdap

2. Install & Configure Java:

• Download Package jdk-1_5_0_11-linux-i586.bin, then copy to /usr/local/src

• [root@casserver src]# chmod a+x jdk-1_5_0_11-linux-i586.bin

• [root@casserver src]# ./jdk-1_5_0_11-linux-i586.bin

• [root@ casserver src]# mv jdk1.5.0_11 /usr/local/java

• Set environment:

← [root@casserver src]# mc

← Find etc/profile and edit :

■ Find “export” and insert two lines after :

export JAVA_HOME=/usr/local/java

export PATH=$PATH:$JAVA_HOME/bin

← [root@casserver src]# source profile

• Then we check version of java:

← [root@casserver ~]# /usr/local/java/bin/java -version

java version "1.5.0_11"

Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)

Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode, sharing)

• Create certificate for ssl request

← [root@casserver logs]# cd /usr/local/java/bin/

← [root@casserver bin]# ./keytool -genkey -alias tomcat -keypass changeit -keyalg RSA

■ Print-out

Enter keystore password: changeit

What is your first and last name?

[Unknown]: casserver.ntis.

What is the name of your organizational unit?

[Unknown]:

What is the name of your organization?

[Unknown]:

What is the name of your City or Locality?

[Unknown]:

What is the name of your State or Province?

[Unknown]:

What is the two-letter country code for this unit?

[Unknown]:

Is CN=localhost, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown correct?

[no]: yes

← [root@casserver bin]# ./keytool -export -alias tomcat -keypass changeit -file /usr/local/java/server.cert

Enter keystore password: changeit

Certificate stored in file

← [root@casserver bin]# ./keytool -import -alias tomcat -file /usr/local/java/server.cert -keypass changeit -keystore /usr/local/java/jre/lib/security/cacerts

■ Print-out :

Enter keystore password: changeit

Owner: CN=casserver.ntis., OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown

Issuer:

CN=casserver.ntis., OU=Unknown, O=Unknown, L=Unknown,

ST=Unknown, C=Unknown

Serial number: 463f1c06

Valid from: Mon May 07 19:31:02 ICT 2007 until: Sun Aug 05 19:31:02 ICT 2007

Certificate fingerprints:

MD5: A6:5A:DA:17:71:30:05:71:B4:05:40:21:AF:F5:E2:27

SHA1: B8:E3:E7:43:A3:7C:C5:72:79:5A:BB:A0:B4:B7:C3:C4:C7:42:6B:54

Trust this certificate? [no]: yes

Certificate was added to keystore

3. Install & Configure TomCat

• Download package apache-tomcat-5.5.20.tar.gz, then copy to : /usr/local/src

• [root@casserver src]# tar -xzf apache-tomcat-5.5.20.tar.gz

• [root@casserver src]# mv apache-tomcat-5.5.20 /usr/local/tomcat

• Start Tomcat

← [root@casserver src]# cd /usr/local/tomcat/bin

← [root@casserver src]# ./startup.sh

■ Print-out console

Using CATALINA_BASE: /usr/local/tomcat

Using CATALINA_HOME: /usr/local/tomcat

Using CATALINA_TMPDIR: /usr/local/tomcat/temp

Using JRE_HOME: /usr/local/java

• open your browse and enter : or

• SSL : Go to the server.xml file and uncomment the SSL section to open port 8443.



4. Install & Configure Ant

• Download apache-ant-1.7.0-bin.tar.gz , then copy to /usr/local/src

• [root@casserver src]# tar -zxf apache-ant-1.7.0-bin.tar.gz

• [root@casserver src]# mv apache-ant-1.7.0 /usr/local/ant

• Set environment :

← [root@casserver src]# mc

← Find etc/profile and edit :

■ Find “export” and insert two lines after :

export ANT_HOME=/usr/local/ant

export PATH=$PATH:$JAVA_HOME/bin:$ANT_HOME/bin

← [ root@casserver src]# source profile

• Check version :

← [ root@casserver /]# ant -version

Apache Ant version 1.7.0 compiled on December 13 2006

5. Install & Configure CasServer with Ldap

• Download package cas-server-3.0.6.tar.gz, then copy to /usr/local/src

• [root@CAS src]# tar -xzf cas-server-3.0.6.tar.gz

• Download libraries, then copy to /usr/local/src/cas-server-3.0.6/localPlugins/lib

← spring-ldap-1.1.2.jar

← ldapbp-1.0.jar

← cas-server-ldap-3.0.6.jar

• Build Cas server with ldap

← Modifies /usr/local/src/cas-server-3.0.6 /webapp/WEB-INF/deployerConfigContext.xml

■ Comment this line :

■ Add this block after the line comment above :

■ Add Bean “contextSource”

ldap://172.24.230.10:389

java.naming.security.authentication

simple

← Build Cas and deploy :

■ [root@CAS /]# ant war -f /usr/local/src/cas-server-3.0.6/localPlugins/build.xml

■ [root@CAS /]# mv /usr/local/src/cas-server-3.0.6/localPlugins/target/cas.war /usr/local/tomcat/webapps/cas.war

• Test Cas Server :

← Restart Tomcat :

■ [root@casserver src]# cd /usr/local/tomcat/bin

■ [root@casserver src]# ./shutdown.sh

■ [root@casserver src]# ./startup.sh

← open web browse and enter :

■ example :

■ Try to login with Ldap user

■ If return success page with notice “Log in Successful”

• Change template of login & logout pages :

← Modifies template in /usr/local/src/cas-server-3.0.6/webapp/WEB-INF/view/jsp/default/ui

■ casLoginView.jsp

■ casLogoutView.jsp

■ css, images...

← Then re build Cas as step above.

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download