Прескочи към главното съдържание
WARNING You're browsing the documentation for an old version of Deskpro. Consider updating to Deskpro Horizon.

Manual Ubuntu w/ Nginx Deployment

в Install on Ubuntu Linux
Списък с автори
Публикувани: 28.06.2019 г.|Последно обновено: 4.02.2022 г.

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 configCopy link to Update Nginx config to clipboard

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 timezoneCopy link to Define the correct timezone to clipboard

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:Copy link to Restart PHP and Nginx: to clipboard

sudo service nginx restart sudo service php7.4-fpm restart
copy
Warning

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 DeskproCopy link to Install Deskpro to clipboard

  1. 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
  1. Extract the zipped Deskpro files:

sudo unzip deskpro.zip sudo rm deskpro.zip
copy
  1. Run the installer:

sudo bin/install
copy
  1. After you start the installer, you will have to enter your name and your email address

    image.png

  2. The installer checks the file integrity, the server requirements and the paths to a few utilities

    image.png

  3. Select the address that suits the best your organization

    image.png

  4. Select the preferred database location. The most comon is localhost

    image.png

  5. Enter MySQL details: Username, Password and Database.

    image.png

  6. After the database schema is installed, your system is ready. You can cancel the cron at this time.

    image.png

Set up cron jobCopy link to Set up cron job to clipboard

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 installationCopy link to Complete installation to clipboard

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.

image.png

Install Elasticsearch Copy link to Install Elasticsearch to clipboard

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 OpenJDKCopy link to 1. Install OpenJDK to clipboard

sudo add-apt-repository ppa:openjdk-r/ppa && sudo apt-get -y install openjdk-8-jre-headless
copy

2. Check that Java is workingCopy link to 2. Check that Java is working to clipboard

`java -version`
copy

3. Install required dependenciesCopy link to 3. Install required dependencies to clipboard

sudo apt-get install apt-transport-https
copy

4. Add keys and repositoryCopy link to 4. Add keys and repository to clipboard

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 correctlyCopy link to 5. To check that Elasticsearch is running correctly to clipboard

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 DeskproCopy link to 6. Configure ElasticSearch in Deskpro to clipboard

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

7. Confirm that Elasticsearch is workingCopy link to 7. Confirm that Elasticsearch is working to clipboard

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.

ПолезноНе беше полезно
следваща страница(Legacy) Manual Ubuntu Deployment
предишна страницаManual Ubuntu w/ Apache Deployment

Моля, логнете се или се регистрирайте, за да оставите коментар.

Раздели на страницата