Skip to content

Faveo Helpdesk Installation on Ubuntu 18.04 LTS with Nginx on PHP 7.1

Vijaya Kumar edited this page Aug 19, 2019 · 3 revisions

Introduction

This document will list steps on how to install Faveo Helpdesk on a new Ubuntu 18.04 LTS.

We will install the following dependencies in order to make Faveo Helpdesk work:

Read the detailed list of server requirement

We are using vi editor throughout to open and edit the file, you can use nano editor also

Configure IP Tables

Please note that you have to make changes in the IPtables configurations. This allows opening ports that are necessary for Faveo installation.

This is an optional step, If you are able to access your server remotely on Public IP. This step will not be required. Mainly on the local network server, this step is required. If you are purchasing/renting server in a data center this step might not be required.

iptables -A INPUT -p tcp --dport 22 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT

iptables -A OUTPUT -p tcp --sport 22 -m conntrack --ctstate ESTABLISHED -j ACCEPT

iptables -A INPUT -p tcp --dport 80 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT

iptables -A OUTPUT -p tcp --sport 80 -m conntrack --ctstate ESTABLISHED -j ACCEPT

iptables -A INPUT -p tcp --dport 443 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT

iptables -A OUTPUT -p tcp --sport 443 -m conntrack --ctstate ESTABLISHED -j ACCEPT

PS:

  • You have to reset the firewall and iptables to your specifications
  • This step might vary for different data centers or cloud service providers, Please check with your hosting company on opening port number and correct settings

Create a user for Faveo and update all the repos

useradd -r www-data

usermod -G www-data www-data

apt-get install -y software-properties-common 
  
sudo add-apt-repository ppa:ondrej/php

apt-get update

Update your system

apt-get update && apt-get upgrade

Install Nginx,PHP, MySQL and PHP extensions

In this step, we install the following

  • PHP
  • Required PHP Extension
  • Git
  • MySQL
  • Curl
  • OpenSSL
  • Nginx

Installing Nginx, PHP, PHP extensions and MySQL

sudo apt-get install -y Nginx

apt-get install git sl curl mlocate dos2unix bash-completion openssl  php7.1-xml php7.1-xsl php7.1-mbstring php7.1-readline php7.1-zip php7.1-mysql php7.1-phpdbg php7.1-interbase php7.1-sybase php7.1 php7.1-sqlite3 php7.1-tidy php7.1-opcache php7.1-pspell php7.1-json php7.1-xmlrpc php7.1-curl php7.1-ldap php7.1-bz2 php7.1-cgi php7.1-imap php7.1-cli php7.1-dba php7.1-dev php7.1-intl php7.1-fpm php7.1-recode php7.1-odbc php7.1-gmp php7.1-common php7.1-pgsql php7.1-bcmath php7.1-snmp php7.1-soap php7.1-mcrypt php7.1-gd php7.1-enchant libapache2-mod-php7.1 libphp7.1-embed && updatedb

service nginx stop

service php7.1-fpm stop

Install MySQL and Create empty Database for Faveo

sudo apt-get install mysql-server

service mysql start

mysql_secure_installation

mysql -u root -p

CREATE DATABASE faveo;

GRANT ALL PRIVILEGES ON faveo.* TO 'faveouser'@'localhost' IDENTIFIED BY 'faveouserpass';

FLUSH PRIVILEGES;

quit

Setting Up ionCube

wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz

tar xvfz ioncube_loaders_lin_x86-64.tar.gz

php -i | grep extension_dir (To find PHP extension Directory)

Copy ioncube loader to Directory.

sudo cp ioncube/ioncube_loader_lin_7.1.so /usr/lib/php/20160303 

php --ini |grep "Loaded Configuration File" (To find config file)

Add below line before Windows Extensions in php.ini file and php-fpm ini file.

vi /etc/php/7.1/fpm/php.ini and vi /etc/php/7.1/cli/php.ini

zend_extension = "/usr/lib/php/20160303/ioncube_loader_lin_7.1.so"

Save and exit.

Copy Faveo Help Desk from Github

Faveo files can be manually uploaded to the server or copied from Github, if you have access to Github account then use this step, else follow the next step

Create a folder for Faveo and upload Faveo Help-Desk Files

mkdir -p /opt/faveo/faveo-helpdesk/

OR Copy Faveo Help Desk via SSH

