Installing DRUSH as a GLOBAL - Ubuntu 18.04

Tip: Install Drush 8 for Drupal 7 
Drush is a great tool and is well worth setting up in your development environment, it speeds your workflow up incredibly and gets easier to use over time as you learn by heart the various and most commonly used commands.
I couldn't find a tutorial online which gave me the correct path for my .bashrc file so I thought I would document what worked for me here, maybe it will help someone out.
My first step was to install composer globally, if you are not all that familiar with the command line you don't need to include the $ sign.
$ curl -sS https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/local/bin/composer
Next step is to install drush globally.
$ composer global require drush/drush
Now we need to add a path to the Bashrc file, this basically enables us to use drush as a shorthand command rather than it's full path. If you don't have a .bashrc file in your home directory then you will need to create one.
Most other tutorials I found were telling me to use the following for my PATH.
export PATH="$HOME/.config/composer/vendor/bin:$PATH"
However upon investigation my Drush folder was not in this directory and was actually 
export PATH="$HOME/.composer/vendor/drush/drush:$PATH"
If neither of these work you will need to do some investigating to find out where Drush was installed, if you can't see the .composer or .config folders you will need to show hidden files, in Ubuntu you can usually do this by clicking on one of the icons in the top right of your folder, then look for 'show hidden files' or something to that effect.

Installing Drush for Drupal 7 
Installing Drush provides a way of managing your Drupal installs using a familiar method, the command line.  Drush can simplify your life by allowing you to perform admin duties.
In this tutorial, we will be using Composer as our package manager, as it is necessary to install Drush’s dependencies.  It does take at least 1 GB worth of memory, so be sure to have that before starting this tutorial.

Step 1:  Updating

As a matter of good practices, we’ll update our system
apt-get update

Step 2:  Install Zip

Most likely you’ll already have the zip command but if you don’t go ahead and install.
apt-get install zip unzip

Step 3: Install Curl

apt-get install curl php7-cli git

Step 4: Install Composer

curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer

Step 5: Install Drush

Using the following command will install the newest version of Drush, at this time it is
composer global require drush/drush
Alternatively, you can install the Drush version of your choice by appending the version needed.  If you’d like Drush 8 use…
composer global require drush/drush:8

Step 6: Add Drush Directory to Your Path

If performing the version check in Step 6 gives you the message of “command not found” then open your .bashrc file and input the following into the file
#path for Drush
export PATH="$HOME/.composer/vendor/bin:$PATH"
Run source show recognize the changes to the file.
source .bashrc

Step 7: Verify the Installation of Drush

You’ll be able to verify the version of the Drush install and other useful information by running the following command.
drush status
Output:
PHP binary    : /usr/bin/php7.0
PHP config    : /etc/php/7.0/cli/php.ini
PHP OS        : Linux
Drush script  : /root/.composer/vendor/bin/drush
Drush version : 9.5.2
Drush temp    : /tmp
Drush configs : /root/.composer/vendor/drush/drush/drush.yml
Drupal root   : /root/.composer/vendor/drush/drush/sut
Issues
A) having trouble installing composer
  1. Goto a directory you can write to:
    cd ~
  2. get composer:
  3. move composer into a bin directory in your $PATH var:
    sudo mv composer.phar /usr/local/bin/composer
  4. double check composer works
    composer about
  5. (optional) Update composer:
    sudo composer self-update

Installing CURL on Ubuntu 18.04

The procedure to install cURL on Ubuntu Linux is as follows:
  1. Update your Ubuntu box, run: sudo apt update && sudo apt upgrade
  2. Next, install cURL, execute: sudo apt install curl
  3. Verify install of curl on Ubuntu by running: curl --version
Let us see all commands in details.

Ubuntu install curl command

