The guide aims to help install Deskpro manually using Nginx as the Webserver. If you are looking to install Deskpro with Apache please use this link.
Run these commands to install PHP 7.4, MySQL, Nginx, 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 nginx php7.4-apcu php7.4-bcmath php7.4-cli php7.4-common php7.4-curl php7.4-dev php7.4-fpm php7.4-gd php7.4-imap php7.4-intl php7.4-json php7.4-ldap php7.4-mbstring php7.4-mysql php7.4-odbc php7.4-opcache php7.4-readline php7.4-soap php7.4-sqlite3 php7.4-xml php7.4-zip 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
Update Nginx config
Obtain the latest configuration file
sudo wget -P /etc/nginx/conf.d/ https://raw.githubusercontent.com/deskpro/install/master/ansible/roles/nginx/templates/deskpro.conf
sudo sed -i 's#set $fastcgi_pass unix:{{deskpro_php_fpm_socket}};#set $fastcgi_pass unix:/run/php/php7.4-fpm.sock;#g' /etc/nginx/conf.d/deskpro.conf
sudo sed -i 's#set $deskpro_root {{deskpro_site_root}}/www;#set $deskpro_root /usr/share/nginx/html/deskpro/www;#g' /etc/nginx/conf.d/deskpro.conf 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.4/cli/php.ini
sudo sed -i 's/;date.timezone =/date.timezone = UTC/g' /etc/php/7.4/fpm/php.ini copy
Restart PHP and Nginx:
sudo service nginx restart
sudo service php7.4-fpm restart copy
Test the nginx installation by opening the main IP: http://YOUR_UBUNTU_IP. If you see the Nginx screen, then the service was installed successfuly.
If you happen to still see the Apache page you might have an error in your Nginx setup.
Check the Nginx status, if you get the message
Failed to read PID from file /run/nginx.pid: Invalid argument
Please refer to https://bugs.launchpad.net/ubuntu/+source/nginx/+bug/1581864 for a workaround.
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.4 /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.
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 -y 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).
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/
.
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.
Моля, логнете се или се регистрирайте, за да оставите коментар.