Basic Server Setup | Ubuntu | Setups | Infrastructure | Internal | CSCF | CS | UW

The Initial OS Install of An Image.

Choose a server image from one of the many ISO images available at "".

Go ahead and do a minimum base install, stopping just after the first reboot. Official installation documentation is available at "".

CSCF Infrastructure's Server Disk partitioning recommendations. Other disk paritioning information is available at "".

Updating the Apt Repository Sources to use the CS sponsored local mirror.

  1. With the support of University of Waterloo School of Computer Science, the CS Club provides an official Canadian mirror ( of many sites.

    CSCF setup makes use of this Ubuntu repository as their main Apt sources configuration file.

    Make sure this hosts "local apt key trust" has the ca-certificates package installed:
           sudo apt-get install ca-certificates
    Update /etc/apt/sources.list
           wget -q -O - \
               | sed -e "s/CodeName/`lsb_release -c -s`/"       \
               | sudo -s tee /etc/apt/sources.list.d/uwcs-depot.list > /dev/null
    Update apt's local database, checking output for problems with new setup:
    sudo apt-get update
  2. Create /etc/apt/sources.list.d/canonical_partner.list

    Use this repository for up-to-date versions of Acroread, Flash, Skype, UEX, SUN Java, OpenBravo...

    Information from

    sudo sh -c 'echo "deb `lsb_release -c -s` partner" > /etc/apt/sources.list.d/canonical_partner.list'
  3. These packages allow people to easily duplicate the Linux environments used within the Cheriton School of Computer Science.

    Add "" gpg key to the local apt key trust.
    	if [ `lsb_release -sr` \> 22 ]; then 
               wget -q -O - \
    	     | sudo tee /etc/apt/trusted.gpg.d/ > /dev/null
    	   wget -O - \
    	     | sudo apt-key add - 
    Create /etc/apt/sources.list.d/uwcs-depot.list
           wget -q -O - \
             | sed -e "s/CodeName/`lsb_release -c -s`/"       \
             | sudo -s tee /etc/apt/sources.list.d/uwcs-depot.list > /dev/null
    Update apt's local database:
    sudo apt-get update

Update Kernel:

As of Ubuntu 16.04 LTS, Infrastructure group recommends using the HWE Kernel and supporting packages.

sudo apt-get install --install-recommends linux-generic-hwe-`lsb_release -sr` xserver-xorg-hwe-`lsb_release -sr` linux-tools-generic-hwe-`lsb_release -sr`

SERVER Systems
sudo apt-get install --install-recommends linux-generic-hwe-`lsb_release -sr` linux-tools-generic-hwe-`lsb_release -sr`

Update Kernel Tuning parameters:

Warning: This item maybe out of date WRT newer Linux kernels 5.0 and newer. A better solution maybe to use zram (and zswap) although that hasn't been evaluated by CSCF as of 2021-07-12

On hosts with plenty of memory, we want to reduce how aggressive the kernel is about swapping processes out.
By default swappiness=60, change the 10 below to 0 for lxc container IaaS (Infrastructure as a Service) containers or some other value but make sure you document your reasons/references in the sysctl.conf file!

echo -e "\n# \n# We have lots of memory so make system much less aggressive in swapping memory out to disk. \nvm.swappiness=10 \n" | sudo -s tee -a /etc/sysctl.conf


  1. Linux Performance and Tuning Guidelines - IBM Redbooks
  2. What Is Swappiness on Linux? (and How to Change It) - Dec 2019
  3. Why most people recommend to reduce swappiness to 10-20? and the links it refers to
  4. Yoshinori's tutorial at the MySQL conference

Add Host to a DRCSCS AD Domain (if it uses any SCS printing or network file server resourses).

For now, create a CSCF-INF RT request providing the name of the host, which domain (CS-TEACHING or CS-GENERAL or ...) for athentication and if the host should be restricted to a particular group of users within that domain.

You can also try to use to add this host to a DRCSCS AD Domain yourself.

Tracking the Basic Set of Packages that Define a CS Infrastructure Server.

  1. Since this is NOT a virtual system, we install the "uwcs-bare-metal" package to manage the hardware:
    sudo apt-get -y install uwcs-bare-metal
  2. We use the "uwcs-server" metapackage to make sure this Server tracks the list of packages that define the base CSCF Server system setup:
    sudo apt-get -y install uwcs-server

Configuring to Use Various CSCF IT Services.

  1. You should likely double check the "/etc/resolv.conf" setup: [an error occurred while processing this directive]
  2. We want to be able to use snmp to monitor this server:
    [an error occurred while processing this directive]
  3. Setup NTP: [an error occurred while processing this directive]