Category Archives: IT Support

Moodle Installation

<![CDATA[Since the Moodle Docs site has been so sketchy, I decided it would be best to document my recent installation.
Note:  I am installed on a VMWare ESXi 6.5 Virtual Machine.  750GB SSD, 16GB RAM, and 8 Cores.

  • Install Ubuntu 16.04
  • If you are doing it on a VM, check Check CPU#, Increase Video RAM, and move LAN to the 1000e.
  • I immediately open root and do everything else as room
    • sudo -i passwd root
    • sudo passwd -u root
    • su
    • gedit /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
      • Add the following lines to the bottom.
        [SeatDefaults]
        greeter-session=unity-greeter
        user-session=ubuntu
        greeter-show-manual-login=true
    • gedit /root/.profile
      • Delete last line -> mesg n
  • Reboot and logon as root
    • Update  and install vm tools
      • apt-get update
      • apt-get upgrade
      • apt-get install open-vm-tools
    • Install LAMP and required Moodle dependencies.
      • apt-get install apache2 mysql-client mysql-server php7.0 libapache2-mod-php7.0
      • apt-get install graphviz aspell php7.0-pspell php7.0-curl php7.0-gd php7.0-intl php7.0-mysql php7.0-xml php7.0-xmlrpc php7.0-ldap php7.0-zip php7.0-soap php7.0-mbstring
    • Restart the server and then create the Moodle database
      • reboot -r now
      • mysql -u root -p
        • CREATE DATABASE moodle DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
        • create user ‘username‘@’localhost’ IDENTIFIED BY ‘password‘;
        • GRANT ALL PRIVILEGES  ON moodle.* TO username@localhost IDENTIFIED BY ‘password
        • quit;
  • I make the folders for Moodle in the /var/www folder and initially open all permissions there.
    • cd /var/www
    • mkdir moodledata
    • mkdir moodlesql
    • chmod -R 0777 /var/www
    • If you are restoring a previous version.
      • cd /var/www/moodlesql  (or wherever the sql file is)
      • mysql -p moodle<moodle-database.sql
    • If you make a mistake you can always delete the database and start over
      • mysql -u root -p
        • drop database Moodle;
        • quit;
    • There are a couple tweaks I make to PHP before the installation
      • gedit /etc/php/7.0/apache2/php.ini
        • find “post_max_size”
        • Change the value to the number of Mb you want your site to accept as uploads
        • find “upload_max_filesize”
        • Change to the same value as above
        • Find “max_execution_time”
        • Raise to a larger value if needed (like 60-600)
  • Download Moodle from Moodle.org and extract the file to /var/www/html
    • Navigate to 127.0.0.1 in your browser and begin the installation!
  • When you are complete you may want to:
    • Reset your folder permissions
      • chmod -R 0775 /var/www
    • make your IP address a static one and then get that address permanently in the moodle config.php file until you have an actual web address to put in there.

]]>

Windows Server 2016 RDS Licensing Server

<![CDATA[Windows Server RDS works great for allowing thin clients to have a full desktop experience.  For RDS to work correctly, you must create a licensing server to hand out seats per client connection, whether that be per user or per device.  This guide will go step by step through the process of creating a licensing server to serve RDS seats.  We assume that you already have a Windows Server 2016 machine ready for this deployment.
In our environment, we use a separate virtual machines for each server role.  We use VMWare 6.5 as our host, and Windows Server 2016 as our VM client.  This server will only have this role installed.  Our base VM has any default roles that are installed out of the box, with an addition of the .NET 3.5 feature set.


Please make sure your server is set on the correct timezone, remote desktop is enabled, all Windows Updates have been installed, the server has been joined to your domain, and then restart the server.  When logging into the server, use a domain user account with Domain Admin privilege.


  1. Open Windows Server Manager and click Add roles and features
    1
  2. Click next confirming that you have verified the tasks listed.
    2
  3. Click next confirming that you are installing a role-based feature on the current server.
    3
  4. Click next to confirm that the server highlighted is the correct server for the role to be installed.
    4
  5. Select the Remote Desktop Services role and click next.
    6
  6. Click next on the features list, without checking an additional feature other than the defaults.
    7
  7. Click next to confirm that you want to install the Remote Desktop Services role.
    8
  8. Select Remote Desktop Licensing to install the licensing host components.
    9
  9. Click Next to install the role.  OPTIONAL: Check the Restart box and select yes to allow the server to restart after installation. (The server does not need to restart after installing this role.)
    10
  10. After the role finishes installing, click close.
    12
  11. Click on Tools > Remote Desktop Services > Remote Desktop Licensing Manager.
    14
  12. Click Review on the server you just created.
    15
  13. Click Add to Group.
    16
  14. Click continue to add the server to its correct licensing group.
    17
  15. This message will be received when you have completed the following step. Click ok to close the window.
    18
  16. Click ok to close the window.
    19
  17. Right click on the server you are trying to configure. Click activate server.
    20
  18. Click Next to configure the licensing portion.
    21
  19. Click next to use the automatic defaults.
    22
  20. Complete the required information for your organization and then click next.
    23
  21. Complete the required information for your organization and then click next.
    24
  22. Click next to start the licensing wizard.
    25
  23. Click next to confirm the settings are correct.
    26
  24. Select the correct type of agreement for your organization.  In our case this would be School Agreement.
    27
  25. Type the agreement number and select next.
    28
  26. Select the correct product version, license type, and quantity of licenses. Then click next to finish the wizard. In our case, RDS per user CAL is the correct licensing type.
    29
  27. Click Finish to close the wizard and activate your RDS licensing server.
    30
  28. Your server is now activated if the green check mark is displayed.
    31

This guide was to setup the licensing server portion of a remote desktop environment.  To setup the servers that clients/thin clients connect to, please see this post.]]>

