• CAS的部署


    CAS的架构图

    CAS部署之前需要先准备一下内容

    •   LDAP
    •   安装JDK1.8
    •   tomcat8

        

    对CAS进行打包编译,使用官网提供的 这边选择MAVEN WAR overlays 地址:<a href="https://github.com/apereo/cas-configserver-overlay" target="_black">WAR overlays</a>

        如果相对CAS的配置文件进行编译, 可以在cas-configserver-overlay中进行处理

    1.   如果src目录不存在,先创建src目录
    2.   复制的路径和文件名必须与其构建对应项完全匹配,否则更改将不会生效。 请参阅下表以了解如何将构建中的文件夹和文件映射到src

            eg: 我这边对配置信息进行修改

                这个配置文件 会覆盖默认构建的配置文件

     详细可以参考官网文档 <a href="https://apereo.github.io/cas/development/installation/WAR-Overlay-Installation.html" target="_black">WAR  Overlays</a>

       在pom文件中增加对LDAP的支持

        

    <dependency>
           <groupId>org.apereo.cas</groupId>
           <artifactId>cas-server-support-ldap</artifactId>
           <version>${cas.version}</version>
    </dependency>

    配置LDAP信息(根据自己公司的LDAP服务进行修改) 在cas.properties文件中进行配置

    #cas connection setting
    cas.authn.ldap[0].ldapUrl=ldaps://ldap1.example.edu ldaps://ldap2.example.edu
    cas.authn.ldap[0].bindDn=cn=Directory Manager,dc=example,dc=org
    cas.authn.ldap[0].bindCredential=Password
    
    cas.authn.ldap[0].minPoolSize=3
    cas.authn.ldap[0].maxPoolSize=50
    cas.authn.ldap[0].validateOnCheckout=true
    cas.authn.ldap[0].validatePeriodically=true
    cas.authn.ldap[0].validatePeriod=600
    cas.authn.ldap[0].failFast=true
    cas.authn.ldap[0].idleTime=5000
    cas.authn.ldap[0].prunePeriod=5000
    cas.authn.ldap[0].blockWaitTime=5000
    cas.authn.ldap[0].useSsl=false
    
    #cas other setting
    cas.authn.ldap[0].type=AD|AUTHENTICATED|DIRECT|ANONYMOUS
    cas.authn.ldap[0].baseDn=dc=example,dc=org
    cas.authn.ldap[0].subtreeSearch=true
    cas.authn.ldap[0].enhanceWithEntryResolver=true
    cas.authn.ldap[0].dnFormat=uid=%s,ou=people,dc=example,dc=org

     把配置好的cas-overlay-template中的etc/cas/config中文件  如果是linux系统就放到 /etc/cas/config 中,如果是window系统放到项目所在盘符 中的/etc/cas/config 例如项目在D盘,则 d:/etc/cas/config

     把 build之后的war包放到tomcat的webapp中,然后启动tomcat 启动成功之后访问 http://localhost:8080/cas/login就可以了

  • 相关阅读:
    位运算的应用
    MySql的自增主键以及TEXT数据类型使用
    MaxDos启动盘拆解
    QT预备式(包含MySql配置)未完成……
    关于Services.exe开机CPU内存使用暴增解决方案
    Windows Upnp 服务补丁——UpnpFix V1.0
    Memory Ordering
    "FoxitReaderOCX.ocx failed to load" 问题解决方案
    LameDropXPd V2.0 (L.A.M.E 3.97) 完美汉化版
    编译QT的MySql驱动问题及解决方案
  • 原文地址:https://www.cnblogs.com/hujia/p/9773376.html
Copyright © 2020-2023  润新知