天天看點

CAS單點登入(1):cas-4.0.0-server 簡單部署下載下傳CAS4.0.0登入成功

下載下傳CAS4.0.0

選擇4.0.0 的原因是:4.0.0以後打包比較麻煩,4.0.0版本内有打包好的war

下載下傳位址

  • github項目位址
  • cas 4.0.0位址
    CAS單點登入(1):cas-4.0.0-server 簡單部署下載下傳CAS4.0.0登入成功

解壓找到war包部署

  1. 解壓

    cas-server-4.0.0-release.zip

  2. cas-server-4.0.0\modules

    目錄下的

    cas-server-webapp-4.0.0.war

    複制到

    Tomcat 的 webapps/

    下 。
  3. 為了友善,修改tomcat下

    cas-server-webapp-4.0.0.war

    改名為

    cas.war

啟動tomcat

CAS單點登入(1):cas-4.0.0-server 簡單部署下載下傳CAS4.0.0登入成功
  • 若沒有報錯,通路http://localhost:8080/cas/login出現如下頁面則部署成功:
    CAS單點登入(1):cas-4.0.0-server 簡單部署下載下傳CAS4.0.0登入成功

登入成功

預設的使用者名個密碼為:

casuser/Mellon

配置使用者名和密碼的檔案是:apache-tomcat-8.0.52\webapps\cas\WEB-INF\

deployerConfigContext.xml

  • deployerConfigContext.xml:
<!--
       | TODO: Replace this component with one suitable for your enviroment.
       |
       | This component provides authentication for the kind of credential used in your environment. In most cases
       | credential is a username/password pair that lives in a system of record like an LDAP directory.
       | The most common authentication handler beans:
       |
       | * org.jasig.cas.authentication.LdapAuthenticationHandler
       | * org.jasig.cas.adaptors.jdbc.QueryDatabaseAuthenticationHandler
       | * org.jasig.cas.adaptors.x509.authentication.handler.support.X509CredentialsAuthenticationHandler
       | * org.jasig.cas.support.spnego.authentication.handler.support.JCIFSSpnegoAuthenticationHandler
       -->
    <bean id="primaryAuthenticationHandler"
          class="org.jasig.cas.authentication.AcceptUsersAuthenticationHandler">
        <property name="users">
            <map>
                <entry key="casuser" value="Mellon"/>
            </map>
        </property>
    </bean>
           
CAS單點登入(1):cas-4.0.0-server 簡單部署下載下傳CAS4.0.0登入成功

到此 cas-4.0.0的基本部署成功!有疑問可以私信或留言…

繼續閱讀