First update the system and get latest stable curl version for Ubuntu:
$ sudo apt update
$ sudo apt upgrade
Type the following apt command or apt-get command:
$ sudo apt install curl
Sample outputs:
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libcurl4
The following NEW packages will be installed:
  curl libcurl4
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 373 kB of archives.
After this operation, 1,036 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://in.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcurl4 amd64 7.58.0-2ubuntu3.7 [214 kB]
Get:2 http://in.archive.ubuntu.com/ubuntu bionic-updates/main amd64 curl amd64 7.58.0-2ubuntu3.7 [159 kB]
Fetched 373 kB in 2s (150 kB/s)
Selecting previously unselected package libcurl4:amd64.
(Reading database ... 164985 files and directories currently installed.)
Preparing to unpack .../libcurl4_7.58.0-2ubuntu3.7_amd64.deb ...
Unpacking libcurl4:amd64 (7.58.0-2ubuntu3.7) ...
Selecting previously unselected package curl.
Preparing to unpack .../curl_7.58.0-2ubuntu3.7_amd64.deb ...
Unpacking curl (7.58.0-2ubuntu3.7) ...
Setting up libcurl4:amd64 (7.58.0-2ubuntu3.7) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Setting up curl (7.58.0-2ubuntu3.7) ...

Verification

Run the following command:
$ curl --version
Ubuntu install curl command and verify it

Usage

Once installed you can use it as follows to see the headers:
$ curl -I https://www.google.co.in/
$ curl -I https://www.cyberciti.biz/

Sample outputs:
HTTP/2 200 
date: Mon, 29 Jul 2019 13:13:08 GMT
content-type: text/html; charset=UTF-8
set-cookie: __cfduid=d5292058141c28e3cda2d9501688cff531564405988; expires=Tue, 28-Jul-20 13:13:08 GMT; path=/; domain=.cyberciti.biz; HttpOnly; Secure
vary: Accept-Encoding
strict-transport-security: max-age=15552000
x-whome: l-cbz02
cf-cache-status: HIT
age: 102433
x-content-type-options: nosniff
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
server: cloudflare
cf-ray: 4fdf59334ab9dcb5-MAA
Or download a file from a server using curl itself:
curl -o output.file http://server1.cyberciti.biz/bar.foo.txt
You can resume broken download with the curl command as follows:
curl -L -O -C - http://ftp.ussg.iu.edu/linux/centos/latest/isos/file.iso

Redcap Survey System

Introduction to REDCap


Use Cases for REDCap

Surveying the public
Standard survey
Longitudinal
Randomized modules
Email invitations

Online quizzes
Quizzes with automated marking

Event sign-up / registration
Can be set up so that sessions are closed when a maximum number of people register

Clinical data collection and management
EMS data collection

Public reporting system
School absenteeism reporting
Opioid overdosing

Redcap Features

Everyone gets their own account

As the “owner” of a project, you decide what collaborators you have and what level of access they have to your project

Our data stay in our building

No yearly quota of responses

Much lower cost to the agency

Direct integration with our dashboard / online reporting systems

Better auditing ability, better data security

Ability to use phone/tablet app for offline data collection

API—allows dashboards, related systems to automatically pull in data from REDCap as it is 

Ability to interface with many EHR systems (maybe Excelicare)

Enhanced data download and reporting options

Advantages

Has some disadvantages compared to Qualtrics:

Agency-side interface is a bit clumsy (but so is Qualtrics)

Some question types don’t exist (e.g., drill down, hot spot, sum)

Some question types (e.g., ranking) don’t work as well in RC

Other (please specify) questions are a bit clumsy

No ability for a progress bar

Error messages are not modifiable and can be clumsy



SharePoint - Helpdesk

