Skip to content

Faveo Helpdesk Installation on CentOS 7

Bhanu edited this page Jul 17, 2017 · 41 revisions

Introduction

This document will list steps with screenshots on how to install Faveo Help Desk on a new CentOS server.

We will install following dependencies in order to make Faveo Help Desk work

  • Apache/NGINX
  • PHP 5.6
  • PHP Extensions:
  • MySQL/MariaDB
  • Composer
  • Cron Job

Create a user for faveo and update all the repos.

useradd -r www-data && usermod -G www-data www-data

yum install wget sudo nano

vi /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

Copy the below content into this file

-----BEGIN PGP PUBLIC KEY BLOCK-----

Version: GnuPG v1.4.11 (GNU/Linux)

mQINBFKuaIQBEAC1UphXwMqCAarPUH/ZsOFslabeTVO2pDk5YnO96f+rgZB7xArB OSeQk7B90iqSJ85/c72OAn4OXYvT63gfCeXpJs5M7emXkPsNQWWSju99lW+AqSNm jYWhmRlLRGl0OO7gIwj776dIXvcMNFlzSPj00N2xAqjMbjlnV2n2abAE5gq6VpqP vFXVyfrVa/ualogDVmf6h2t4Rdpifq8qTHsHFU3xpCz+T6/dGWKGQ42ZQfTaLnDM jToAsmY0AyevkIbX6iZVtzGvanYpPcWW4X0RDPcpqfFNZk643xI4lsZ+Y2Er9Yu5 S/8x0ly+tmmIokaE0wwbdUu740YTZjCesroYWiRg5zuQ2xfKxJoV5E+Eh+tYwGDJ n6HfWhRgnudRRwvuJ45ztYVtKulKw8QQpd2STWrcQQDJaRWmnMooX/PATTjCBExB 9dkz38Druvk7IkHMtsIqlkAOQMdsX1d3Tov6BE2XDjIG0zFxLduJGbVwc/6rIc95 T055j36Ez0HrjxdpTGOOHxRqMK5m9flFbaxxtDnS7w77WqzW7HjFrD0VeTx2vnjj GqchHEQpfDpFOzb8LTFhgYidyRNUflQY35WLOzLNV+pV3eQ3Jg11UFwelSNLqfQf uFRGc+zcwkNjHh5yPvm9odR1BIfqJ6sKGPGbtPNXo7ERMRypWyRz0zi0twARAQAB tChGZWRvcmEgRVBFTCAoNykgPGVwZWxAZmVkb3JhcHJvamVjdC5vcmc+iQI4BBMB AgAiBQJSrmiEAhsPBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRBqL66iNSxk 5cfGD/4spqpsTjtDM7qpytKLHKruZtvuWiqt5RfvT9ww9GUUFMZ4ZZGX4nUXg49q ixDLayWR8ddG/s5kyOi3C0uX/6inzaYyRg+Bh70brqKUK14F1BrrPi29eaKfG+Gu MFtXdBG2a7OtPmw3yuKmq9Epv6B0mP6E5KSdvSRSqJWtGcA6wRS/wDzXJENHp5re 9Ism3CYydpy0GLRA5wo4fPB5uLdUhLEUDvh2KK//fMjja3o0L+SNz8N0aDZyn5Ax CU9RB3EHcTecFgoy5umRj99BZrebR1NO+4gBrivIfdvD4fJNfNBHXwhSH9ACGCNv HnXVjHQF9iHWApKkRIeh8Fr2n5dtfJEF7SEX8GbX7FbsWo29kXMrVgNqHNyDnfAB VoPubgQdtJZJkVZAkaHrMu8AytwT62Q4eNqmJI1aWbZQNI5jWYqc6RKuCK6/F99q thFT9gJO17+yRuL6Uv2/vgzVR1RGdwVLKwlUjGPAjYflpCQwWMAASxiv9uPyYPHc ErSrbRG0wjIfAR3vus1OSOx3xZHZpXFfmQTsDP7zVROLzV98R3JwFAxJ4/xqeON4 vCPFU6OsT3lWQ8w7il5ohY95wmujfr6lk89kEzJdOTzcn7DBbUru33CQMGKZ3Evt RjsC7FDbL017qxS+ZVA/HGkyfiu4cpgV8VUnbql5eAZ+1Ll6Dw===hdPa

-----END PGP PUBLIC KEY BLOCK-----

Save the file and quit. Use command :wq to save and quit

vi /etc/pki/rpm-gpg/RPM-GPG-KEY-remi

Copy the below content into this file

-----BEGIN PGP PUBLIC KEY BLOCK-----

Version: GnuPG v1.4.7 (GNU/Linux)

mQGiBEJny1wRBACRnbQgZ6qLmJSuGvi/EwrRL6aW610BbdpLQRL3dnwy5wI5t9T3 /JEiEJ7GTvAwfiisEHifMfk2sRlWRf2EDQFttHyrrYXfY5L6UAF2IxixK5FL7PWA /2a7tkw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sSxh/la6HKw===6Rbg

-----END PGP PUBLIC KEY BLOCK-----

Save the file and quit. Use command :wq to save and quit

vi /etc/yum.repos.d/remi-php56-safe.repo

Copy the below content into this file

[remi-safe]

name=Safe Remi's RPM repository for Enterprise Linux 7 - $basearch #baseurl=http://rpms.remirepo.net/enterprise/7/safe/$basearch/ mirrorlist=http://rpms.remirepo.net/enterprise/7/safe/mirror enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

