CAS單點登入(1):cas-4.0.0-server 簡單部署
阿新 • • 發佈:2018-12-22
下載CAS4.0.0
選擇4.0.0 的原因是:4.0.0以後打包比較麻煩,4.0.0版本內有打包好的war
下載地址
解壓找到war包部署
- 解壓
cas-server-4.0.0-release.zip
- 將
cas-server-4.0.0\modules
目錄下的cas-server-webapp-4.0.0.war
複製到Tomcat 的 webapps/
下 。 - 為了方便,修改tomcat下
cas-server-webapp-4.0.0.war
改名為cas.war
啟動tomcat
- 若沒有報錯,訪問http://localhost:8080/cas/login出現如下頁面則部署成功:
登入成功
預設的使用者名稱個密碼為: 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的基本部署成功!有疑問可以私信或留言…