1. Installation

1.1. mod_perl

LiveJournal requires mod_perl. It is widely used, so you might already have it on your machine. If not, you can find the official installation docs at http://perl.apache.org/docs/1.0/guide/install.html[o].

Caution

We've found that more people have success when mod_perl is statically linked (“compiled-in” to the Apache module), rather than using a DSO. [6] This is because it is difficult to build mod_perl reliably as a DSO.

Debian

Typically, if you already have a working Apache installation in Debian and would like to install mod_perl support, then installing the package libapache-mod-perl should suit your needs. Otherwise, you should install the package apache-perl. The apache-perl package provides the advantage of easier setup, because it is compiled with mod_perl support already.

1.2. Apache suEXEC Support

If you want the LiveJournal code to run as a user other than what your webserver runs as, then you'll need suEXEC[7] support in Apache. You are free to figure that out yourself. We will assume your webserver is running as user lj, though it does not have to run as any specific user to work.

In fact, the LiveJournal code never writes to disk. So, as long as it can write to the database (which is essential, obviously), you can run the code as any user, including nobody or www-data, both of which are common in out-of-the-box configurations.

1.3. Virtual Hosts

You can run the LiveJournal code inside or outside of a <VirtualHost> section in Apache's httpd.conf file. However, you are not able (yet) to have two VirtualHosts running parallel copies of the code. In the future we will fix that, but for now if you really need two installations on the same machine, you will need to run two sets of Apache processes, listening on different ports.



[6] Consult “ mod_perl Installation User Guide: When DSO Can Be Used[o]” for more information.