Step-by-step guide for newbies, on osTicket installation (the free help desk software) using Ubuntu Server. You could follow this guide using Linux-based machine or server on your local area network, or on a Cloud VPS hosted by companies like; DigitalOcean, Linode or Vultr. You could also use a virtual machine if you want to.
In this guide, I’ll discuss the steps using a cloud-based Ubuntu Server, particularly Ubuntu 16.04 Server Edition. My client machine shall be Linuxmint – an Ubuntu-based Linux Distro. If you’re on Windows, you need to install SSH client like Putty, to let you connect to the remote server via SSH protocol.
If you want to use a Cloud VPS instead of a local machine, then I would recommend DigitalOcean as your provider. Because setting up a LAMP Stack on this host would be quick and easy using their “One-click Apps” feature. It should let you bring up an instance of Apache, MySQL and PHP without manually typing commands. DO is one of the best cloud vps provider out there on the Internet. I’ve been using their service for couple of years now and not a single ticket or support request was sent to them.
If you opt to use your own machine as server, then skip to Step 2. Otherwise, start off with Step 1, which require you to have an account with Digital Ocean. Use my special link
to sign up for an account and you should get additional credits worth $10. You can use this to test osTicket on the cloud for more than a month. When you decide to continue using it, then just top up your account.
Note: When you create your Ubuntu 16.04 Droplet or VPS using DO’s “One-click app” feature, you should get a free SSL certificate along with your VPS – but you’ll have to set it up.
The free SSL Certificate is brought to you by Letsencrypt.
For this to work, you need install few things, but DO got you covered and pre-installed everything so “Let’s Encrypt” would work for you. Isn’t that awesome!
Domain Name (Optional) – if you decide to use it in production along with your Web site.
Note: You won’t be able to use Letsencrypt with your osTicket instance if you don’t properly configure your DNS. Though, you can still install and access your instance using the IP address of your VPS.
For a production environment, you need to have a DNS record for the VPS that should hold the osTicket instance. Read below to know how I set up my DNs Record for support.chubbable.com.
How Do I Setup My DNS Record
First, you need an overview of my setup. Then one I’ve used for this specific guide.
My Setup Overview:
My Domain Name is hosted by another Registrar
My Cloud VPS Host is DigitalOcean – so my main domain “chubbable.com” and “support.chubbable.com” has their own VPS.
My osTicket Instance is on another Droplet or VPS
A separate “A Record” was configured
My sub-domain name for osTicket is support.chubbable.com
For those who knew how to set their own DNS record, you may skip this part. For the newbies, read further carefully. Also refer to your specific Domain Registrar and read their help documents related to DNS Records.
If you have an existing domain which is currently hosted by another company – this guide would work for you by creating an “A Record” from your Registrar’s Admin Dashboard. Then idea is – point your sub-domain to the IP address of your osTicket VPS. Steps varies for various Registrars, make sure to read your Registrar-specific guide.
With my specific case, I only had to add “A Record” for support and pointed to my osticket IP Address. I’ve done this using DO’s networking setup page. My registrar was set to use DO’s Name Servers.
The setup page should look like these:
With this kind setup, I was able to point support.chubbable.com to my osTicket VPS.
osTicket’s Latest Version
The latest version of osTicket, at the time of writing this post is, v1.10 (Released November, 1st, 2016) – which you can download from this page.
The Step-by-step Guide
Please read the following instruction, word for word to successfully setup osTicket using Ubuntu 16.04. Steps would also work for Debian-based VPS.
You may need to familiarize yourself first with the commands used in this guide.
[adsense-responsive]
**Commands Used:**
– `cp` – copy files from and to any location
– `mv` – move any files from and to any location
– `chown` – set owner for files/directories
– `chmod` – set permission for files/directories
– `find` – search files or directory, then execute a command using `-exec`
Example: `find /var/www/html -type d -exec chmod 755 {} \;`
Where `find “location”` – substitute location for the location you want to apply the command. It’s safer to just use the full path, so you can use it wherever you’re at in your command prompt.
### Step 1: Create the Droplet
Droplet is what they call for a VPS instance in Digital Ocean. To create one, simple click the `Create` button.
Then on the next page, under the **Create Droplets** heading, click on **One-click Apps**, then choose **LAMP on 16.04**. This should install a 64-bit version of Ubuntu 16.04 Server along with Apache, MySQL and PHP.
LAMP Stack on Ubuntu 16.04
Scroll down a little further and **Choose a Size** – pick the 1GB package. Then choose your preferred data center region, pick the one closest to your target audience. You could pick from; New York, San Francisco, Amsterdam, Singapore, London, Frankfurt, Toronto or Bangalore.
Further down you may choose to use your SSH keypair by copy/pasting your SSH public key on the placeholder. If you don’t provide one, then your SSH user name and password shall be sent to you via Email. You have to change your root password immediately after logging in for the first time.
> Note: For a production environment, you MUST use your own SSH keys when connecting to your remote server.
Next, type your preferred Host Name, in my case it’s `osticket`. But in production, I would use `support.chubbable.com`
DigitalOcean – Entering Your Hostname
Finally, hit the **Create** button and wait for a few seconds. Yes, it only takes a few seconds to build your VPS.
### Step 2: Login to your Droplet/VPS
Login to your VPS to check things out and make sure LAMP is working.
When you SSH for the first time, you’d be asked to change your password (*if you didn’t use your Public SSH Key*). So copy the password that was sent to you then paste it on the terminal. You could use middle-mouse button to paste the password. Once done, enter your new password twice. Take note, that when you type your password, it won’t printed on your screen. It’s some Unix security measure.
Changing Your Root Password
> Note: I’d like to stress that you should use a key-based SSH login regardless, whether test or production environment. It’s more convenient, secure and easy to use than a password-based login.
Once logged in, purge PHP 7.0 since it is not yet supported by osTicket. Using this specific version will throw **Error 500** error when installing osTicket. We have to do this when using Ubuntu 16.04, since PHP 7.0 comes shipped with it.
But before doing the procedure, take your time to configure your LAMP installation. When the first you login in you should see similar message like this:
——————————————————————————-
Thank you for using DigitalOcean’s LAMP Application.
LAMP has now been enabled. You can access your LAMP instance at:
Your web root is located at /var/www/html and can be seen from
http://your.vps.ip.address
The details of your PHP installation can be seen at
http://your.vps.ip.address/info.php
The “ufw” firewall is enabled. All ports except for 22, 80, and 443 are BLOCKED
You are encouraged to run ‘mysql_secure_installation’ to ready your server for production. The passwords for MySQL have been saved to:
/root/.digitalocean_password
Let’s Encrypt has been pre-installed for you. If you have a domain name, and you will be using it with this 1-Click app, please see:
http://do.co/le-apache
——————————————————————————-
You can learn more about using this image here: http://do.co/lamp
——————————————————————————-
To delete this message of the day: rm -rf /etc/update-motd.d/99-one-click
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
Notice the message above where it says “run `mysql_secure_installation`” – just do as it says. But before doing so, take note of your root MySQL password which should be located at `/root/.digitalocean_password`.
To view your MySQL Password, type this on your terminal:
cat /root/.digitalocean_password
Sample Output:
root_mysql_pass=”your-password-here”
Moving forward, run `mysql_secure_installation` and paste in your password, the one you just copied using the `cat` command.
Hit Enter key and a question should be asked like so:
VALIDATE PASSWORD PLUGIN can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD plugin?
You could answer **NO** here by pressing `n` key then hit enter.
A series of question will be asked:
– `Remove anonymous users?` – answer `y` for yes
– `Disallow root login remotely?` – yes
– `Remove test database and access to it?` – yes
– `Reload privilege tables now?` – yes
– …then it should say all done!
Now, we are ready to work on the osTicket Installation using our LAMP Stack on Ubuntu 16.04
### Step 3: Purge/remove PHP version 7.0
Like I mentioned before, PHP 5.6 is not yet compatible with latest version osTicket (v1.10 – Latest Stable Release, Released November, 1st, 2016), so we need to purge or remove PHP 7.0 since it came with the LAMP Stack installation.
Type the following command (or copy/paste it) to remove PHP 7.0 from your Droplet/VPS
apt-get purge php7.0-common
Sample Output:
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages were automatically installed and are no longer required:
fontconfig-config fonts-dejavu-core libfontconfig1 libgd3 libjbig0 libjpeg-turbo8 libjpeg8 libtiff5 libvpx3 libxpm4
Use ‘apt autoremove’ to remove them.
The following packages will be REMOVED:
libapache2-mod-php* libapache2-mod-php7.0* php* php-apcu* php-common* php-gd* php-mysql* php7.0* php7.0-cli* php7.0-common* php7.0-gd*
php7.0-json* php7.0-mysql* php7.0-opcache* php7.0-readline*
0 upgraded, 0 newly installed, 15 to remove and 14 not upgraded.
After this operation, 14.7 MB disk space will be freed.
Do you want to continue? [Y/n]
Of course you want to continue, so press `y` then hit ENTER.
Once done, type `php -v` – you should get the following response:
The program ‘php’ can be found in the following packages:
* php7.0-cli
* hhvm
Try: apt install
That’s great, we can now install PHP 5.6 – the version that osTicket currently supports.
### Step 4: Add PPA Repo and Install PHP 5.6
To install php5.6, we must first add the proper repository. Type this on your terminal, one at a time:
1. `add-apt-repository ppa:ondrej/php`
[See sample output below](#add-apt-repo)
Leave a Reply
You must be logged in to post a comment.