How to install qdPM 9.1 on Ubuntu Server 18.04

Post Reply
User avatar
LHammonds
Site Admin
Site Admin
Posts: 772
Joined: Fri Jul 31, 2009 6:27 pm
Are you a filthy spam bot?: No
Location: Behind You
Contact:

How to install qdPM 9.1 on Ubuntu Server 18.04

Post: # 781Post LHammonds
Mon Oct 21, 2019 1:50 pm

Overview

qdPM is a web-based project management system.

This tutorial will cover setting up qdPM on a dedicated Apache web server and will make use of a separate dedicated database server.

Requirements
  • Web Server (e.g. Apache)
  • Database Server (e.g. MySQL/MariaDB)
  • PHP 7.2
Tools utilized in this process
Helpful links

Video: qdPM Overview
Video: qdPM - How to add a project
Video: qdPM - How to add a task

Assumptions

This documentation will need to make use of some very-specific information that will most-likely be different for each person / location. And as such, this information will be noted in this section. They will be highlighted in red throughout the document as a reminder that you should plug-in your own value rather than actually using these "place-holder" values.

Under no circumstance should you use the actual values listed below. They are place-holders for the real thing. This is just a checklist template you need to have answered before you start the install process.

The variables in RED below need to be substituted for your environment. Be sure to replace these variables used in this document with your own values and DO NOT use these example values.
  • Ubuntu Server name: srv-qdpm
  • Ubuntu Server IP address: 192.168.107.26
  • Domain name: pm.yourdomain.com
  • Database Server Name (remote): srv-mysql
  • Database Server IP (remote): 192.168.107.20
  • Database Admin ID: root
  • Database Admin Password: rootpass
  • Database ID: qdpmuser
  • Database Password: qdpmuserpass
  • Email Server Name (remote): srv-mail
  • Email Server IP (remote): 192.168.107.25
  • Ubuntu Admin ID: administrator
  • Ubuntu Admin Password: myadminpass
It is also assumed the reader knows how to use the VI editor. If not, you will need to beef up your skill set or use a different editor in place of it.

User avatar
LHammonds
Site Admin
Site Admin
Posts: 772
Joined: Fri Jul 31, 2009 6:27 pm
Are you a filthy spam bot?: No
Location: Behind You
Contact:

Server Preparation

Post: # 782Post LHammonds
Tue Oct 22, 2019 7:42 am

Create Ubuntu Web Server

Click here for detailed instructions on setting up a production-quality Ubuntu Server.

Once you have the base operating system installed, proceed to follow these instructions to install Apache web server.

Dedicated MariaDB Server

This document assumes the database will be located on a separate server for housing databases only.

Click here for detailed instructions on how to setup MariaDB on a dedicated server.

Server Name Resolution

You might need to edit your local host file so you can use friendly names for servers if you don't add them to your internal DNS servers or you do not have your domain on external DNS servers resolving the new IP during development.

Edit the local host file and add your servers to the end of the file as needed.

Example:

Code: Select all

sudo vi /etc/hosts

Code: Select all

192.168.107.20      srv-database
192.168.107.25      srv-mail
192.168.107.26      pm.yourdomain.com
If this is a public-facing site accessible from the Internet, you will need to edit your public DNS servers and make sure your DNS records are directing the domain name to your firewall's IP address. You will then need to add a rule to your firewall to redirect traffic on port 80 and/or 443 to your web server's internal IP address (192.168.107.26 in this example)

User avatar
LHammonds
Site Admin
Site Admin
Posts: 772
Joined: Fri Jul 31, 2009 6:27 pm
Are you a filthy spam bot?: No
Location: Behind You
Contact:

Configure Database

Post: # 783Post LHammonds
Thu Oct 24, 2019 12:24 pm

Configure MariaDB / MySQL

In this scenario, a dedicated and general-purpose database server already exists and it will be used to hold the application's database.
  1. Connect to the MariaDB/MySQL server using PuTTY.
  2. At the login prompt, login with your administrator account (administrator / myadminpass) and then temporarily grant yourself super user privileges by typing sudo su
  3. Type the following commands:
    mysql -u root -p Enter password: rootpass
    CREATE DATABASE qdpm CHARACTER SET utf8 COLLATE utf8_bin; CREATE USER 'qdpmuser'@'%' IDENTIFIED BY 'qdpmuserpass'; GRANT ALL ON qdpm.* TO 'qdpmuser'@'%'; FLUSH PRIVILEGES; exit
    The above commands will allow the database account to connect from any machine from anywhere in the world. This might be OK if your database is not accessible outsite your local network or if your machine name changes or you have multiple servers that connect to the same database that use the same ID. You can make this more secure by specifying your application server when granting access. Make sure the database server will recognize the server name (via hosts file or DNS) or just use the IP address:
    CREATE USER 'qdpmuser'@'srv-qdpm' IDENTIFIED BY 'qdpmuserpass'; GRANT ALL ON qdpm.* TO 'qdpmuser'@'srv-qdpm';
    or
    CREATE USER 'qdpmuser'@'192.168.107.26' IDENTIFIED BY 'qdpmuserpass'; GRANT ALL ON qdpm.* TO 'qdpmuser'@'192.168.107.26';
    This will prevent anyone knowing the credentials from logging into the database from any other remote machine not specified in the grant command.

    If your application is running on the database server (typical on a developer machine / non-production scenario), create the user like this:
    CREATE USER 'qdpmuser'@'localhost' IDENTIFIED BY 'qdpmuserpass'; GRANT ALL ON qdpm.* TO 'qdpmuser'@'localhost';
    This will prevent anyone knowing the credentials from logging into the database from any other remote machine.

    If you mess anything up, you can remove the database and user by issuing these commands:
    DROP USER qdpmuser; FLUSH PRIVILEGES; DROP DATABASE qdpm;

