1. 程式人生 > >CAS單點登入(1):cas-4.0.0-server 簡單部署

CAS單點登入(1):cas-4.0.0-server 簡單部署

下載CAS4.0.0

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

下載地址

解壓找到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

這裡寫圖片描述

登入成功

預設的使用者名稱個密碼為: 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-4.0.0的基本部署成功!有疑問可以私信或留言…