(Legacy) Manual Ubuntu Deployment

Install on Ubuntu Linux

This guide has been deprecated and two new guides are available for the current releases.

If you are looking for the Manual Ubuntu with Apache, please use the following link.

If you are looking for the Manual Ubuntu with Nginx, please use the following link.

Run these commands to install PHP 5, MySQL, Apache, and some utilities.

apt-get update

apt-get -y install wget unzip mlocate

apt-get -y install apache2

apt-get install -y php5 php5-gd php5-mysql php5-curl php5-cli php5-cgi
php5-dev php5-ldap php5-gd php5-json php-apc libapache2-mod-php5

apt-get install mysql-server mysql-client

You will be asked to set a root password for mySQL. Remember this password.

If you are using a version of PHP before 5.5, you should also run:

apt-get install php5-apc

to install the APC opcode cache.

If you plan to use an IMAP email account with Deskpro, install and enable the PHP IMAP extension:

apt-get install php5-imap
php5enmod imaps

Update Apache config

Run a2enmod rewrite

Edit the default.conf or 000-default.conf file in /etc/apache2/sites-available/.

In this file, search and replace /var/www/html with /var/www/deskpro/www

  • If there is a section like this:
<Directory ...>
  ...
</Directory>

change AllowOverride None to AllowOverride All.

If the file has no <Directory ...> section, add:

<Directory /var/www/deskpro/www>
 AllowOverride All
</Directory>

below the line DocumentRoot.

Restart Apache:

service apache2 restart

Install Deskpro

  1. Download the latest version of Deskpro:
mkdir -p /var/www/deskpro
wget http://www.deskpro.com/downloads/deskpro.zip -O /var/www/deskpro/deskpro.zip
cd /var/www/deskpro
  1. Extract the zipped Deskpro files:

    unzip deskpro.zip rm deskpro.zip

  2. Run the installer:

 bin/install

Set up cron job

Set a cron job to run your PHP CLI executable using the cron.php file in the install folder as an argument:

echo "* * * * * root /usr/bin/php /var/www/deskpro/bin/cron.php" >> /etc/crontab

This makes the cron job run once per minute to carry out tasks like processing email.

Complete installation

Your Deskpro helpdesk is now installed. You should open Deskpro in your web browser at the relevant URL (or IP address) for the server and follow the final steps.

For production use, you should change ownership of the installed files so they are owned by the web server user or by a dedicated DeskPRO user account:

e.g. chown -R www-data /var/www/deskpro

You should also have DeskPRO access the database through a MySQL user with more limited privileges than the root user.

After installation, you will have a MySQL client installed on your system. Type:

mysql --user=root --password=rootpass deskpro

(replacing “rootpass” with the password for the MySQL root user you chose during installation; “deskpro” should be replaced with the name of your Deskpro database if you are using another name).

Execute the following MySQL commands:

CREATE USER 'deskpro_user'@'localhost' IDENTIFIED BY 'password1';

(replacing “password1” with a more complex password of your choice).

GRANT ALL PRIVILEGES ON deskpro.* TO  'deskpro_user'@'localhost';

(this assumes the default database name ‘deskpro’ is being used: if you have changed the DeskPRO database, you should replace ‘deskpro’ in the deskpro.* part above with whatever name you used).

FLUSH PRIVILEGES;

Now edit config/config.database.php to reference the new MySQL user.

Install Elasticsearch

You should now install Elasticsearch to greatly improve the search features of your helpdesk. This is optional, but strongly recommended.

Note

Without Elasticsearch, Deskpro search will still function, but searching will only match certain helpdesk content (e.g ticket titles instead of the full text of a ticket) and it will be slower.

For best performance, you should run Elasticsearch on a local server (the same server where you installed Deskpro, or one on the same network). You can also use a third-party hosted Elasticsearch service - see Using hosted Elasticsearch with Deskpro for an example of how to set this up.

To install Elasticsearch on the same server and connect it to your helpdesk:

  1. Install Oracle Java if you don’t have it already. (The alternative OpenJDK Java runtime is not recommended for production use.)

    sudo add-apt-repository ppa:webupd8team/java sudo apt-get install oracle-java7-installer

  2. Accept the Oracle binary license and check that Java is working by running:

    java -version

  3. Download the latest 1.x Elasticsearch DEB package, for example:

wget https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/2.3.5/elasticsearch-2.3.5.deb

  1. Install the package you downloaded:

    dpkg -i elasticsearch-2.3.5.deb

    (using the filename of the DEB file you downloaded)

  2. Locate the elasticsearch.yml config file in /etc/elasticsearch and edit it.

    Search for the line that mentions “network.bind_host”, delete any leading # and make sure it says:

    network.bind_host: localhost

    Then add:

    script.disable_dynamic: true

  3. Restart Elasticsearch

    sudo service elasticsearch restart

  4. You should see a series of messages as the Elasticsearch node starts.

  5. To check that Elasticsearch is running correctly, run:

    curl -X GET http://localhost:9200/

    You should get output similar to this:

    {
    "status" : 200,
    "name" : "Agon",
        "version" : {
           "number" : "1.3.2",
           "build_hash" : "dee17544e2f254f3f269435345d7591939aaefd12f",
           "build_timestamp" : "2014-08-13T14:29:30Z",
          "build_snapshot" : false,
           "lucene_version" : "4.9"
          },
    "tagline" : "You Know, for Search"
    }
  1. In the Deskpro admin interface, go to Server > Elasticsearch, check Enable Elasticsearchand enter the URL of the service (e.g. http://localhost if it is running on the same server).
Warning

Depending on the Elasticsearch configuration, you may need to specify the port to connect to as well, e.g. `http://my-es-host:80/` or `https://my-es-host:443/`.
  1. Click Test Settings to check that your DeskPRO installation can connect to Elasticsearch, then Save Settings.

For production use, we recommend that you consult the Elasticsearch documentation for more information about configuration and running Elasticsearch as a service on Linux.

Note

If the Elasticsearch service stops or crashes, Deskpro will revert to using the more limited, default search system.

Published: 17/03/2017

Last updated: 28/06/2019