"Tech" Single Sign-on system CAS construction and implementation user name password verified by MySQL database

Source: Internet
Author: User
Tags cas

1. Installing the JDK

2. Build Tomcat:

Download tomcat7.0

Double-click%tomcat_path%/bin/startup.bat to start TOMCAT

The browser opens the http://localhost:8080 and the configuration succeeds if the following interface is displayed:

3. Configure Tomcat to use the HTTPS protocol

(1) Generate a security certificate

CD to%java_home%/bin/directory, execute the command

" Tomcat " " RSA " "G : \tomcat.keystore "

where "G:\tomcat.keystore" is the path and name to save the generated certificate.

In the next action, be aware of "what is your first and last name?" "Here to answer the domain name, for example I was building tomcat on this machine, so answer localhost, as shown:

Other just fill it out, password of course to remember, I use the "tomcat" as the password, after the configuration of the time to use.

After executing the above command, you can see the certificate Tomcat.keystore under G:\.

(2) Configuring Tomcat

Locate the Server.xml file under%tomcat_path%/conf, and locate it on the following code:

<!--<connector port="8443"Protocol="http/1.1"Sslenabled="true"MaxThreads=" Max"Scheme="HTTPS"Secure="true"ClientAuth="false"Sslprotocol="TLS"/>--

Remove the comment and change it to the following code:

<connector port="8443"Protocol="Org.apache.coyote.http11.Http11Protocol"MaxThreads=" Max"Sslenabled="true"Scheme="HTTPS"Secure="true"Keystorefile="G:\tomcat.keystore"Keystorepass="Tomcat"ClientAuth="false"Sslprotocol="TLS"/>

The meanings of the items are shown in the following table:

Then open the https://localhost:8443 in the browser, the following interface shows that the configuration tomcat using HTTPS successfully:

4. Configuring CAs Server

To the CAS home page to download the CAS server, I download here is not the latest version, is cas-server-3.5.2-release.zip; then unzip, to \cas-server-3.5.2\ Modules directory, locate Cas-server-webapp-3.5.2.war, copy it to \apache-tomcat-7.0.56\webapps and rename it to Cas.war, restart Tomcat (double-click \ Apache-tomcat-7.0.56\bin\startup.bat), open https://localhost:8443/cas/login with a browser, if the interface appears, the CAS server configuration is successful:

Resources

[1] Configuring Tomcat to use https:http://ln-ydc.iteye.com/blog/1330674

"Tech" Single Sign-on system CAS construction and implementation user name password verified by MySQL database

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.