Skip to main content

Manual CentOS/Red Hat Deployment

Install on CentOS/Red Hat

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

yum -y install wget unzip
yum -y install httpd 
yum -y install php php-mysql php-gd php-cli php-ldap php-pdo php-common
php-imap php-mbstring php-xml php5-curl
yum -y install mariadb-server mariadb


mariadb is a drop-in MySQL replacement used in newer versions of CentOS/Redhat. Apart from the installation/setup commands, it works the same way as MySQL for the purposes of using Deskpro.

If you are using a version of PHP before 5.5, also run yum -y install php-pecl-apc to install APC cache.

  1. Set up database:
    systemctl start mariadb /usr/bin/mysql_secure_installation

You will be asked for the database password; just press Enter, since no password is set yet.

Set a root password for MySQL and remember this password. For the rest of the install steps, enter y (for Yes).

Ensure that the mySQL service starts on reboot using:

systemctl enable mariadb

Update Apache config

Edit the /etc/httpd/conf/httpd.conf file.

Search and replace in this file:

  • /var/www/html to /var/www/deskpro/www
  • Fine the <Directory block and change AllowOverride None to AllowOverride All

Note that there are other AllowOverride statements in different parts of the file. You must make sure to edit the right statement.

Make sure Apache starts:

systemctl start apache systemctl enable apache

Install Deskpro

  1. Download the latest version of Deskpro:
mkdir -p /var/www/deskpro
wget -O /var/www/deskpro
  1. Extract the Deskpro files from the ZIP:
cd /var/www/deskpro
  1. Delete the ZIP file:


  1. Run the installer from the command-line:

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:

sed -i "* * * * * root /usr/bin/php /var/www/deskpro/bin/cron" /etc/crontab

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

Complete final steps

Your Deskpro helpdesk is now installed. You should open Deskpro in your web browser to the URL/IP address of 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 apache /var/www/deskpro

You should also create a non-root MySQL user to access the database.

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


Now edit these lines of config/config.database.php so that Deskpro is accessing the database with the new MySQL user.

// The database username define('DP_DATABASE_USER', '');

// The password for the database user define('DP_DATABASE_PASSWORD', '');

Install Elasticsearch

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


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.


You must install the stable 2.x version of Elasticsearch to use with Deskpro. Elasticsearch 1.x or 5.x is not supported.

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

    Download the Linux RPM from Oracle

    Install with

    sudo rpm -Uvh jre-8u51-linux-x64.rpm

    (using the filename of the RPM you downloaded)

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

    java -version

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


  4. Install Elasticsearch with:

    sudo rpm -Uvh elasticsearch-2.3.5.rpm

    (using the filename of the RPM you downloaded)

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

  6. Set Elasticsearch to start on server boot:

    sudo systemctl enable elasticsearch

    then start it with:

    sudo systemctl start elasticsearch

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


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

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


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

Authors list

First published: 17/02/2020

Last updated: 17 Feb 2020 by Hugo Pinto