Time for action – installing JDK
Carry out the following procedure to install the latest version of JDK on your machine:
- Go to http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u26-download-400750.html and find a page with the content, as shown in the following screenshot:
- Click on the jdk-6u26-windows-i586.exe link. When a window pops up, click on Run.
- Click on Next in the next pop-up window.
- Accept the default installation folder and click on Next.
- Accept the default installation directory for JRE and click on Next.
- When the installation is done, click on Finish.
Now that the JDK is installed, we set the
JAVA_HOME
variable and put Java commands on the path. The following is the procedure: - Click on the Windows icon at the bottom corner on the left-hand side of the screen.
- Right-click on Computer. Click on Properties | Advanced system settings | Environment variables.
- Click on New in the System variables section. Define a
JAVA_HOME
variable and set its value toC:\Program Files\Java\jdk1.6.0_26
: - Edit the Path variable in the System variables section. Add
%JAVA_HOME%\bin
as a value in the Path variable. It should be separated from other values by a semi-colon. A sample value for thePath
variable is as follows:%JAVA_HOME%\bin;%ANT_HOME%\bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;c:\Program Files\Intel\DMIX;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;c:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\NTRU Cryptosystems\NTRU TCG Software Stack\bin\;C:\Program Files\Wave Systems Corp\Gemalto\Access Client\v5\;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\10.0\DLLShared\;C:\Program Files\Windows Live\Shared;C:\Program Files\TortoiseSVN\bin
- Click on OK to save the settings.
- Open a Disk Operating System (DOS) interface. On the command line, enter
java-version
and press Enter.
What just happened?
The previous screenshot confirms that the JDK has been successfully installed!
Application servers and servlet containers
You can download an application server or servlet container from its website and install the Liferay Portal Web Application Archive (WAR) file and dependency Java Archive (JAR) files in it. Alternatively, if Liferay has already bundled Liferay Portal with an application server or servlet container, you can download that bundle, unzip it, and install it.
Liferay Portal supports the following application servers:
- Apache Geronimo
- Borland ES
- JBoss
- JonAs
- Jrun
- OracleAS
- Orion
- Pramati
- RexIP
- Sun GlassFish
- Sun JSAS
- WebLogic
- WebSphere
Liferay Portal also runs in the following servlet containers:
- Jetty
- Resin
- Tomcat
For every release, Liferay, Inc. installs Liferay Portal in some open source servlet containers and application servers. The resulting packages are called Liferay Portal bundles, which are ZIP files. A user can download one such bundle, unzip it, and install it. The presently-available bundles are as follows:
Database servers
We can connect Liferay Portal to the following database servers:
- Apache Derby
- IBM DB2
- Firebird
- Hypersonic
- Informix
- InterBase
- JdataStore
- MySQL
- Oracle
- PostgreSQL
- SAP
- SQL Server
- Sybase
In this book, and at the sample site, we will run Liferay Portal with MySQL database. MySQL is the world's most popular open source database. The current version of Liferay Portal requires MySQL version 5.0 or above.