Windows Server 2016 KMS Server

<![CDATA[Windows Server 2016 KMS – Office 2016 & Server16/Win10 KMS
Recently, we found that Server 2016 standard was having issues using the volume activation tools that are built in.  Instead of using the VAT role, we elected to build our KMS server through command line.  In this tutorial, I will walk you through the steps necessary to complete your new KMS install using Server 2016 Standard.
We are installing a KMS server for Server 2016, Windows 10, and Office 2016 Pro Plus clients.  (Other versions also activate as it is backwards compatible.)
Note:  We are using VMware Hypervisor 6.5 (Free), and our KMS server is running as a VM using Windows Server 2016 Standard (with desktop experience).  Screen capture images can be browsed here. -> Steps


  1.  Create a Windows Server 2016 Server (any edition).
    • Set the timezone, name (and join) your server with your Active Directory.
    • Enable Remote Desktop and set a static IP address (optional)
    • Check for, and install, all windows updates.
    • Reboot the server
  2. Install the Volume Activation Services Role through the server manager.  Click next through the entire process leaving the defaults.  (This GUI is what crashes for us, which is why we are using command line.)
    • Reboot the server once the installation completes.
  3. Visit the Microsoft Volume Licensing Center and obtain your KMS keys for Office 2016 and Server 2016.  Keep these for future reference.  While on the volume site, download “Office Professional Plus 2016 Key Management Service Host”.  It will be an ISO file.
    • Extract the ISO to C:\kms or an appropriate location.
  4. Use an elevated command prompt for all of the following steps
    • Install the Office 2016 KMS Host pack (What we extracted to C:\kms)
      1. cd c:\kms
      2. cscript kms_host.vbs
      3. After the VAT popup appears, close VAT and hit enter twice to return to a standard command line.
    • Install the KMS keys for Windows and Office, one at a time, waiting for the confirmation that the key has been installed prior to continuing to the next.
      1. slmgr.vbs -ipk <insert Server 2016 key here>
      2. slmgr.vbs -ipk <insert Office 2016 key here>
    • Export the licensing information.  This is for two reasons.  First, to make sure both keys have been inserted correctly, and to obtain the activation ID.
      1. cd c:\windows\system32
      2. cscript slmgr.vbs -dlv all >C:\kms\export.txt
        • cscript must be used to export the information into a txt file.
    • Open the recently created export.txt file, and scroll to the licensed products.  Copy the Activation ID‘s for both products and keep for the next step.  NOTE:  The Activation ID and Application ID are NOT the same, so make sure you obtain the correct ID.  The easiest way to find the correct product is to locate the Installation ID.  It will only be present on the two products that we have installed a key on (even though we will not be using the Installation ID.)
    • Activate your product keys.  Do each command one at a time, waiting for the confirmation before moving to the next.
      1. slmgr.vbs -ato <insert Activation ID for Server 2016 here with the dashes>
      2. slmgr.vbs -ato <insert Activation ID for Office 2016 here with the dashes>
    • Confirm that your products are activated and licensed.
      1. cscript slmgr.vbs -dlv all >C:\kms\export2.txt
        • Confirm that the two products identified before have “licensed” as their licensing status.
  5. Now your server is licensing clients.  There are thresholds that will determine when activation starts.
    • Windows Server will activate after a count of 5.
    • Windows 10 will activate after a count of 25.
    • Office 2016 will activate after a count of 5.

Additional Information about KMS:
A Server 2016 KMS key will activate all server editions up to 2016.  It will also activate all Windows Client editions up to Windows 10 including 7, 8 and 8.1.  The Office 2016 Professional Plus key will activate both Pro Plus and Standard Office 2016 installations.]]>

Windows Server 2016 RDS Client Server

<![CDATA[Windows Server 2016 : Remote Desktop Services
This guide will walk you through how to setup Remote Desktop Session Host on Server 2016.  Our application of this role is to provide a central connection server for thin client users.  There are two parts of this guide, the licensing server and connection server.  This guide covers the connection server, and assumes you have already setup a licensing server named “TRAIL5”.


Connection Server
After creating a new Windows Server 2016 server, open the server dashboard and add “Remote Desktop Services”. (figure 1-1)

figure 1-1
figure 1-1

Continue through the wizard by clicking next, without adding features.  The next screen will display role services for remote desktop services.  Add “Remote Desktop Gateway” and “Remote Desktop Session Host” and then finish the wizard. (figure 1-2)
figure 1-2
figure 1-2

After Installation completes, restart the server as required.  Once restart has completed, create a group policy to define the licensing information.  This can be achieved on the local machine by running “gpedit.msc” or by creating a group policy object applied to the container in which this server resides.  Local policy can be applied at the following path: Local Computer Policy > Computer Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Licensing.  This is where you set the licensing server and type. (figure 1-3)
figure 1-3
figure 1-3

A policy that is applied through group policy rather than locally would be below. (figure 1-4)
figure 1-4
figure 1-4

Once this policy is applied, you may restart the server.  After a restart, it will be fully licensed and ready to use.


This guide was to setup the client access server portion of a remote desktop environment.  To setup the licensing server to process CAL’s, please see this post.]]>