In case you want to upload the Faveo files from your local system to your server, then follow this step Download the Faveo zip file from our billing site https://www.faveohelpdesk.com Use a File transferring client like Filezilla, WinSCP to upload the files to our server directory. Open Filezilla and enter the root Credentials of the server and log in.

Create a folder for faveo inside that in the path /opt/faveo/faveo-helpdesk/

Make sure that you have extracted all the files under that folder /opt/faveo/faveo-helpdesk/

Now continue the process by logging in back to ssh terminal

To upload files via SSH

Login to the file location

scp filename.zip username@destination:/where/to/put

Give correct file permission to Faveo files

chown -R www-data:www-data /opt/faveo/

chown -R www-data:www-data /opt/faveo/faveo-helpdesk/

chmod -R 755  /opt/faveo/

chmod -R 755  /opt/faveo/faveo-helpdesk/

chmod -R 755 /opt/faveo/faveo-helpdesk/storage

chmod -R 755  /opt/faveo/faveo-helpdesk/bootstrap

Install Composer

curl -sS https://getcomposer.org/installer | php

sudo mv composer.phar /usr/local/bin/composer

update the Nginx config files

service nginx stop

mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.back

wget -O /etc/nginx/nginx.conf https://support.faveohelpdesk.com/uploads/ubuntu16.04/faveo-nginx-conf.txt

Create a config file for nginx

vi /etc/nginx/conf.d/faveo-helpdesk.conf

Copy and paste the below conf in nginx conf

upstream faveo_php {
    server unix://opt/faveo/faveo-helpdesk/faveo_php.socket;
}

server {
    listen 80;
    listen 127.0.0.1:80;
        # Edit the following line with the correct information.
    server_name %(SERVERNAME)s;
    error_log /var/log/nginx/faveo_error_log;
    access_log /var/log/nginx/faveo_access_log;
    root /opt/faveo/faveo-helpdesk/public;
    index index.php index.html index.htm;

    error_page 403 404 405 500 501 502 503 504 @error;

    try_files $uri $uri/ /index.php?$args;

    location @error {
        rewrite ^/(.*)$ /index.php?$1;
    }

    location ~ /\. {
        deny all;
    }

    location ~ /(artisan|composer.json|composer.lock|gulpfile.js|LICENSE|package.json|phpspec.yml|phpunit.xml|README.md|readme.txt|release-notes.txt|server.php) {
        deny all;
    }

    location ~ [^/]\.php(/|$) {
        fastcgi_split_path_info ^(.+?\.php)(/.*)$;
        if (!-f $document_root$fastcgi_script_name) {
            return 404;
        }
        include /etc/nginx/fastcgi_params;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_pass faveo_php;
    }
}

Edit the faveo-helpdesk.conf with your domain name

Remove the default config

rm -rf /etc/nginx/conf.d/default.conf

Create a config file for PHP-fpm

vi /etc/php/7.1/fpm/pool.d/faveo_php.conf

Copy and paste the below config in php-fpm conf

[faveo_php]
user = www-data
group = www-data
listen = /opt/faveo/faveo-helpdesk/faveo_php.socket
listen.owner = www-data
listen.group = www-data
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
chdir = /
service mysql restart
service nginx restart
service php7.1-fpm restart

Setup Cron Job

We are using default localhost URL where Faveo is installed, you can change the URL based on your system setting and IP address

crontab -u www-data -e

* * * * * /usr/bin/php /opt/faveo/faveo-helpdesk/artisan schedule:run >> /dev/null 2>&1

Start Installation

Now you can install Faveo via GUI Wizard or CLI.

You can access Faveo url in the browser

PS:

  • You have to reset the firewall and iptables to your specifications
  • You need to follow steps yourself to harden the security of your server, server security is not covered in this article
  • Redis is recommended for messaging que and improving system performance
  • Always use SSL/HTTPS URL for Faveo

Redis Installation

Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker.

This is an optional step and will improve the system performance and is highly recommended.

Install and configure Redis, Supervisor and Worker for Faveo on Ubuntu 16.04

Installation and Upgrade Guide

Administrator's Guide

Agent's Guide

Email Integration

Release & Upgrade Notes

Known Issues

Contribute & Feedback

Knowledge Base

Third Party Integration

Plugins

API

Clone this wiki locally