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

 

Article

Installing Perforce Chronicle Under Debian/Ubuntu Linux

« Go Back

Information

 
Problem

Installation of Perforce Chronicle from a release package.

Solution

TASK

Installation of Perforce Chronicle from a release package.

REQUIREMENTS

  • 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.

ASSUMPTIONS

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

DETAILS

  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):
  4. sudo tar -zx -C /srv -f /path/to/p4chronicle.tgz
(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.
  • Make the data directory (exists in Chronicle tarballs) writable by the web server:
  • sudo chown www-data: /srv/p4chronicle/data
  • Enable mod-rewrite (required):
  • sudo a2enmod rewrite

    or

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

  • Double check that the file /srv/p4chronicle/.htaccess is present and create a vhost definition in /etc/apache2/sites-enabled/p4chronicle.conf:
  • <VirtualHost *:80>
        ServerAdmin webmaster@localhost
        ServerName p4chronicle.example.org
        DocumentRoot /srv/p4chronicle
    
        <Directory />
        Options FollowSymLinks
        AllowOverride None
        </Directory>
        <Directory /srv/p4chronicle>
        Options Indexes FollowSymLinks -MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
        </Directory>
    
        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
    
    </VirtualHost>
      
  • Restart Apache:
  • sudo apache2ctl restart

  • Make sure the fully qualified domain name (p4chronicle.example.org) 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):
    10.0.0.1        p4chronicle.example.org p4chronicle

    ... where 10.0.0.1 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 http://p4chronicle.example.org/ (or the configured domain name).
  • Follow "Setup" instructions on the screen.
  • 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/perforce.so
    2. Alternative PHP Cache (APC) <-- installed above as apt package php-apc. 
    To enable P4PHP, add the perforce.so 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.
Related Links

Feedback

 

Was this article helpful?


   

Feedback

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

Characters Remaining: 255