Installing Perception on a multi-tiered Linux/Unix and Windows environment

Applies to the following products: 
Questionmark Perception
Applies to the following Perception versions: 
Perception 5.2
Perception 5.1

It is possible to install the Questionmark Presentation Layer for Assessments on a Unix or Linux system running Apache. It may be desirable to install the presentation layer on a Unix/Linux operating system if you use a firewall and require Perception to be available outside of the firewall.

The following diagram represents the processes followed if your Unix/Linux environment is outside the firewall.

To install Perception in a multi-tiered environment with QPLA on a Unix/Linux server you will need to ensure that your system meets the minimum requirements as specified in the System Requirements section. You should also be familiar with Unix/Linux operating environment and comfortable carrying out configurations tasks.

It is recommended that you install Perception Server in a multi-tiered environment in the following order:

  1. QABS
  2. QPLA

The QPLA installation files for Linux/Unix environments are available as a separate download and can be obtained from the Download section of the Questionmark Website.

The installation steps for this setup will require administrators to work with both systems and will be beneficial if the administrator can access the systems simultaneously to speed up the installation and configuration process. The process involves carrying out the following steps on each server:

For instructions about the process of installing a multi-tiered installation on Linux/Windows, as depicted above, please refer to the following steps:

On the Windows Server:

On the Linux Server:

Installing QABS

This section describes how to install Perception and QABS on the Windows server when you are using Linux to host QPLA. You will need to go through the following steps:

Step 1: Creating a new user

The following section describes how to create a new user in Windows. You need to create a new user for your installation of Perception that can be used by Linux to communicate with the Windows machine and provide access to certain files and folders. Once the user has been created you will be using it later in Step 3: Setting up the folder share and installing QPLA on Linux.

To create a user in Windows:

  1. Click Start | Administrative Tools | Computer Management
  2. From the System Tools list click Local Users and Gbroups | Users
  3. Click New User... from the Action menu
  4. Enter a user name and password (these will be needed later)
  5. Uncheck the User must change password at next logon check-box
  6. Check the Password never expires check-box
  7. Click Create

  8. Click Close to finish creating the user

Step 2: Running the installer

The install application will guide you through each step in the installation process, prompting you to specify your preferences at each stage. Copy the installation application to the server and follow the steps below.

The install application will guide you through each step in the installation process, prompting you to specify your preferences at each stage. You must be logged in to Windows as a local system Administrator. If you do not have these privileges Perception Server will not install correctly. Alternatively, if you know the administrator user name and password but are not logged in as that user you can right click on the install application and select Run As Administrator. You will be prompted to enter the username and password of a valid administrative user before being able to continue.

To install QABS:

  1. Launch the installer application as an administrative user, see above for details.
  2. Select Custom from the Setup Type window
  3. Select the Install everything except the Questionmark Presentation Layer for Assessments option

  4. Determine the location of where you want to install Perception Server (system files) and the Repository files by entering the information into the appropriate text-boxes
  5. In the Perception Server Root window choose the required setting

    The settings include:

    • User Defined if you intend for Perception to be accessed through a defined URL. Enter the URL in the appropriate text-box. For example, www.mycompany.com
    • This Computer if the users will be using the computer name as the URL to access Perception

    If you are intending to access the Perception Server using an IP address you must select the User Defined setting and enter the IP address in the text-box. Failure to do so will cause certain functions in Perception to work incorrectly. For example:

    • File upload questions will not work correctly, by not allowing participants to upload answers
    • Links to reports that a participant has access to will not work
  6. In the QPLA Server Location window you will need to enter the URL used to access the QPLA server. This will be the server name of the Linux machine you are using

    The QPLA Server Location can be:

    • A define URL that is used by the QPLA server. For example, www.qpla.mycompany.com
    • The computer name or IP address of the QPLA server
  7. In the Installation Options window you will need to define which installation options you want to enable.

    The installation options include:

    • Whether you want the installer to automatically create the virtual directories or not. For further information about the virtual directories created and required by Perception, please refer to the Creating your own virtual directories section
    • Whether you want the authors connecting to the Shared Repository through Authoring Manager to automatically be given the chance to upgrade to the latest version of Authoring Manager or not.
  8. Follow the on screen instructions to complete the installation on this server
  9. Launch the Shared Repository Manager and follow the instruction in the Creating a repository section to create a shared repository. Once you have setup your repository return here to complete the following steps starting at Step 3: Setting up the folder share.

Step 3: Setting up the folder share

