Liferay 5.1.1 Installation and Integration CAs

Source: Internet
Author: User
Tags auth cas directory create create database generate ssl certificate ssl certificate ssl connection

Liferay 5.1.1 Installation and Integration CAs



Reprint please retain the author information:

Author: 88250

blog:http:/blog.csdn.net/dl88250

MSN & Gmail & qq:dl88250@gmail.com

Directory

Summary 1

Environment 1

Download liferay 5.1.1 2

Configuration Database 2

Configuration Data Source 2

Build Database 2

Create DATABASE User 2

Add Database Connection Driver 2

Test Login 3

Consolidating CAS 3

Configuring CAS Server 3

Enable Tomcat SSL 3

Configuring CAS Client 3

Generate SSL certificate using JDK tool Keytool 3

Test SSL Connection 4

Configuring CAS 4

CAS Login authentication 5

Customizing CAS login authentication 5

Summary 5


Summary

Liferay is currently a powerful portal application & Framework that implements a number of specifications whose design, functionality, and user experience are not comparable to other portal systems. Recently, Liferay has just received the 2008 Open Source Portal award, and Sun has joined the Liferay community to participate in the development of some portlets. It can be seen that the prospect is very good. However, because the official document has not yet been, and Liferay 5.1.x and 4.x in the configuration is very different, here, I will share my installation and configuration experience to everyone: the environment

MySQL5.0.5

JRE 1.6.0.7

Liferay 5.1.1 Bundled with Tomcat

Ubuntu 8.04


Download Liferay 5.1.1

To the Official download homepage: http://www.liferay.com/web/guest/downloads/portal download Bundled with Tomcat 6.0 and unzip to the location you specified (that is, the installation directory $LIFERAY _home).

Configuration Database Configure a data source

Edit $LIFERAY _home/conf/catalina/localhost/root.xml Comment out hypersonic section, reverse the MySQL section, modify your MySQL configuration (the red section may need to be modified, this article is the case), as follows:

<!--hypersonic-->

<!--

<resource

Name= "Jdbc/liferaypool"

Auth= "Container"

Type= "Javax.sql.DataSource"

Driverclassname= "Org.hsqldb.jdbcDriver"

Url= "Jdbc:hsqldb:lportal"

Username= "SA"

Password= ""

Maxactive= "20"

/>

-->

<!--MySQL-->


<resource

Name= "Jdbc/liferaypool"

Auth= "Container"

Type= "Javax.sql.DataSource"

Driverclassname= "Com.mysql.jdbc.Driver"

Url= "Jdbc:mysql://localhost:3306/lportal?"

Useunicode=true&amp;characterencoding=utf-8&amp;usefastdateparsing=false "

Username= "Lportal"

Password= "dl88250"

Maxactive= "20"

/>


Building a database

To http://www.liferay.com/web/guest/downloads/additional download database build script Liferay Portal 5.1.1 SQL Scripts After decompression in the directory create Create-mysql.sql, the script into MySQL, create Liferay database (using the default recovery, that is, restore sample data that kind). Create a database user

Create a user lportal (referred to in the 2.a configuration) and authorize all operations of the schema lportal to that user. Add database Connection driver

Download MySQL connector jar, Http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.6.tar.gz/from/pick #mirrors and place the jar under the $LIFERAY _home/lib. Test Login

Test, use test@liferay.com, password test to login to Liferay Portal.

consolidating CAs

In theory, CAS server should be deployed on a separate authentication server, but because of the environment, CAS server is deployed under Liferay Tomcat. Configuring CAS Server

Click here to download this war copy to the $HOME under Liferay/deploy (this directory will be automatically generated when the Liferay portal is launched, which is Liferay plugins's Hot deployment directory), so Liferay will automatically deploy Cas-server. See cas-web under the $LIFERAY _home/webapps/to indicate successful deployment. Enable Tomcat SSL

Edit $LIFERAY _home/conf/server.xml, and uncomment the SSL configuration section as follows:

<!--Define a SSL http/1.1 Connector on port 8443

This is connector uses the JSSE configuration, when using APR, the

Connector should be using the OpenSSL style configuration

Described in the APR documentation-->

<connector port= "8443" protocol= "http/1.1" sslenabled= "true"

maxthreads= "Scheme=" "https" secure= "true"

Clientauth= "false" sslprotocol= "TLS"/> configuring CAs Client

Click here to download the CAS client (this client is the implementation of Yale University), extract the Casclient.jar and put it under the $LIFERAY _home/webapps/root/web-info/lib/. (Looks like you already have this jar--!) Use the JDK tool Keytool to generate an SSL certificate

Use the command under any directory (I'm Home):

 






  

  

  

  

  

  

  

Export the certificate from KeyStore and import the certificate into the JRE:



Test SSL Connection

Access to https://daniel-desktop:8443 (because the certificate is not issued by the authority, so add exception), when the page will be automatically jump to https://daniel-desktop:8443/web/guest/ Home, which is the homepage of our Liferay portal. The only protocol used is HTTPS. This demonstrates the success of SSL enablement. Configuring CAs

Log in to portal using the Test@liferay.com account and use the Enterprise Admin portlet to set up CAS:

Enterprise Admin→settings→authentication→cas, enable CAS, as follows:

Remember the point save ....

Log off the current account (test@liferay.com) to see the logout successful prompt. When you use http://daniel-desktop:8080 again to access and log on, you will jump to the CAS authentication page, indicating the success of the CAS configuration. CAS logon Verification

In the CAS validation page, use test as the account number, test as the password (as long as the account = password is OK), testing can be verified through CAs. The result should be yes, but the jump has no display at all. Because we did not actually authenticate with our portal user account.

For more information on the integration of CAs and Liferay, please refer here

About SSO under CAs and Tomcat please refer to here Custom CAS login verification

[This section is not completed, please pay attention to this article author blog:http://blog.csdn.net/dl88250 to get the latest reference:)]

Reference here: http://blog.csdn.net/DL88250/archive/2008/08/26/2831855.aspx

Summary

After this "toss", our portal can finally be used. This time, we have learned the basic configuration of the Liferay portal, as well as the integration of CAs. After that, there are many areas that need improvement. For example, interface customization, user Rights Management, extended portlet plugins/environment applications, and so on. In the future article I will put my liferay to the use, configuration, development experience to share to everyone, please give us active attention OH:)

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.