How to install Traq on an Ubuntu 16.04 VPS

Leave reply

snappa_1467698456Traq is powerful project management and issue tracking system based on PHP. It is capable of handling multiple projects with per-project permissions, custom fields, milestones, email notifications and much more. In this tutorial we will show you how to install Traq on an Ubuntu 16.04 VPS with Apache and PHP.

Traq comes with a lot of useful features such as:

  • Multiple projects
  • Project milestones
  • Atom feed
  • Read and write API
  • Powerful plugin system
  • Filters
    and many more…

In order to run Traq, your Ubuntu 16.04 VPS has to meet the following requirements:

  • Web server
  • PHP version 5.5 or later
  • Mcrypt
  • PostgreSQL or MariaDB/MySQL database server

In this tutorial we will install all of the requirements.

Let’s start with the installation. First of all make sure your server OS packages are fully up-to-date:

apt-get update && apt-get upgrade
apt-get install git

Run the following command on your Ubuntu VPS to install Apache web server

apt-get install apache2

Once Apache is installed, start it and enable it to start on boot

systemctl start apache2
systemctl enable apache2

Install PHP and few PHP modules required by Traq

apt-get install php php-common php-mcrypt

Next, install MySQL database server

apt-get install mysql-server mysql-client

Enable the MySQL server to start on boot:

systemctl enable mysql

Once the installation is completed, it is recommended to execute the ‘mysql_secure_installation’ script, to secure your MySQL server and set a root password

Traq requires an empty database to store its data. Create a new MySQL database by logging in to the MySQL server and executing the following commands:

mysql -u root -p
mysql> create database traqdb;
mysql> GRANT ALL PRIVILEGES ON traqdb.* TO 'traquser'@'localhost' IDENTIFIED BY 'Your_Password';
mysql> flush privileges;
mysql> quit

Don’t forget to replace ‘Your_Password’ with an actual, strong password.

Change the current working directory to the document root directory and clone Traq from their official GitHub repository

cd /var/www/html/
git clone --recursive https://github.com/nirix/traq

And checkout the latest version

cd traq/
git checkout v3.6.0

To run Traq properly, create a new  .htaccess file

vim  .htaccess

With the following content

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [L]

Set the correct ownership

chown -R www-data: /var/www/html/traq/

Create a new virtual host directive in Apache.

vim /etc/apache2/sites-available/traq.conf

with the following content

<VirtualHost *:80>
ServerAdmin admin@your-domain.com
DocumentRoot /var/www/html/traq/
ServerName your-domain.com
ServerAlias www.your-domain.com
<Directory /var/www/html/your-domain.com/>
Options FollowSymLinks
AllowOverride All
</Directory>
ErrorLog /var/log/apache2/your-domain.com-error_log
CustomLog /var/log/apache2/your-domain.com-access_log common
</VirtualHost>

Run the following command to enable the configuration file

a2ensite traq.conf

And restart the Apache web server for the changes to take effect:

service apache2 restart

If you closely followed this tutorial, you will be able to access Traq by pointing your favorite web browser at http://your-domain.com . Traq’s web installation wizard will show up. Follow the wizard to complete the installation.

For more information and documentation about Traq, please visit their official website.


Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to install the Traq for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.


50% OFF Coupon

EXCLUSIVE EMAIL UPDATES AND “MEMBERS-ONLY” CONTENT


One Response to “How to install Traq on an Ubuntu 16.04 VPS”

  1. 100+ self-hosted alternatives to popular services | RoseHosting.com Linux VPS Hosting Blog

    […] Traq – has a powerful plugin system that you can use to customize your Traq installation. You can manage multiple projects, use the Atom feed and much more. […]

    Reply

Leave a Reply