wiki:ServerInstallation

Version 8 (modified by sander, 10 years ago) (diff)

--

This is all based on Debian Lenny. Please adjust for your own distro.

Requirements

The central server requires a LAMP server with a couple additional packages. It will not work on a Windows server.

The background daemon requires a few additional packages

I also highly recommend installing the xdebug plugin (php5-xdebug from backports.org) for (remote) PHP debugging and sane backtraces.

Installation

Create an appropriate directory and check out a copy of the server from our Subversion repository.

svn checkout http://code.officeshots.org/officeshots/trunk/server .

Next, make sure that the Apache user (www-data) can write to the following directories:

  • www/app/files/
  • www/app/files/requests/
  • www/app/tmp/
  • www/app/tmp/cache/
  • www/app/tmp/cache/htmlpurifier/
  • www/app/tmp/logs/
  • www/app/tmp/sessions/
  • www/app/tmp/tests/
  • www/app/tmp/zips/

Create a MySQL database, username and password that Officeshots can use. Go to the directory www/app/config and copy database.php.default to database.php. Open this file in a text editor and insert the MySQL details. You only need to fill out the $default connection. You can remove the $test connection.

Next, copy the file core.php.default to core.php. Open the file in a text editor and adjust the configuration settings.

Now you are ready to fill the default database. First, use the CakePHP shell to create a new database schema. Go to the www/app directory and run the following command:

$ cd www/app
$ ../cake/console/cake schema run create App

Follow the on-screen instructions to create the default schema. Next, you can import the default data, which you can find in www/app/config/sql/default-data.sql. There is no CakePHP command to import this. Use you favourite MySQL client like PhpMyAdmin? or the commandline SQL client:

$ mysql -u <username> -p <database-name> < config/sql/default-data.sql