The Falcon IT Services Helpdesk Support App is an application written for the SharePoint 2013 platform, it’s available for download at no charge. It’s designed for use by IT departments or MSP’s that employ helpdesk staff. It features an easy to use interface where technicians can collaborate on trouble tickets (issue tracking) and obtain information about the users, computers, servers and devices that are connected to the network.
Disclaimer: We make no guarantees, offer no warranty and we do not provide technical support for this app. Please keep this in mind and understand that you need intermediate SharePoint and Windows Server skills to get this app running on your server. If you get stuck in the process, you have to figure it out on your own :-(
You can download the app from the Microsoft Technet gallery and follow these instructions to set it up. There is a read-only preview of the app available at http://fha.falconitservices.com in case you want to look over it before committing yourself to installing it on your server.
Requirements: You will need a SharePoint 2013 Platform and an SMTP relay service. You will also need to download and install SharePoint Designer 2013.
Caveats: SharePoint 2013 requires a pretty fast CPU and 24GB RAM if you want the search feature to work (which in my opinion is critical for a helpdesk to be able to search past trouble tickets and build a searchable knowledgebase). If your server is less than ideal, this application will crawl unless you disable the SharePoint search feature.

Installing the APP

To begin, download the application from the Technet gallery.
We are going to create a new Web application and site collection that will hold the helpdesk application. Log in to SharePoint Central Administration.
Navigate to Central Administration > Application Management > Manage Web Applications
Once you have created your application, navigate to Central Administration > Create Site Collection. Make sure that the newly create Web application is listed in the select Web application section. If not, click on the drop down arrow and select it.
Give your site a title and description. Click on the custom tab in the template section and choose 
Select the users that will administer this site and click OK. When the creation process completes, you will be shown a link to your newly created site. Click on the URL link to proceed to your new Web site. When prompted to enter your credentials, enter the credentials of the site administrator you chose earlier.
When the template selection screen appears, click on the round cog at the top right and select site settings from the menu.
From site settings, select Web Designer Galleries > Solutions. Click on the upload solution button
Browse to find the template file you downloaded earlier and upload it. When prompted, activate the solution by pressing on the activate icon.
Enter your Web site's URL to go back to the home page. You should now see a custom menu selection in the template selection. Click on the custom tab, select the Trouble Tickets template, then click OK.
On the people and groups screen, set up the users and groups that will use the Web site and click OK. Your home page should now be displayed.
image
Securing the App
Before you do anything, visit the site permissions and set up the appropriate permissions. Site security is not automatically save in a WSP file so you have to secure the SharePoint site according to your own security settings.

Changing the Settings

After the initial setup, you need to do some housekeeping. First, go to site contents –> home page promoted links. From there click list from the ribbon menu and then all promoted links from the create column drop down menu in the list ribbon.
Click edit this list and change the FQDN to your own domain name. You can also change the default icons here if you do not like them. These images are stored in the site contents –> image app.
image 
Next, go to site settings –> look and feel –> title description and logo and change the settings to reflect your own. Upload your logo to the image app and link the new image here to change the company logo that’s displayed at the top left hand side of the site.
Finally, from the home page, click the edit button then the drop down arrow and select edit Web part in order to change the home page message to your own.
image

Adding Technicians

Go to site settings –> site permissions and locate the group: Helpdesk Technicians. Add your technicians to this group from your Active Directory members.
image

Adding Sites

Sites can be physical buildings or customers (if you are an MSP). The sites matrix contains important information about the site such as the address, contact information, etc. Click site matrix –> new item and add a new site. be sure to include all the email addresses and info.
image 
Sites will be shown by groups.
image
Once you have a site, it’s time to enter the accounting details for that site. Click on accounting matrix and select new item. Add the details as shown below:
  • Customer ID A brief descriptive ID
  • Credit Status – Their current credit status
  • MRC – The amount of revenue generated each month by this customer
  • Price per desktop & server – How much you charge per device
  • Term length – Contract term length
  • Start date – Contract start date
  • Client Name – Select the client from the site matrix
  • Comments – add comments
  • Notification type-
    • Welcome will send a welcome email to the site main contact.
    • Change is used to alert the client’s accounting contact that the credit status or MRC amount has changed.
    • None will suppress all notifications.
It’s recommended that you add photos and office layout diagrams and documents to the site matrix in order to help remote technical staff visualize the work environment. You can do this by clicking on the attach file icon while editing the user matrix.
image

Adding Devices, Computers & Servers

Devices such as routers, switches, printers, just about any device that can be managed, can be added here for easy access to the device info. Select device matrix –> new item  to add devices and computer matrix and server matrix to add computers and servers.

image
It’s recommended to add photos of the devices and their location for remote helpdesk support staff to easily identify the device and it’s location and better guide the user if any on-site interaction is required.
image

Adding Users

Finally, add users and the user’s attributes by selecting the user matrix and clicking on the add link. It’s important to add the pertinent information such as the user’s computer ID, installed apps and connected devices as these will appear to the technician when he performs a user lookup.
image

How to Mail Enable the Falcon Helpdesk Application

Go to SharePoint central administration and select systems setting. You will need to configure both outgoing and incoming SMTP.
image
Configuring these options requires knowledge of DNS and SMTP. There are multiple ways to accomplish this task but the easiest is to install SMTP service on the SharePoint server and use the local domain for mail relay. You can find instructions on how to do this here.
If you have an Exchange server on the network, it can facilitate external mail by forwarding mail to the local domain. If you do not have a local mail server, you will need to purchase a public FQDN and set up externally routable mail, which is outside the scope of this setup and user’s guide.

Mail Enabling the SNMP Alerts and Trouble Tickets Lists

To accept mail in the SNMP alerts list or Trouble Tickets lists, click on list settings. From there, click on incoming email settings. Choose an email alias and configure your custom settings.
image
For this example, I will use a local domain alias email. I will then have my Exchange server receive emails at alias@falconitservices.com and then forward them to alias@fits05-sp.fits.local. This allows me to easily receive email from the outside using the company’s public domain name and then forward them to the SharePoint domain.
Open the trouble tickets list and select list settings. Click on incoming email settings from the communications menu.
image
Select YES to allow the trouble tickets list to receive mail and then choose an email alias as shown below.
image
In the example above the list’s email address will be tix@fits05-sp.fits.local.
Go to your Exchange server’s ECP and navigate to recipients –> contacts. Add a contact to forward email to the SharePoint list.
image
Navigate to recipients –> mailboxes and add a mailbox with a publicly accessible email alias.
image
The mailbox shown above will receive mail at the address tix@falconitservices.com.
Now go to mailbox features –> mail flow –> enable forwarding and forward all emails to the SharePoint contact SMTP address.
image
When you send email to tix@falconitservices.com…
image
Those emails will now end up in the Trouble Tickets list, OMG!
image

Setting up SNMP Alerts

Use the same steps to set up SNMP alerts. SNMP is a very useful tool and there are some nice SNMP tools that allow you to monitor the entire network and report errors. Tools such as Dell OMSE and Solar Winds SNMP allow you to receive email SNMP alerts from multiple devices and send email alerts that can be forwarded to the Helpdesk Application home page for easy monitoring (as illustrated below). In addition to SNMP, may devices have SMTP alerts that can send notifications when an error condition exists using SMTP relay.
For example, most modern printers can send email alerts when a paper jam occurs or when the toner is low. If you can call the printer’s user and alert them that they need to start ordering toner before it runs out, your level of professionalism and service will be noticed and appreciated by the users (hopefully).
One of the most important tasks is monitoring backup alerts and RAID disk failure alerts. I have been called upon to help IT companies that have allowed a second disk volume to fail on RAID5 arrays because after the initial disk failure, nobody took notice! If you take the time to set up and monitor these types of alerts, you can save yourself a lot of trouble and provide your client a better level of service and better network reliability.
image
As you can see in the above graphic, an American Power UPS is alerting us of a battery failure, allowing us ample time to replace the battery before a serious problem occurs during the next power outage.

Working with Trouble Tickets

When you click on the Trouble Tickets icon on the home page, a list of current trouble tickets will be displayed. new tickets will be grouped together as unassigned.
image
Edit the trouble ticket and assign a technician and select the end user.
image
An automated message will be sent to the technician as well as to the end user that their ticket has been assigned and will be actively worked on by the technician.
The technician can view his/her trouble tickets by status. If a ticket required a lengthy fix, the technician can change the status to ‘in progress’ in which case another automated message will be sent alerting the user that the ticket is being worked on but may required some time to have the issue solved.
Finally, after the ticket has been completed, changing the status to closed will send a final alert to the parties involved stating that the issue has been resolved. The technician can place notes in the technician comments field that will be sent along with the closed ticket notification. These notes can also be helpful to the technicians as case studies when searching for related issues.

Adding Trouble Tickets Manually

To create a new trouble ticket, click on trouble tickets and click on add new announcement (long story). Add the pertinent information about the ticket. SharePoint will generate and email to the user that a technician has been assigned and the the ticket is being worked on.
image
Trouble tickets will be grouped by technician and then further grouped by status.
image

Setting up Lists

The lists are used by the app parts to pull data so that the information does not have to be entered manually. To add to the lists, just click on their links and then click on the new item hyperlink.
  • Manufacturers – This list stores the names, account numbers and other relevant information about the manufacturers you work with.
  • Device Types – This is a list of the types of devices you have on your network, e.g., routers, switches, print servers, etc.
  • Operating Systems – A list of the server and desktop operating systems that are supported in your organization.
  • Server Roles – The supported server roles that are used in your organization.
  • Applications – The applications that are supported in your organization.
  • User roles – User categories that are used in your organization.

Working with Workflows and Notifications

The Falcon IT Services Helpdesk App has built in workflows that send out automated messages so that all the stakeholders of a particular issue are alerted and aware of the issue’s progress. We are going to explain what the built in workflow notifications do and we are going to explain how to create a sample workflow.
The best part of any SharePoint app is that it’s very malleable.  You can add custom fields and alerts and create a customize variance to fit your company’s particular needs. Creating new workflows can help you achieve your customization goals.

Included Workflows

  • Credit Status Change Notification – This sends an alert to the sites accounting contact alerting them of a change in their credit status and prompting them to contact the accounting department for resolution. Technicians can view a client’s credit status so that clients that are past due or on credit may be denied service.
  • Welcome Letter – When you add a new site (or a new client), this workflow sends a customized welcome email to the site’s administrative contact. The message can include terms and conditions, agreement information, how to contact the helpdesk, etc.
  • Trouble Ticket Notification – This sends an alert to both the technician and the end user telling them that the trouble ticket they submitted has been received and assigned.
  • Ticket Update Notification – This send an alert when a ticket undergoes a change, allowing the stakeholders to be updated.
  • Ticket Closed Notification – This sends an alert that notifies the stakeholders that the ticket has been closed.
Creating a Workflow
We are going to go through the process of creating one of the sample workflows so that you can see how it’s done. Adding fields to the Web parts in the Helpdesk Application and creating custom alert notifications should be easy after that.
To begin, download and install SharePoint Designer 2013. Open the SharePoint site and navigate to lists and libraries and click on the Trouble Tickets list.
image
Click on the list workflow icon and then give the workflow a friendly name. Select SharePoint 2010 platform (long story) and then click OK.
image
Double click on the orange line below step 1 to edit.
image
Click on the magnifying glass and from the menu and select if value equals value. 
Click on the first value and select ticket status from the current item. Then click on the second value and select closed from the drop down menu.
image
The finished conditional formatting should look like the image shown below.
image
Now double click on the orange line below again and repeat the process, this time selecting to send and email.
Click on the address book icon in the to: field, select workflow lookup, click add and then add the user email and lookup value fields from the drop down boxes in the lookup person or group dialog box, as illustrated below.
image
Repeat the step to add the technician to the cc: field, the add a friendly subject to the email alert.
In the main body, type Dear and then click on the add or change lookup button. Select the end user field and add it to the field from source as illustrated below.
image
Continue to write your email template as shown below.
image
Note that certain fields can return multiple values. For example, the assigned technician field can return a value in the form of his/her full name or email address. You can change the return field value so that it return the correct value needed in your text, as shown below.
image
There are plenty of fields to play around with. You can add the ticket’s start date/time, a description of the problem and a summary of the technician’s notes. Here’s a sample ticket from our own internal application:
image
Once you have finished, click OK.
image
Save the workflow then go back to workflows and select the newly created workflow. Place a checkmark by start workflow automatically.. as illustrated below.
image
Finally, click on the publish icon to upload your completed workflow. In summary, the workflow creation should give you just about enough information to get started on creating your own workflows. You will also need to edit the existing workflows to customize each email message.
Workflows, coupled with adding fields to the Falcon IT services helpdesk Application, should provide you a highly customized helpdesk application.

Live long and prosper


Reference
https://www.falconitservices.com/support/KB/Lists/Posts/Post.aspx?ID=269