User avatar
LHammonds
Site Admin
Site Admin
Posts: 772
Joined: Fri Jul 31, 2009 6:27 pm
Are you a filthy spam bot?: No
Location: Behind You
Contact:

Install qdPM

Post: # 784Post LHammonds
Thu Oct 24, 2019 12:44 pm

Add Apache Site Configuration

Create the web sites root folder and set permissions (substitute your sites values):

Code: Select all

sudo mkdir /var/www/pm.yourdomain.com
sudo chown www-data:www-data /var/www/pm.yourdomain.com
sudo chmod 0755 /var/www/pm.yourdomain.com
Create the site configuration file (substitute your sites values):

Code: Select all

sudo touch /etc/apache2/sites-available/pm.yourdomain.com.conf
sudo chown root:root /etc/apache2/sites-available/pm.yourdomain.com.conf
sudo chmod 644 /etc/apache2/sites-available/pm.yourdomain.com.conf
Edit the configuration file:

Code: Select all

sudo vi /etc/apache2/sites-available/pm.yourdomain.com.conf
Add the following to the configuration file (substitute your sites values):

Code: Select all

<VirtualHost *:80>
  ServerName pm.yourdomain.com
  ServerAlias pm
  DocumentRoot "/var/www/pm.yourdomain.com"
  ServerAdmin webmaster@localhost
  ErrorLog ${APACHE_LOG_DIR}/pm.yourdomain.com-error.log
  CustomLog ${APACHE_LOG_DIR}/pm.yourdomain.com-access.log combined
  AddType image/x-icon .ico
    <Directory /var/www/pm.yourdomain.com>
      AllowOverride All
    </Directory>
</VirtualHost>
Verify the syntax of the configuration file(s):

Code: Select all

apachectl configtest
Enable the site configuration if the above response is "Syntax OK"

Code: Select all

sudo a2ensite pm.yourdomain.com
sudo systemctl reload apache2
Install qdPM
  1. Connect to the web server using PuTTY.
  2. At the login prompt, login with your administrator account (administrator / myadminpass)
  3. Copy the download url of the latest version. At the time of this article, it is version 9.1
  4. Use PuTTY and login to your web server and type the following (be sure to substitute the URL with the one you just copied)

    Code: Select all

    cd /tmp
    wget https://sourceforge.net/projects/qdpm/files/qdPM_9.1.zip/download -O /tmp/qdpm.zip
  5. To extract a .zip archive, we will need to install an unzip utility:

    Code: Select all

    sudo apt install unzip
  6. Now we need to extract the archive to the root of the web site and fix the permissions:

    Code: Select all

    sudo unzip /tmp/qdpm.zip -d /var/www/pm.yourdomain.com
    sudo chown --recursive www-data:www-data /var/www/pm.yourdomain.com
    sudo find /var/www/pm.yourdomain.com/. -type d -exec chmod 755 '{}' \+
    sudo find /var/www/pm.yourdomain.com/. -type f -exec chmod 644 '{}' \+
    rm /tmp/qdpm.zip
  7. Open a browser on your PC and go to the web server IP address: http://pm.yourdomain.com/ (which should resolve to your IP of 192.168.107.26 if you setup DNS right)
  8. Follow the install instructions.
  9. When finished, remove the "install" folder by typing the following command on the web server:

    Code: Select all

    sudo rm -rf /var/www/pm.yourdomain.com/install
qdPM Extended
If you purchased the Extended version, extract the extended edition on top of the existing site and take the "product_key.txt" file you received and place it in the below location to activate the full product:

Code: Select all

/var/www/qdpm/core/apps/qdPMExtended/config/product_key.txt

User avatar
LHammonds
Site Admin
Site Admin
Posts: 772
Joined: Fri Jul 31, 2009 6:27 pm
Are you a filthy spam bot?: No
Location: Behind You
Contact:

Multiple Domains / Sites

Post: # 785Post LHammonds
Thu Oct 24, 2019 2:21 pm

Multiple Domains / Sites

Let's say you want to have multiple sites (multiple databases) on the same web server and they all use different domain names in their URLs, but each domain points to the same IP address.

