HomeInstallation and Upgrade ManualHelpSpot 5 InstallationInstalling HelpSpot 5 On Ubuntu

1.6. Installing HelpSpot 5 On Ubuntu

This video walks through the entire process of setting up a new install of HelpSpot on Ubuntu Linux.

On our Ubuntu 20.04 server, we'll install and setup the following: ​

Install Prerequisites

This command will install the several applications that HelpSpot needs to run. If you are using an external mysql database you can skip installing mysql-server.

sudo apt-get install -y mysql-server nginx supervisor unzip

Install PHP

sudo apt-get update ​ 
sudo add-apt-repository -y ppa:ondrej/php ​ 
sudo apt-get update ​ 
sudo apt-get install -y php8.3-cli php8.3-fpm php8.3-mysql
php8.3-sqlite3 php8.3-curl php8.3-gd php8.3-intl
php8.3-imap php8.3-ldap php8.3-mbstring php8.3-xml
php8.3-zip php8.3-bz2 php8.3-bcmath php8.3-readline
php8.3-igbinary php-memcached php-redis

Configure MySQL

If you are using an external mysql server you will want to create your database and user on that server.

sudo mysql_secure_installation
​ sudo mysql create database helpspot charset utf8mb4; create user helpspot@'localhost' identified by 'secret'; grant all privileges on helpspot.* to helpspot@'localhost';

Configure PHP

​Open the file in an editor /etc/php/8.3/fpm/php.ini and modify these parameters: ​

max_execution_time = 120 
max_input_time = 120 
memory_limit = 256M 
post_max_size = 256M 
upload_max_filesize = 100M 
date.timezone = UTC

Open the file /etc/php/8.3/fpm/pool.d/www.conf and modify these settings: ​

pm.max_children = 20
pm.start_servers = 4 
pm.min_spare_servers = 3 
pm.max_spare_servers = 6 
pm.max_requests = 500

Then restart PHP-FPM ​

sudo service php8.3-fpm restart

Configure Nginx

Edit/create the file /etc/nginx/sites-enabled/helpspot: ​

server {
    listen 80;
​
    # Enable if using SSL
    # listen 443 ssl;
​
    root /var/www/helpspot/public;
    index index.html index.htm index.php;
​
    access_log /var/log/nginx/helpspot.log helpspot;
    error_log  /var/log/nginx/helpspot-error.log error;
​
    # Change to your domain
    server_name _;
​
    charset utf-8;
​
    # Enable if using SSL certificates
    # ssl_certificate           /path/to/ssl.crt;
    # ssl_certificate_key       /path/to/ssl.key;
​
    location / {
        try_files $uri $uri/ /index.php$is_args$args;
    }
​
    location = /favicon.ico { log_not_found off; access_log off; }
    location = /robots.txt  { log_not_found off; access_log off; }
​
    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;
​
        fastcgi_buffers 36 64k;
        fastcgi_buffer_size 32k;
        fastcgi_read_timeout 120s;
    }
}

​Remove the /etc/nginx/sites-enabled/default file as well. ​

Install HelpSpot

We will need to download the latest release of the HelpSpot application to the the server. In this example we are using 5.4.6. Your version number will vary.

You can find the latest version of helpspot by going to https://helpspot.com/releases

wget https://s3.amazonaws.com/helpspot-downloads/5.4.6/helpspot.zip
unzip -q helpspot.zip
​
# Move helpspot
mv helpspot_5.4.6 helpspot
​

Next we need to update the create a .env file from the example file and update the settings to reflect the database connection, app url etc. More information on the .env file can be found here.

cd /var/www/helpspot
cp .env.example .env

Update your .env file with the needed settings in a text editor of your choice.

Next make sure that your helpspot directory is owned by the www-data user.

sudo chown -R www-data:www-data /var/www/helpspot

Make sure that you have downloaded the helpspot license file to an accessible location. You will need this file during the HelpSpot install. Next we'll run the helpspot installer that will guide us throught needed information for installation.

sudo -u www-data php hs install

​After installing it, check the browser to ensure everything is working. ​

Configure Cron

​Create file /etc/cron.d/helpspot and add the following: ​

* * * * * www-data php /var/www/helpspot/hs schedule:run

Configure Queue

​Create file /etc/supervisor/conf.d/helpspot.conf with contents: ​

[program:helpspot]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/helpspot/hs queue:listen database --queue=high,default --sleep=3 --tries=3
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
user=www-data
numprocs=2
redirect_stderr=true
stdout_logfile=/var/log/helpspot-worker.log

​ Then run the following to start the workers: ​

sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start helpspot:*

 

Knowledge Tags
Ubuntu  /  Linux  / 

This page was: Helpful | Not Helpful