Last update: 2020-01-11 22:18

Install Casebox

1. Things to Know Before Installing Casebox

Casebox has some prerequisites that usually are installed under root privileges on a Linux server (we use CentOS)

Make sure this software is installed and running. Notice: we advise using the latest versions available for all software below

  • Apache 2.2.x + mod_rewrite
  • PHP 5.4.x with mbstring extension
  • MySql 5.5.x
  • JAVA (JRE or JDK) and SOLR 5.x. See Run the Solr Installation Script for the simplest way to install&run SOLR
  • ImageMagick 6.5.x + imagick PHP package: for TIFF conversion to PNG, JPG

Optionally, you can install:

  • LibreOffice 4.x.x + unoconv: for DOC, XLS, RTF file preview
Here is a list of commands performed on a bare bone CentOS server to install all required software: Barebone CentOS 6 instalation

2. Download and Install

We recommend to use Git instead of downloading Casebox from GitHub. It will allow you to easily update Casebox when new versions are released

> cd /var/www/
> git clone

We use /var/www/casebox/.
The /CB/ notation is used to denote the folder where Casebox is extracted. In our example /CB/install/ translates to /var/www/casebox/install/

CB folder should have correct user/group. Usually it's the webserver user/group. The default for Apache HTTPD server is apache/apache. Chown the folder recursively, in our example the webserver runs under apache user/group:

> chown -R apache:apache /var/www/casebox/
Actually only a few folders should have apache:apache user/group, but we globally change the user/group for the entire CB folder. In next releases, the install script will take care of this, setting correct permissions for /data/, /logs/ (if these folders doesn't exists, create them, the install script will also do this in the future).

Run /CB/bin/install.php script. Assuming we're in /CB/ folder:

> php bin/install.php

The script will ask you for the MySql user/pass, prefix for mysql&solr databases, admin email. It will create a global /CB/httpsdocs/config.ini for all CB cores.Casebox is designed for SAAS deployment model, one physical instance on the server can serve many separate cores. A core is represented by a MySql database, SOLR core and a separate folder on the server for file storage. CB configuration will use two MySql users:

  1. privileged user (mysql root): to create/drop databases, i.e. perform administrative tasks
  2. normal user: used only to work within an existent database.
The privileged mysql user password is not saved in CB settings for security reasons.

The install script will ask you the URL of the website, you can use, real server IP or a domain name.

At the end of CB instalation, you can create a core using the empty CB core that comes with CB (it has only the most important content types like folder/file/task).

Now you need to enable CB virtualhost in Apache config.

3. Apache configuration

Use /CB/install/httpd/ssl_casebox.conf as an example how to add Casebox virtualhost. ssl_casebox.conf includes SSL certificates. Casebox comes with self-generated certificates at /CB/install/httpd/ssl/. You may also run Casebox under normal HTTP if you wish.

Make sure apache module mod_rewrite is enabled.

Restart apache server and try to access the URL of your CB core. Example:

4. LibreOffice & unoconv: optional

Casebox uses LibreOffice to generate .doc, .odt, .ppt file previews (it converts them into HTML). If you need Office file preview feature, you should install LibreOffice. On Windows, download&install LibreOffice.

On Linux, use this guideline. to install the latest stable LibreOffice from RPMs

Launch unoconv from /CB/httpsdocs/libx/:

> unoconv --listener&

5. Cronjobs

Notifications by email of task creating/completion, converting .DOC to text, fulltext indexing: these processes are done by cronjobs.

See /CB/install/cron/readme.txt for instructions: you need to edit the crontab of httpd user/group and add the following scrips:

*/2 * * * * php -f "/var/www/html/casebox/sys/crons/run_cron.php" -- -n send_notifications -c all
*/2 * * * * php -f "/var/www/html/casebox/sys/crons/run_cron.php" -- -n extract_files_content -c all
*/5 * * * * php -f "/var/www/html/casebox/sys/crons/run_cron.php" -- -n check_mail -c all
*/2 * * * * php -f "/var/www/html/casebox/sys/crons/cron_receive_comments.php"

In future versions of CB, the install script will take care of this.