Enterprise Collaboration with Liferay
Onward to Apache Land
Install Apache as described by your Linux vendor, or go to the /opt/install directory and untar the Apache source:
tar -zxvf httpd-2.2.4.tar.gz
See the Apache server documentation [4] for more on building Apache from source. Keep in mind that your web server will need to access Java functionality through Apache Tomcat. The mod_jk module facilitates communication between the Apache web server and Tomcat. Create a workers.properties file for mod_jk:
vi /opt/liferay-4.4.2/conf/workers.properties
A sample file is shown in Listing 3. Next, place the mod_jk apache module
cp /opt/install/ mod_jk-1.2.25-httpd-2.2.4.so / opt/apache2/modules/mod_jk.so
and edit the httpd.conf file:
vi /opt/apache2/ conf/httpd.conf
Make sure and set the user and groups for Apache to run under to user "apache" and group "apache." Also, don't forget the ServerAdmin directive. Add the following lines in with the other include directives:
# Include mod_jk Include /opt/apache2/conf/mod_jk.conf
Now, create the config file for the tomcat connector
vi /opt/apache2/conf/mod_jk.conf
and create the default vhost configuration file. Make a directory in which to put vhosts:
mkdir /opt/apache2/conf/vhosts
and create the vhost file.
vi /opt/apache2/conf/vhosts/w3.conf
Listing 4 is a default vhost that kicks anything that doesn't fit another vhost over to a w3 (intranet) site.
Listing 3
workers.properties
Listing 4
w3.conf
Remember to change your IP address to match your server's IP address. The Jkmount directives tell Apache what to get from Tomcat.
Note that every vhost-- even the ones handled with Liferay – must have an entry in Apache's config. This entry ensures that any weird hostname that might be requested will go directly to the default page. This will also prevent users from adding their own vhosted domains without having access to the Apache configs.
So that Apache looks for this file instead of the default vhost config, edit http.conf by replacing:
# Virtual hosts Include conf/extra/httpd-vhosts.conf
with
# Virtual hosts Include /opt/apache2/conf/vhosts/*.conf
Now set up Apache as a service:
chkconfig --add apache2 chkconfig apache2 on
and bounce Apache and Tomcat:
service apache2 restart service liferay restart
You should now be able to access Liferay through w3.testdomain.com (replace testdomain with your domain). You must have a DNS record for w3 pointing to the proper IP address (or an entry in your hosts file).
Setting up Your Site
If you are configuring Liferay to act as an intranet portal on an actual production network, you'll probably want to tie Liferay to your organization's user database. On our network, Liferay uses an Active Directory server for authenticating users. Other approaches are also possible depending on the structure of your network. Consult the Life-ray user forums or your favorite search engine. Because authentication techniques vary, this article will not cover the topic, but keep in mind that one of the principal benefits of Liferay is to create communities of users within the network for the purpose of sharing content, and this process works best when it is tied into the network's existing user database.
Once you have logged into the system, add the Communities Portlet by mousing over the Welcome button in the upper right corner of the page (Figure 1), selecting Add Application in the toolbar on the left, and selecting Community | Communities (add) (Figure 2). Use this portlet to create a community for each department.
Next, assign members to communities by browsing to the All Communities tab and selecting Actions | Assign Members, select the User Groups tab and then the Available tab, then select the user group you want to map to the community. Commit the changes with the Update Associations button. Do this for every community except for Guest.
Add the Enterprise Admin portlet to the home page and select the >> button. Select the Settings tab and fill in the following information: Name and Mail Domain. Next, go to the Default User Associations tab and list the Guest community in the Community Names box (Figure 3). This will ensure that all users can browse the Guest community pages while they are logged in. Commit your changes with the Save button.
After you have installed Liferay and organized the space into user communities, it is easy to add new content pages to the site. Go back to the home page and mouse over the Welcome button and select the Manage Pages option (Figure 4). You can create a public or private page for any of the Liferay communities. Next, mouse over the Welcome button and go to My Places. From here, you can edit the layout of each community's site structure.
Conclusion
Liferay is a big, complex system. Just getting Liferay installed and working is the first and largest hurdle. After that, you can easily use Liferay as a central, reasonably secure approach to collaboration and information dissemination.
Infos
- The Apache Project: http://www.apache.org
- LifeRay: http://www.liferay.com
- Java: http://www.sun.com/java
- MySQL: http://www.mysql.com
- Apache documentation: http://httpd.apache.org/docs/
« Previous 1 2 3
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.
-
ZorinOS 17.1 Released, Includes Improved Windows App Support
If you need or desire to run Windows applications on Linux, there's one distribution intent on making that easier for you and its new release further improves that feature.
-
Linux Market Share Surpasses 4% for the First Time
Look out Windows and macOS, Linux is on the rise and has even topped ChromeOS to become the fourth most widely used OS around the globe.
-
KDE’s Plasma 6 Officially Available
KDE’s Plasma 6.0 "Megarelease" has happened, and it's brimming with new features, polish, and performance.
-
Latest Version of Tails Unleashed
Tails 6.0 is based on Debian 12 and includes GNOME 43.
-
KDE Announces New Slimbook V with Plenty of Power and KDE’s Plasma 6
If you're a fan of KDE Plasma, you'll be thrilled to hear they've announced a new Slimbook with an AMD CPU and the latest version of KDE Plasma desktop.
-
Monthly Sponsorship Includes Early Access to elementary OS 8
If you want to get a glimpse of what's in the pipeline for elementary OS 8, just set up a monthly sponsorship to help fund its continued existence.
-
DebConf24 to be Held in South Korea
Busan will be the location of the latest DebConf running July 28 through August 4
-
Fedora Unleashes Atomic Desktops
Fedora has combined its solid distribution with rpm-ostree system to make it possible to deliver a new family of Fedora spins, called Fedora Atomic Desktops.
-
Bootloader Vulnerability Affects Nearly All Linux Distributions
The developers of shim have released a version to fix numerous security flaws, including one that could enable remote control execution of malicious code under certain circumstances.