Perforce Public Knowledge Base - Installing Perforce Chronicle Under Debian/Ubuntu Linux
Reset Search



Installing Perforce Chronicle Under Debian/Ubuntu Linux

« Go Back



Installation of Perforce Chronicle from a release package.



Installation of Perforce Chronicle from a release package.


  • A working installation of Debian/Ubuntu Linux. Ubuntu 10.10 and 11.04 were tested.
  • Root access (su/sudo/etc).
  • Internet connection (to download required packages).
  • Access to the Chronicle installation package.
  • Familiarity with the BASH command shell.


  • Perforce Chronicle is to be installed to /srv/p4chronicle.
  • The fully qualified domain name (FQDN) of the webserver is
  • DNS is resolved locally via the file /etc/hosts for testing.
  • sudo is used to gain root access.


sudo tar -zx -C /srv -f /path/to/p4chronicle.tgz
  1. Install packages from distribution - sudo apt-get install apache2 libapache2-mod-php5 php5 php-apc
  2. Follow the instructions provided to you for obtaining Perforce Chronicle.
  3. Extract tarball on the web-server (we will use /srv/p4chronicle):
(or extract using a GUI tool)
sudo ln -s /srv/p4chronicle-VERSION /srv/p4chronicle
(where VERSION is the version number of the release)
Note: You can copy the extracted directory but make sure the .htaccess file is copied too.
sudo chown www-data: /srv/p4chronicle/data

sudo a2enmod rewrite


sudo ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /srv/p4chronicle

    <Directory />
    Options FollowSymLinks
    AllowOverride None
    <Directory /srv/p4chronicle>
    Options Indexes FollowSymLinks -MultiViews
    AllowOverride All
    Order allow,deny
    allow from all

    ErrorLog /var/log/apache2/error-p4chronicle.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel info

    CustomLog /var/log/apache2/access-p4chronicle.log combined


sudo apache2ctl restart

Optional Software

For production deployment, we recommend installation the following software to archive better server performance:
  1. P4PHP, the Perforce extension for PHP <-- included in CHRONICLEROOT/p4-bin/bin.<platform>/p4php/
  2. Alternative PHP Cache (APC) <-- installed above as apt package php-apc. 
To enable P4PHP, add the file to the appropriate PHP extensions folder, and update the php.ini file for both the environment and for apache. The locations change depending on distribution. Please see the INSTALL.txt file that comes with the installation package for setup instructions and more details.
  • Make the data directory (exists in Chronicle tarballs) writable by the web server:
  • Enable mod-rewrite (required):
  • Double check that the file /srv/p4chronicle/.htaccess is present and create a vhost definition in /etc/apache2/sites-enabled/p4chronicle.conf:
  • Restart Apache:
  • Make sure the fully qualified domain name ( resolves correctly. The simplest way to do this is to create a new host (A) record in your DNS server. For testing, you can add the following line to the local hosts file of your client machine (machine that runs the web browser): p4chronicle

    ... where is the IP address of your webserver.

    The file is stored in /etc/hosts on MacOS, Linux or other UNIX-based systems and can be found in %systemroot%\system32\drivers\etc\ under Windows. Create the file if it does not exist.

  • Point your browser to (or the configured domain name).
  • Follow "Setup" instructions on the screen.
Related Links



Was this article helpful?



Please tell us how we can make this article more useful.

Characters Remaining: 255