现在的位置: 首页 > 综合 > 正文

Liferay5.2.3 Portal 快速安装方法

2014年01月04日 ⁄ 综合 ⁄ 共 8609字 ⁄ 字号 评论关闭

Liferay 安装方法Quick Installation Instructions.说得还挺好的。

Quick Installation Instructions

Tags: installation deployment setup liferay v5.0 liferay v5.1 liferay v5.2

Table of Contents [-+]

·         1 Prerrequisites

·         1.1 Java

·         1.2 Web Browser

·         2 Windows

·         3 Linux and Mac OS X

·         4 Next Steps

·         5 Installing GlassFish from a JAR file

·         6 Learning more and getting support

The purpose of this guide is to provide instructions for a Liferay Portal bundle. A bundle includes Liferay Portal together with an Open Source application server so that it's ready to run.

Prerrequisites

In order to install a portal bundle you will need the following software installed:

Java

Java 5 or later.

If you're running Linux or Mac OSX on your machine, the JDK is generally provided by the vendor of your operating system, either on a CD or in a downloadable software repository.

If you're running Windows, a JRE is contained in the bundle. If you don't want to use this, then it's a little more complicated. Go to http://java.sun.com/ and download the latest version of the JDK. It is likely labeled “Java SE” in the Popular Downloads section. When you install it, don't install it in the default location. Instead, install it to a folder near the root folder on your machine, such as C:/Java. Use the subfolder name that it gives you (i.e., jdk1.6.0_06) so that the full path looks something like C:/Java/jdk1.6.0_06. When the installer for the JRE comes up, change the path for that too so that it is inside C:/Java.

When you are finished, go to your Control Panel and click the System icon. Go to Advanced, and click the Environment Variables button. Add a new system variable (not a user variable) called JAVA_HOME, and point it to the directory to which you installed the JDK (i.e., C:/Java/jdk1.6.0_06). Click OK, and then edit the Path variable (you don't need to add it, it is already among your variables), which you'll find in the list of system variables. At the beginning of the variable, add a section which reads %JAVA_HOME%/bin and put a semicolon (;) after it. Click OK until you come out of all the dialog boxes, and then open a Command Prompt window. Type java –version and press Enter. If you get a message telling you the version of Java, you’ve correctly configured the JDK. If not, check your JAVA_HOME variable to see if you have it pointing to the location of your JDK install correctly, and make sure your syntax is correct in your Path variable.

·         Note: This article frequently talks about the JDK, but a JRE will usually be enough - at least when you're running the tomcat bundle. You might need to set JRE_HOME instead of JAVA_HOME though.

·         Note: Java 1.4 can be used for Liferay up to version 4.4.

说了这么多讲得就是配置两个环境变量。

Web Browser

A web browser such as Firefox or Internet Explorer

Windows

1) Download the desired bundle from http://www.liferay.com/web/guest/downloads/portal

Note: There are several bundles using different servers. The one recommended to follow this guide is Liferay + Tomcat5.5

2) Unzip the bundle file by clicking the right button and selecting the appropriate menu from the context menu Note: It's recommended to avoid unzipping the file within a folder which has spaces in the name or that has a parent with spaces in the name. For example, use c:/liferay

3) Version 5.2: Enter the folder created, then the server folder (tomcat-5.5.27 if you are using the recommended bundle) and the bin subfolder. Run Liferay by double-clicking the startup.bat.

运行方法

Version 5.1 and earlier: Enter the folder created, and the bin subfolder. Run Liferay by double-clicking the startup.bat.

Note that the name of the file to run Liferay varies depending on the application server used. If you are not using the recommended bundle (which uses Tomcat 5.5), refer to the application server documentation.

4) Liferay will startup in 30-60 seconds on modern computers.

Version 5.2: Liferay will automatically open in the default browser when it is ready.

Version 5.1 and earlier: Wait until you see a line similar to the following appear in the logs:

INFO: Server startup in 42950 ms

(On Tomcat, logs are located at {tomcat-home}/logs/catalina.out. You can use the Console application to view the logs or try the "tail" command in a Terminal window: "tail -f {tomcat-home}/logs/catalina.out")

5) Open a browser and go to http://localhost:8080/

6) Version 5.2: You will find some sample data in your portal. Login as any of the users already created (you will find their credentials in the welcome page of the portal). The user with administration priviledges has the following credentials:

·         Email addres: bruno@7cogs.com

·         Password: bruno

If you remove 7Cogs sample data, then the user with administration priviledges will be test@liferay.com and password test.

这个地方也可以create account。填完信息后会提示密码。进入后,就可以感受Portal的魅力。

