cas 服务器安装
来源:互联网 发布:英语四级软件推荐 编辑:程序博客网 时间:2024/04/30 05:03
1.生成证书
1.1 服务器端生成证书
[root@systest1 bin]# hostnamesystest1[root@systest1 bin]# keytool -genkeypair -alias cas -keyalg RSA -storepass changeit -keystore /home/server.keystoreWhat is your first and last name? [Unknown]: systest1What is the name of your organizational unit? [Unknown]: sysWhat is the name of your organization? [Unknown]: sysWhat is the name of your City or Locality? [Unknown]: sh What is the name of your State or Province? [Unknown]: sh What is the two-letter country code for this unit? [Unknown]: cnIs CN=systest1, OU=sys, O=sys, L=sh, ST=sh, C=cn correct? [no]: yEnter key password for <cas>(RETURN if same as keystore password):
1.2 服务器端导出证书,供客户端使用
keytool -exportcert -alias cas -file /home/cas.crt -storepass changeit -keystore /home/server.keystore
1.3 客户端导入证书到jvm(我这里是在同一台服务器上,所以直接导入)
keytool -importcert -alias cas -file /home/cas.crt -keystore "${JAVA_HOME}/jre/lib/security/cacerts" -storepass changeit -noprompt
2.tomcat支持https访问,conf/server.xml配置如下
<Server port="18005" shutdown="SHUTDOWN">
<!-- A "Connector" represents an endpoint by which requests are received and responses are returned. Documentation at : Java HTTP Connector: /docs/config/http.html (blocking & non-blocking) Java AJP Connector: /docs/config/ajp.html APR (HTTP/AJP) Connector: /docs/apr.html Define a non-SSL HTTP/1.1 Connector on port 8080 --> <Connector port="18080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="18443" />
<!-- Define a SSL HTTP/1.1 Connector on port 8443 This connector uses the BIO implementation that requires the JSSE style configuration. When using the APR/native implementation, the OpenSSL style configuration is required as described in the APR/native documentation --><Connector port="18443" protocol="org.apache.coyote.http11.Http11Protocol" maxThreads="150" SSLEnabled="true" scheme="https" secure="true"keystoreFile="/home/server.keystore" keystorePass="changeit" clientAuth="false" sslProtocol="TLS" />
<!-- Define an AJP 1.3 Connector on port 8009 --> <Connector port="18009" protocol="AJP/1.3" redirectPort="18443" />
3. cas 服务搭建
下载地址 http://developer.jasig.org/cas/;最新版本是4.0.0 ,下载后解压后,复制cas-server-4.0.0-release\cas-server-4.0.0\modules\cas-server-webapp-4.0.0.war到tomcat中,重命名为cas.war,启动tomcat
访问cas服务:https://systest1:18443/cas/login
打开文件 webapps/cas/WEB-INF/deployerConfigContext.xml
<bean id="primaryAuthenticationHandler" class="org.jasig.cas.authentication.AcceptUsersAuthenticationHandler"> <property name="users"> <map> <span style="color:#ff0000;"> <entry key="casuser" value="Mellon"/></span> </map> </property> </bean>这里配置了用户名/密码,
登录cas服务器 :用户名:casuser 密码:Mellon;登录成功画面如下
登出cas服务器:https://systest1:18443/cas/logout
0 0
- 安装 CAS 服务器
- cas 服务器安装
- 安装CAS服务器
- 安装 CAS 服务器 支持Tomcat
- 安装CAS服务器(二)
- 单点登录1:安装CAS服务器
- CAS 服务器端口配置
- cas服务器配置 windows
- cas的服务器搭建
- cas服务器的搭建
- Yale cas安装
- Yale cas安装
- Yale cas安装
- Yale cas安装
- Yale cas安装
- Yale cas安装
- Yale cas安装
- Yale cas安装
- sudo uograde 之后 需要重装显卡驱动
- Android库工程及代码混淆(project.properties、proguard-project.txt)
- PHP文件解压,压缩文件遍历,文件夹遍历
- iOS 手机号正则表达式
- MySQL解决[Err] 1206 - The total number of locks exceeds the lock table size问题
- cas 服务器安装
- 如何在生产中成功运用Docker
- Android基础-----Activity,Intent
- 弹出层弹出框
- eclipse新建maven项目报错
- 【C#】华南理工大学计算机考研复试题目
- Application.SetCompatibleTextRenderingDefault(false)作用
- 在Java 中哪些组件需要使用内存
- java 邮件发送工具类