»2. Installing the files

The typical directory to install LiveJournal is /home/lj, but it is not a requirement at all. To ease documentation, we'll assume that you'll want to install in that directory. We'll also assume you'll be using user lj, but that also doesn't matter at all. Feel free to install wherever and as whoever … there shouldn't be any problems.

Prerequisite: $LJHOME Before you install using either method, you should create the directory where your LiveJournal installation will reside. This needs to be the same directory that the environment variable $LJHOME is set to, otherwise your installation will not work properly. Consult Section 1: $LJHOME Environment Variable for more information on setting $LJHOME.

Example 7.1. Creating the $LJHOME directory:

# mkdir /home/lj
# chown lj.lj /home/lj

Using Tarballs

LiveJournal maintains the server code in tar.gz (‘tarball’) format, which can be downloaded from: http://www.livejournal.org/download/code/[o]». The tarballs are labelled by date, so be sure to grab the latest one.

Untar the tarball from the $LJHOME directory, and then run the provided installation script, bootstrap.pl.

Example 7.2. Tarball Install:

$ cd $LJHOME
$ tar zxvf LiveJournal-YYYYMMDDNN.tar.gz
$ ./bootstrap.pl

Using CVS

Bleeding edge releases of the code can be found in CVS at the CVS server: cvs.livejournal.org[o]».

Warning

Installing and updating LiveJournal from CVS is not guaranteed as stable as tarball releases. If you need a more stable release, you're better off using the packaged tarballs as mentioned above.

Example 7.3. CVS Install:

$ mkdir $LJHOME/cvs
$ cd $LJHOME/cvs
$ cvs -z3 -d:pserver:[email protected]:/home/cvslj co livejournal
$ cvs -z3 -d:pserver:[email protected]:/home/cvspub co wcmtools bml
$ wcmtools/bin/multicvs.pl --conf=livejournal/cvs/multicvs.conf --init

That last command will copy everything from the CVS directory over to $LJHOME, the live area.

Having two copies of the code laying around may not make sense now, but it will later when we write the docs to explain how to run a heavily-customized version of the site and still stay up-to-date with the mainstream CVS. (FIXME: write/link that section)