---
title: "CAS学习及软件的安装"
author: "yingruochen"
date: "2012-02-21T10:02:36Z"
tags: []
categories: ["编程语言"]
slug: "cas"
draft: false
lastmod: "2012-02-21T10:01:50Z"
id: 1415335
url: "https://yingruochen.iteye.com/blog/1415335"
---

1、什么是CAS？先看看[http://wenku.baidu.com/view/447f08254b35eefdc8d333ab.html](http://wenku.baidu.com/view/447f08254b35eefdc8d333ab.html)这篇文章或者看看我上传的附件。你也可以去CAS的官网去学习，网站是[https://wiki.jasig.org/display/CASUM/Home](https://wiki.jasig.org/display/CASUM/Home)。

2.软件的安装

基本的安装见[http://linliangyi2007.iteye.com/blog/165307](http://linliangyi2007.iteye.com/blog/165307)，这里面有详细的介绍。至于"**STEP 2，使用Java Keytool工具为系统生成HTTPS证书，并为系统注册** "这一步，因为我不会生成密钥，所以就改了一下配置文件，把https改成了false。如果哪位大侠知道怎样生成密钥，请告诉我一下详细的步骤哦，在此谢过了。

不使用https的修改不走是这么样的：

1、把as-server-3.4.11解压后，进入到cas-server-webapp\\src\\main\\webapp\\WEB-INF这个目录下，找到 deployerConfigContext.xml这个文件。

2、打开这个文件，然后修改里面的&lt;bean class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler"

                                        p:httpClient-ref="httpClient"  /&gt;，给bean添加一个p:requireSecure="false属性，这样就不需要生成密钥了。有什么不正确的地方，欢迎指正。