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

Manual Ubuntu w/ Apache Deployment

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

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

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 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.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:Copy link to Restart Apache: to clipboard

sudo service apache2 restart sudo service php7.1-fpm restart
copy

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

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

sudo add-apt-repository ppa:openjdk-r/ppa && sudo apt-get 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
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 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.

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

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

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