Example: (use your site's actual values rather than these example values)
  • admin.yourdomain.com
  • infosys.yourdomain.com
Create site-specific folders and Apache configuration files that will direct visitors to the correct site based on the domain name in the URL coming to the server.

Here is how you can modify the install procedure for this scenario.

Create qdPM Databases

On your database server, type these commands:
mysql -u root -p CREATE DATABASE qdpmadmin CHARACTER SET utf8 COLLATE utf8_bin; CREATE DATABASE qdpminfosys CHARACTER SET utf8 COLLATE utf8_bin; GRANT ALL PRIVILEGES ON qdpmadmin.* TO 'qdpmadminuser'@'%' IDENTIFIED BY 'qdpmadminuserpass'; GRANT ALL PRIVILEGES ON qdpminfosys.* TO 'qdpminfosysuser'@'%' IDENTIFIED BY 'qdpminfosysuserpass'; FLUSH PRIVILEGES; QUIT
Install qdPM
  1. Create the web root folders and download the qdpm archive:

    Code: Select all

    sudo mkdir /var/www/admin.yourdomain.com
    sudo chown www-data:www-data /var/www/admin.yourdomain.com
    sudo chmod 0755 /var/www/admin.yourdomain.com
    sudo mkdir /var/www/infosys.yourdomain.com
    sudo chown www-data:www-data /var/www/infosys.yourdomain.com
    sudo chmod 0755 /var/www/infosys.yourdomain.com
    cd /tmp
    wget https://sourceforge.net/projects/qdpm/files/qdPM_9.1.zip/download -O /tmp/qdpm.zip
  2. Now extract the archive to the root of the web sites and fix the permissions:

    Code: Select all

    sudo unzip /tmp/qdpm.zip -d /var/www/admin.yourdomain.com
    sudo chown --recursive www-data:www-data /var/www/admin.yourdomain.com
    sudo find /var/www/admin.yourdomain.com/. -type d -exec chmod 755 '{}' \+
    sudo find /var/www/admin.yourdomain.com/. -type f -exec chmod 644 '{}' \+
    sudo unzip /tmp/qdpm.zip -d /var/www/infosys.yourdomain.com
    sudo chown --recursive www-data:www-data /var/www/infosys.yourdomain.com
    sudo find /var/www/infosys.yourdomain.com/. -type d -exec chmod 755 '{}' \+
    sudo find /var/www/infosys.yourdomain.com/. -type f -exec chmod 644 '{}' \+
    rm /tmp/qdpm.zip
  3. Edit the first site config file:

    Code: Select all

    sudo vi /etc/apache2/sites-available/admin.yourdomain.com.conf
  4. Add the following to the file:

    Code: Select all

    <VirtualHost *:80>
      ServerName admin.yourdomain.com
      ServerAlias admin
      DocumentRoot "/var/www/admin.yourdomain.com"
      ServerAdmin webmaster@localhost
      ErrorLog ${APACHE_LOG_DIR}/admin.yourdomain.com-error.log
      CustomLog ${APACHE_LOG_DIR}/admin.yourdomain.com-access.log combined
      AddType image/x-icon .ico
        <Directory /var/www/admin.yourdomain.com>
          AllowOverride All
        </Directory>
    </VirtualHost>
  5. Edit the second site config file:

    Code: Select all

    sudo vi /etc/apache2/sites-available/infosys.yourdomain.com.conf
  6. Add the following to the file:

    Code: Select all

    <VirtualHost *:80>
      ServerName infosys.mycompany.com
      ServerAlias infosys
      DocumentRoot "/var/www/infosys.yourdomain.com"
      ServerAdmin webmaster@localhost
      ErrorLog ${APACHE_LOG_DIR}/infosys.yourdomain.com-error.log
      CustomLog ${APACHE_LOG_DIR}/infosys.yourdomain.com-access.log combined
      AddType image/x-icon .ico
        <Directory /var/www/infosys.yourdomain.com>
          AllowOverride All
        </Directory>
    </VirtualHost>
  7. Enable the sites:

    Code: Select all

    sudo a2ensite admin.yourdomain.com
    sudo a2ensite infosys.yourdomain.com
    
  8. Restart Apache:

    Code: Select all

    sudo systemctl reload apache2
  9. Visit each site via their URL and configure them individually to point to their own database:

    Code: Select all

    http://admin.yourdomain.com
    http://infosys.yourdomain.com
    
  10. When finished, remove the "install" folders by typing the following commands on the web server:

    Code: Select all

    sudo rm -rf /var/www/admin.yourdomain.com/install
    sudo rm -rf /var/www/infosys.yourdomain.com/install
    

User avatar
LHammonds
Site Admin
Site Admin
Posts: 772
Joined: Fri Jul 31, 2009 6:27 pm
Are you a filthy spam bot?: No
Location: Behind You
Contact:

Email Notifications

Post: # 786Post LHammonds
Thu Oct 24, 2019 2:49 pm

Email Notifications

Once the site is installed, you can enable email notifications by enabling notifications under Configuration->General->Email Options and configure PHP to communicate to the mail server by following this article: Setup Server for Sending Email using sSMTP.

If you want the application to contain the mail settings, you can edit that information directly in the "SMTP Configuration" section.

Post Reply