Initially set up a Liferay Portal5.2.3 environment, ready to work 1 development kit is currently only the latest version of Liferay liferay package download on the official website http://www.liferay.com/zh/home, need to download the open source version 5.2.3 community http://sourceforge.net/projects/lportal/files/Liferay%20Portal/
Initially set up Liferay Portal5.2.3 environment
First, the preparatory work
1, Development Kit
Currently Liferay's official website to provide the latest version of the http://www.liferay.com/zh/home only liferay package download, download 5.2.3 version of the open source community needs to http://sourceforge.net/projects/lportal/files/Liferay % 20Portal /, select the 5.2.3 version download the following two packages:
Portal Source Package: liferay-portal-src-5.2.3.zip
Tomcat bundle: liferay-portal-tomcat-6.0-5.2.3.zip
2, development tools
Development tools recommended version used herein version
1.6 JDK 1.6.0_22
Ant 1.7 1.8.2
MyEclipse 5.5 7.5
Tomcat 6.0 above 6.0.18
Note: This Tomcat is liferay-portal-tomcat bundle of tomcat, and does not require additional downloads; Ant http://ant.apache.org/bindownload.cgi to download the latest apache-ant-1.8.2. bin.zip
3, the directory structure
Herein assumed that the operator directory structure as follows:
D: / workspace root directory
D: / workspace / ant ant installation directory
D: / workspace / Liferay liferay working directory
D: / workspace / Liferay / portal liferay-portal source code directory
D: / workspace / Liferay / service liferay-portal bundled Tomcat directory
D: / workspace / Liferay / ext liferay-portal of the expansion project directory
Second, the basic configuration
. 1, the JDK mounting configuration
JDK installation configuration as before, not repeat them here, to remind installation configuration Do not forget to use " the Java -version" and " javac" to check whether the installation was successful
2, the Ant mounting configuration
Unzip apache-ant-1.8.2.bin.zip to D: / workspace under / ant directory, environment variables ( Windows7 lower right-click "Computer" and select "Advanced System Settings - > Advanced - > Environment Variables") in is a new system variable path following path: " D: /workspace/ant/apache-ant-1.8.2/bin;", save.
Open dos, enter " Ant -version" to check the configuration
. 3, the Tomcat mounting configuration
Decompression liferay-portal-tomcat-6.0-5.2.3.zip to D: / workspace / Liferay the / service directory in the environment variable new path Path system variable follows: " D: / workspace / Liferay / service / tomcat-6.0.18 / bin; ", save.
Run the tomcat startup.bat, server normally starts the installation is successful
. 4, MyEclipse mounting configuration
Here only talk about MyEclipse in the configuration of Tomcat server.
The MyEclipse the Tomcat configuration for the first step 3 installed Tomcat, the Tomcat under JDK configuration as the first step 1 installed JDK, and to configure the virtual machine parameters are as follows JDK:
-Xmx1024m -XX:MaxPermSize=256m -Dfile.encoding=UTF8 -Duser.timezone=GMT -Djava.security.auth.login.config="%CATALINA_HOME%/conf/jaas.config" -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
Tip: Open the tomcat bin directory setenv.bat file, locate the file named variable JAVA_OPTS, the parameter value is the need to copy the virtual machine parameters. This step is very important, otherwise it will lead to memory overflow.
Third, the establishment of a development environment
method one:
1, the deployment of Liferay Source
The liferay-portal-src-5.2.3.zip decompress D: / portal under / workspace / Liferay directory
2, the new profile release. $ {Username} .properties
Find the portal in the source code release.properties file, the new release. $ {Username} .properties file in the same directory. $ {username} native user name, may be used under DOS SET command to check the username value. My machine username is Administrator, so the new release.Administrator.properties file, as only one line:
lp.ext.dir=D:/workspace/Liferay/ext
Note: lp.ext.dir for the specified directory expansion project of Liferay, note that the path must use " /" instead of " /."
3, to generate an extended directory
Run dos, enter D: / under workspace / Liferay / portal directory, enter " ant Clean Start Build-ext" command, wait ant execution is complete (requires 3 to 10 minutes after), in the Liferay will appear the following file ext directory :
4, the new profile app.server. $ {Username} .properties
New in the ext directory app.server.Administrator.properties file, add the following:
app.server.type=tomcat
app.server.tomcat.dir=D:/workspace/Liferay/service/tomcat-6.0.18
Note: the AP p.server.type to Liferay specify the server type, the AP p.server.tomcat.dir as specified Liferay installation directory for the Tomcat server.
5, to perform configuration
Open dos, enter D: / workspace / under Liferay / ext directory, enter " ant Clean Deploy" command is executed, waiting ant execution is complete.
6, development environment set up.
Method Two:
1, the same method of Step 1
2, the same method of Step 2
3, the new file with the same directory release.properties app.server.Administrator.properties file, the contents and method steps as 4 file content.
4, find the release.properties files in the same directory of the build.xml file, find the next nodes in the graph:
Fileset and add child nodes at the node, as follows:
"." includes="app.server.Administrator.properties"/>
5, the same method of Step 3, except that after the implementation of the generated at a plurality ext directory named file in app.server.Administrator.properties
6, the same method of Step 5
7, development environment set up.
Fourth, test development environment
Run startup.bat start tomcat server, after a while will pop up a login page, the default user name: [email protected]; password: the Test; Log enter into Liferay Portal account, can Portlet customization.
Note: If you modify the back-end database file of user information, the need for a user to log in as Admin, please refer to the specific user information database. Thank you here first floor nwpubin reminder ^ _ ^
V. environment to build complete