[remi]

name=Remi's RPM repository for Enterprise Linux 7 - $basearch #baseurl=http://rpms.remirepo.net/enterprise/7/remi/$basearch/ mirrorlist=http://rpms.remirepo.net/enterprise/7/remi/mirror enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

[remi-php56]

name=Remi's PHP 5.6 RPM repository for Enterprise Linux 7 - $basearch #baseurl=http://rpms.remirepo.net/enterprise/7/php56/$basearch/ mirrorlist=http://rpms.remirepo.net/enterprise/7/php56/mirror #NOTICE: common dependencies are in "remi-safe" enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

[remi-debuginfo]

name=Remi's RPM repository for Enterprise Linux 7 - $basearch - debuginfo baseurl=http://rpms.remirepo.net/enterprise/7/debug-remi/$basearch/ enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

[remi-php56-debuginfo]

name=Remi's PHP 5.6 RPM repository for Enterprise Linux 7 - $basearch - debuginfo baseurl=http://rpms.remirepo.net/enterprise/7/debug-php56/$basearch/ enabled=0 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

Save the file and quit. Use command :wq to save and quit

vi /etc/yum.repos.d/epel.repo

Copy the below content into this file

[epel]

name=Extra Packages for Enterprise Linux 7 - $basearch #baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch failovermethod=priority enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

[epel-debuginfo]

name=Extra Packages for Enterprise Linux 7 - $basearch - Debug #baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch/debug mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch failovermethod=priority enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 gpgcheck=1

[epel-source]

name=Extra Packages for Enterprise Linux 7 - $basearch - Source #baseurl=http://download.fedoraproject.org/pub/epel/7/SRPMS mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch failovermethod=priority enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

Save the file and quit. Use command :wq to save and quit

vi /etc/yum.repos.d/MariaDB.repo

Copy the below content into this file

[mariadb]

name=MariaDB baseurl=http://yum.mariadb.org/5.5/centos7-amd64 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1

Save the file and quit. Use command :wq to save and quit

vi /etc/yum.repos.d/Nginx-stable.repo

Copy the below content into this file

[nginx]

name=nginx repo baseurl=http://nginx.org/packages/centos/7/$basearch/ gpgcheck=0 enabled=1

Save the file and quit. Use command :wq to save and quit

Download and keep the packages ready for installtion

yum update -y

Install Common Packages and PHP with Extensions

In this step we install following

-PHP and Extensions

-MariaDB

-Git

-Curl

-Openssl

Start Installation

yum install php-cli phpunit php-fpm php-mysql php-mcrypt php-gd php-json php-curl php-imap php-mbstring php-gd php-xmlrpc php-pdo nginx git sl mlocate dos2unix bash-completion openssl mariadb-server -y

systemctl stop nginx && systemctl stop php-fpm

Configure Nginx

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

vi /etc/nginx/nginx.conf

Copy the below content into this file

user www-data;

worker_processes 2; pid /var/run/nginx.pid; events { worker_connections 1024; } http {

`log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '`
                  `'$status $body_bytes_sent "$http_referer" '`
                  `'"$http_user_agent" "$http_x_forwarded_for"';`
`access_log  /var/log/nginx/access.log  main;`
`error_log /var/log/nginx/error.log;`
`include       /etc/nginx/mime.types;`
`default_type  application/octet-stream;`
`server_tokens off;`
`gzip on;`
`gzip_disable "msie[1-6]";`
`gzip_vary on;`
`gzip_proxied any;`
`gzip_comp_level 6;`
`gzip_buffers 16 8k;`
`gzip_min_length 256;`
`gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon;    `
`ignore_invalid_headers on;`
`max_ranges 1;`
`read_ahead 512K;`
`reset_timedout_connection on;`
`keepalive_timeout 600;`
`sendfile on;`
`include /etc/nginx/conf.d/*.conf;`

}

Save the file and quit. Use command :wq to save and quit

Edit domain

Put your domain name or IP address in this file and replace SERVERNAME

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

Copy the below content into this file

upstream faveo_php { server unix://opt/faveo/run/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 /opt/faveo/log/faveo_error_log; access_log /opt/faveo/log/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?;`
`}`

`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;`
`}`

}

Save the file and quit. Use command :wq to save and quit

Remove default config file rm -rf /etc/nginx/conf.d/default.conf

Create config file for PHP FPM

vi /etc/php-fpm.d/faveo_php.conf

Copy the below content into this file

[faveo_php]

user = www-data

group = www-data

listen = /opt/faveo/run/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 = /

Save the file and quit. Use command :wq to save and quit

Create a folder for Faveo and clone Faveo Help Desk Community latest release from Github to it

mkdir -p /opt/faveo/log && mkdir -p /opt/faveo/run

git clone https://github.com/ladybirdweb/faveo-helpdesk.git /opt/faveo/faveo-helpdesk

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

chmod -R 755 /opt/faveo

rm -rf /opt/faveo/faveo-helpdesk/example.env

Start Mysql and Create Database for faveo

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

Start all services

service php-fpm start

service nginx start

service mysql start

Install Composer by changing the directory to faveo folder

curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

Setup Cron

crontab -e

* * * * * php /path/to/run/artisan schedule:run >> /dev/null 2>&1

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