# Installation

#### Prerequisites

In order for this module to work, following requirements must be met:

1. Additional external packagess are installed on the OTRS server: 
    - libreoffice
    - libreoffice-java-common
    - default-jre
2. Apache user must be the owner of the /var/www. LibreOffice requires ".config" directory in user's (in this case it's Apache) home directory. Commands below are examples for Ubuntu.

```
sudo chown -R www-data /var/www/
sudo service apache2 restart
```

The following instructions explain how to install the package using one of the provided methods.

#### 1. Admin Interface

Log in to your system as user with admin privileges and go to menu Admin ⇨ Package Manager. Select module file (with .opm extension) in the "Actions" panel and click "Install Package" button.

#### 2. Command line

Log in to the server (via SSH, putty etc.) as "otrs" user and use the following command:

```shell
/opt/otrs/bin/otrs.Console.pl Admin::Package::Install /path/to/package/AttachmentPreview-1.0.4.opm
```