Version 5.1 and earlier: Login as user test@liferay.com and password test. This user has all administration priviledges.

7) New in Version 5.2: Control Panel consolidates Administration portlets into one interface: If you are looking for the administration portlets, you'll find them in the "Control Panel," which is one of the menu items in the dock in the upper right.

Linux and Mac OS X

1) Download the desired bundle from http://www.liferay.com/web/guest/downloads/portal

Note: There are several bundles using different servers. The one recommended to follow this guide is Liferay + Tomcat5.5

2) Unzip the bundle file using the unzip command. For example:

$ cd /opt/liferay

$ unzip liferay-portal-tomcat-5.5-5.1.0.zip

Note: you will need root permissions to use the opt directory. You can choose another directory inside your home directory to make it simpler. Unzipping the archive leaves the shell scripts not-executable. We'll fix that in the next step:

3) Version 5.2: Execute startup.sh from within the bin subdirectory inside the server directory (tomcat-5.5.27 if you are using the recommended bundle):

$ cd liferay-portal-5.2.0/tomcat-5.5.27/bin

$ chmod +x *.sh

$ ./startup.sh

Version 5.1 and earlier: Execute startup.sh from within the bin subdirectory:

$ cd liferay-portal-tomcat-5.5-5.1.0/bin

$ chmod +x *.sh

$ ./startup.sh

Note that the name of the file to run Liferay varies depending on the application server used. If you are not using the recommended bundle (which uses Tomcat 5.5), refer to the application server documentation. Also note that starting Liferay 5.1 from a different working directory might cause liferay to start with an empty database, as the default hsqldb database is located in the $TOMCAT_HOME/bin directory and referred to as being in "." - e.g. the current directory. The directory where the database files are located in must be writeable by the user tomcat is running as - e.g. your own user account.

4) Liferay will startup in 30-60 seconds on modern computers.

Version 5.2: Liferay will automatically open in the default browser when it is ready. (is this real? I can't remember to have seen this...)

Version 5.1 and earlier: Wait until you see a line similar to the following appear in the logs:

INFO: Server startup in 42950 ms

(On Tomcat, logs are located at {tomcat-home}/logs/catalina.out. You can use the Console application to view the logs or try the "tail" command in a Terminal window: "tail -f {tomcat-home}/logs/catalina.out")

5) Open a browser and go to http://localhost:8080/

6) Version 5.2: You will find some sample data in your portal. Login as any of the users already created (you will find their credentials in the welcome page of the portal). The user with administration priviledges has the following credentials:

·         Email addres: bruno@7cogs.com

·         Password: bruno

If you remove 7Cogs sample data, then the user with administration priviledges will be test@liferay.com and password test.

Version 5.1 and earlier: Login as user test@liferay.com and password test This user has all administration priviledges..

7) New in Version 5.2: Control Panel consolidates Administration portlets into one interface: If you are looking for the administration portlets, you'll find them in the "Control Panel," which is one of the menu items in the dock in the upper right.

Next Steps

While the instructions above are enough to get the system up and running you may want to perform some further configuration steps such as:

·         Installing plugins from the official repository or the community repository

·         Configure Liferay Portal to use a production-ready database instead of the default HSQLDB

·         Configure they system to access mail servers for sending and receiving emails (changed in version 5.2)

·         Fine tune the performance of the system

·         Find out how to install Liferay Portal in other application servers

·         Remove 7Cogs sample data

You can find information about how to do this and much more in the Portal Administrators Guide (Version 5.1) (or Version 4.4. 5.2 is not yet available as of March 9, 2009). You can buy the print back book or download the PDF for free!!

Installing GlassFish from a JAR file

In response to the comments below, the following are general instructions for installing GlassFish from a JAR file.

To install and configure GlassFish, you need to have JDK 5 or JDK 6 installed on your system. The configuration processing depends on Ant (1.6.5). The bundle includes an Ant distribution that has been extended with tasks to facilitate developing Java EE 5 applications for the application server.

1.     Download one of the bundles to disk, set JAVA_HOME to the JDK you have installed on your system.

2.  Run the GlassFish installer:

java

3.                      -Xmx256m -jar <filename>.jar

This command will unbundle GlassFish and create a new directory structure rooted under a directory named 'glassfish'.

>> If you encounter out-of-memory errors during installation, specify larger initial and maximum memory heap sizes; for example:

java

4.                         -Xms512m -Xmx1024m -jar <filename>.jar

5.  Change to the new GlassFish directory:

cd

6.                         glassfish

7.  If you are using a machine with an operating system that is a derivative of

抱歉!评论已关闭.