Once you have created your repository you will need to create a file share for the File Upload questions. The File Upload questions allow a participant to upload a file as part of an answer to a question. You will need to create a file share on your Windows machines that the QPLA application installed on Linux can write files to. If you installed Perception to the default location the File Upload folder will be in the following location, otherwise please check where you installed the Repository Support files:

C:\Perception5\Repositories\shared\<MyRepository>

Where <MyRepository> is the name of your repository

In this folder a fileuploads folder will exist.

To create a file share for this folder follow the instructions below for your operating system:

Windows XP/Windows Server 2003 Windows Vista / 7 or Windows Server 2008
  1. Right click on the fileuploads folder and select Sharing and Security
  2. Select the Sharing tab
  3. Select the Share this folder option button
  4. Enter fileuploads in the Share name
  5. Select Maximum allowed from the User limit option buttons
  6. Click Permissions
  7. Click Add followed by Advanced
  8. Click Locations and select the name of the computer
  9. Click ObK
  10. Click Find Now and scroll down and select the user you created in Step 1: Creating a user
  11. Click OK followed by OK again
  12. Under the Allow column of the Permissions for section place a tick in the Full Control check-box
  13. Click OK
  14. Select the Security tab
  15. Select the user you just added and click the Full Control check-box in the Allow column
  16. Click OK to make the changes
  1. Right click on the fileuploads folder and select Share
  2. Enter the name of the user you created in Step 1: Creating a userand click Add
  3. For user you just added select the Permission Level drop-down list and select Co-owner
  4. Click Share followed by Done

Installing QPLA on Linux

To install the QPLA portion of Perception Version 5 in a Linux environment you will need to:

Before carrying out any of the instructions below you should ensure that Linux is setup in accordance to the information in the Configuring your server chapter in this guide.

Step 4: Unzipping QPLA

You can download the QPLA zip from the My Downloads section of the Questionmark website. Once downloaded you will need to unzip it to your web server folder. The defaults for this are:

  • Ubuntu Server - /var/www/
  • RedHat Enterprise Linux - /var/www/html/
  • SUSe Linux Enterprise - /srv/www/htdocs/

To unzip QPLA you will need to use a root user and the following command:

  • unzip qpla-5.x.x.x.zip /directory

Where x is the version that matches your Perception installation and /directory is the correct web server folder for your installation of Linux.

You may need to install a file extraction application, like unzip, for your Linux server before being able to unzip the files as indicated above. You can install the unzip application using something similar to:

  • apt-get install unzip
  • yum unzip

This will depend on the Linux distribution you are using.

Step 5: Mounting the folder share 

The following section describes how to configure and mount the folder share for the File Upload question type in Linux. The folder share being referred to, is the folder share you created in Step 3: Setting up the folder share section above. The following instructions assume you have installed the necessary extension as described in the sectionConfiguring your server and you have logged in with Root privileges or similar.

Once mounted the file share will act like a new disk drive. Follow the instructions below to mount your file share:

  1. Using the Terminal navigate to and edit the /etc/hosts file using your preferred editor
  2. In the hosts file enter the IP address of your Windows server followed by the host name. For example:
    192.168.10.156 PerceptionServer

    Where PerceptionServer is the name of the computer on which you installed Perception Server and QABS.

  3. Now you will need to create a mount point for your file share. You can do this by entering the following:
    mkdir -p /mnt/fileuploads

    Where fileuploads is the file share you created in Step 3: Setting up the folder share. This mount needs to be in the root section of the drive and should be the same as you identify in the QPLA.ini file below.

  4. Enter the following to associate the mount point you created with the file share:
      • Ubuntu Server
    mount -t smbfs -o username=<username>,password=<password> //<PerceptionServer>/fileuploads /mnt/fileuploads
      • RedHat Enterprise Linux and SUSe Linux Enterprise
    mount -t cifs -o username=<username>,password=<password> //<PerceptionServer>/fileuploads /mnt/fileuploads

    Where:

    <username> and <password> are the details you created in Step 1: Creating a new user

    <PerceptionServer> is the name of your Perception Server as recorded in the hosts file

The fileuploads folder on your Windows machine has now been shared and mounted with Linux.

This method of mounting a drive is not permanent in Linux. You will need to carry out the above step each time you restart the Linux server or you will have to setup Linux so that it automatically mounts the folder each time it is restarted. How this is accomplish depends on the version of Linux you are using. For further information please refer to the documentation that accompanies your installation of Linux and refer to the following types of information:

  • Mounts
  • /etc/fstab

Step 6: Updating the QPLA.ini file

Once QPLA has been unzipped, navigating to your web server folder should provide you with the following files and folders:

