The guide aims to help install Deskpro manually using Apache as the Webserver. If you are looking to install Deskpro with Nginx please use this link.
Run these commands to install PHP 7.1, MySQL, Apache, and some dependencies.
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get upgrade
sudo apt-get -y install wget unzip mlocate apache2 wget php7.1 php7.1-gd php7.1-mysql php7.1-curl php7.1-cli php7.1-cgi php7.1-dev php7.1-ldap php7.1-gd php7.1-json php7.0-apcu php7.1-xml php7.1-mbstring php7.1-soap php7.1-intl php7.1-zip php7.1-fpm libapache2-mod-php7.1 mysql-server mysql-client
copy
You will be asked to set a root password for mySQL. Remember this password. If you are not prompted for a new mysql root password, run the following command:
sudo mysql_secure_installation copy
If you plan to use an IMAP email account with Deskpro, install and enable the PHP IMAP extension:
sudo apt-get install -y php7.1-imap
sudo phpenmod imap copy
Update Apache config
Install Apach2 mod fastcgi and update some configuration files.
cd /tmp && wget http://mirrors.kernel.org/ubuntu/pool/multiverse/liba/libapache-mod-fastcgi/libapache2-mod-fastcgi_2.4.7~0910052141-1.2_amd64.deb
sudo dpkg -i libapache2-mod-fastcgi_2.4.7~0910052141-1.2_amd64.deb; sudo apt install -f
sudo a2enmod rewrite && sudo a2enmod proxy_fcgi setenvif && sudo a2enconf php7.1-fpm copy
Now is time to update the apache configuration file to reflect the path to deskpro.
sudo sed -i 's#DocumentRoot /var/www/html#DocumentRoot /usr/share/nginx/html/deskpro/www#g' /etc/apache2/sites-available/000-default.conf
Edit the file /etc/apache2/sites-available/000-default.conf sudo nano /etc/apache2/sites-available/000-default.conf
and add the following block of text after the line DocumentRoot /usr/share/nginx/html/deskpro/www
<Directory /usr/share/nginx/html/deskpro/www>
AllowOverride All
</Directory> copy
Define the correct timezone
Run the following commands to set the correct timezone
sudo sed -i 's/;date.timezone =/date.timezone = UTC/g' /etc/php/7.1/cli/php.ini
sudo sed -i 's/;date.timezone =/date.timezone = UTC/g' /etc/php/7.1/fpm/php.ini
sudo sed -i 's/;date.timezone =/date.timezone = UTC/g' /etc/php/7.1/apache2/php.ini copy
Restart Apache:
sudo service apache2 restart
sudo service php7.1-fpm restart copy
Install Deskpro
Download the latest version of Deskpro:
sudo mkdir -p /usr/share/nginx/html/deskpro
sudo wget http://www.deskpro.com/downloads/deskpro.zip -O /usr/share/nginx/html/deskpro/deskpro.zip
cd /usr/share/nginx/html/deskpro copy
Extract the zipped Deskpro files:
sudo unzip deskpro.zip
sudo rm deskpro.zip copy
Run the installer:
sudo bin/install copy
After you start the installer, you will have to enter your name and your email address
The installer checks the file integrity, the server requirements and the paths to a few utilities
Select the address that suits the best your organization
Select the preferred database location. The most comon is localhost
Enter MySQL details: Username, Password and Database.
After the database schema is installed, your system is ready. You can cancel the cron at this time.
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:
sudo echo "* * * * * deskpro /usr/bin/php7.1 /usr/share/nginx/html/deskpro/bin/cron" | sudo tee /etc/cron.d/deskpro
sudo service cron restart copy
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. sudo chown -R deskpro:deskpro /usr/share/nginx/html/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:
sudo mysql -uroot -p copy
Execute the following MySQL commands, replacing password1 with a secure password:
CREATE USER 'deskpro'@'localhost' IDENTIFIED BY 'password1'; copy
(replacing “password1” with a more complex password of your choice).
GRANT ALL PRIVILEGES ON deskpro.* TO 'deskpro'@'localhost'; copy
(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; copy
Now edit the configuration file using the command sudo nano /usr/share/nginx/html/deskpro/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.
::: info 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 OpenJDK
sudo add-apt-repository ppa:openjdk-r/ppa && sudo apt-get install openjdk-8-jre-headless copy
2. Check that Java is working
`java -version` copy
3. Install required dependencies
sudo apt-get install apt-transport-https copy
4. Add keys and repository
sudo apt-key adv --fetch-keys https://artifacts.elastic.co/GPG-KEY-elasticsearch
sudo add-apt-repository "deb https://packages.elastic.co/elasticsearch/2.x/debian stable main"
sudo apt-get -y install elasticsearch
sudo service elasticsearch restart copy
5. To check that Elasticsearch is running correctly
curl -X GET http://localhost:9200/
You should get output similar to this: copy
{
"name" : "Scott Summers",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "6LniY0VoTKOoh4rLT6h50A",
"version" : {
"number" : "2.4.6",
"build_hash" : "5376dca9f70f3abef96a77f4bb22720ace8240fd",
"build_timestamp" : "2017-07-18T12:17:44Z",
"build_snapshot" : false,
"lucene_version" : "5.5.4"
},
"tagline" : "You Know, for Search"
}
copy
6. Configure ElasticSearch in Deskpro
In the Deskpro admin interface, go to Server > Elasticsearch, check Enable Elasticsearch and 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/`. copy
7. Confirm that Elasticsearch is working
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.
Моля, логнете се или се регистрирайте, за да оставите коментар.