Folders:

  • /Perception5
  • /Perception5/cache
  • /Perception5/logs
  • /Perception5/runtime
  • /Perception5/source
  • /Perception5/system

Files:

  • /Perception5/QPLA.ini
  • /Perception5/QPLA_Default.ini

The QPLA.ini file will need to be updated to ensure that the correct locations and paths are available. This will ensure that QPLA knows where the rest of the Perception Server is (as installed above). You can update the QPLA.ini file using any text editor program including, vi or gedit.

To edit qpla.ini you will need to use the root user (or other administrator with similar permissions) and enter something similar to:

sudo vi /var/www/Perception5/QPLA.ini

Where:

      • You can use vi or another editor of preference
      • /var/www/ is the web server folder for your installation of Linux

To update the QPLA.ini file locate the following settings:

  • messageServiceURL=http://127.0.0.1/qabs/AssessmentDeliveryService.asmx

    This will need to be changed to point to the Perception Server you setup above. Enter the IP address or a valid domain name for the Perception Server.

  • Where <myrepository> is your repository name and the file is located on a Network Attached Storage (i.e. Load Balancing) or a shared network drive on your Perception Server at C:\Perception5\Repositories\Shared\<myrepository>\fileuploads

  • cachePath=C:\Perception5\server\cache\

    This will need to be changed to the correct path on your Linux server. For example, /var/www/Perception5/cache

  • logDirectory=C:\Perception5\server\logs

    This will need to be changed to the correct path on your Linux server. For example, /var/www/Perception5/logs

Step 7: Setting the correct permissions

With the QPLA files unzipped and the QPLA.ini file updated you now have to make sure that the QPLA files and folders have the correct permissions.

Linux is case sensitive and care should be taken when referencing folders in Linux

To do this type you will need to use the relative features for your version of Linux. The following are the commands needed for Ubuntu Server and they need to be run with a user who has sufficient privileges:

chgrp -R www-data /var/www/Perception5

chown -R www-data /var/www/Perception5

chmod g=rwx /var/www/Perception5/logs

chmod g=rwx /var/www/Perception5/cache

chmod -R g=rx /var/www/Perception5/runtime/javascript

The commands for the other distributions of Linux are similar. However, you will need to reference the QPLA files in their alternative web server folders. For example:

  • In RedHat use /var/www/html/...
  • In SUSE use /srv/www/htdocs/...

Step 8: Connecting to QPLA for the first time

With all the setting applied you will be able to navigate to the following locations on your Linux server and see the participant login screens.

  • http://LinuxServer/Perception5/runtime/perception.php
  • http://LinuxServer/Perception5/runtime/open.php

Doing this will allow the QABS server to successfully load the remaining settings in to the QPLA.ini file.

Step 9: Updating the File Upload settings

Once the above steps have been done you will need to update the File Upload folder setting for the File Upload question type. You can update this setting by logging in to Enterprise Manager and changing these on the Server Settings page.

To access Enterprise Manager for a default installation, navigate to the following address:

http://<QABS_SERVER>/EM5/Login.asp

Where <QABS_SERVER> is the domain or computer name where you installed the Windows installer in Step 2: Running the installer

Once the page has loaded use the default administrative user and password to log in and complete the following steps:

  1. Navigate to the Server Settings page by clicking System Administration | Server Management | Server Settings
  2. Locate the File Upload folder setting in the Questionmark Presentation Layer for Assessments section of the page
    There are two File Upload folder settings on the Server Settings page. The first File Upload folder setting in the Folder section of the page is for use by the Scoring Tool. It does not need to be changed for File Upload questions to work. Only the second File Upload folder setting in the Questionmark Presentation Layer for Assessments section should be changed to point to the mount on your Linux machine.
  3. Change this to something similar to /mnt/fileuploads. As created in Step 5: Mounting the folder share section.
  4. Click the Save and Exit button

Step 10: Setting up your Firewall rules (optional, only if you have a firewall between the servers)

If you have a firewall between your QPLA and QABS server you will need to ensure that certain web shares will need to be accessed through the firewall. These are:

  • /<repository>_sys
  • /<repository>_res
  • /<repository>_togo

The contents of these web shares need to be accessed by the QPLA server or the participants browser. You will have to do this by creating a routing rule for an external address that points to these shares.

You then need to ensure that the Repository server setting in Enterprise Manager points to the external firewall address you created. You can tighten security further by filtering out requests using the firewall that do not have the correct host header.

Once this has been done your installation of Perception Version 5 is ready to use. Refer to the section Configuring and verifying to ensure everything you require is configured and working.