Ubuntu Server modifications needed before FreeLCS installation

The FreeLCS installation instructions on the main user manual page describe installation on Ubuntu Desktop. Ubuntu Desktop has a graphical user interface and it is very user friendly. There is another version of Ubuntu called Ubuntu server. It has no graphical user interface and because of this it requires more Linux skills than the desktop version. Instructions below assume you know your way around the Ubuntu Server system.

The default Ubuntu Server installation has some small problems that will prevent FreeLCS from working correctly.

Fixing Ubuntu Server locale

For Ubuntu 16.04 and newer use the Debian method described here.


Installing FreeLCS on a computer without a graphical user interface

If your operating system is Debian, then you need to make some changes to the system before FreeLCS installation. Instructions are here.

If your operating system is Ubuntu Server, then you need to make some changes to the system before FreeLCS installation. Instructions are here.

Ubuntu Server does not have a graphical user interface and Debian can be installed also without one. Computers with these version of Linux are most likely servers running in a dedicated server room or virtualized in a server farm. The only way to access these servers is usually with a ssh connection.

The advantage of a operating system without a GUI is that it uses very little physical resources, for example Debian 7 without a GUI uses only 45 MB of Ram when it starts up.

FreeLCS installation requires a graphical user interface, but there are two methods to install it on a "headless" server.
  1. You can install FreeLCS on a computer that has a graphical user interface, make a backup of the installation and restore it on a "headless" server. The restoration process can be done over ssh. Instructions for this method are here.
  2. You can use X - forwarding over a ssh connection. This installation method is described below.


Installing FreeLCS over ssh with X - forwarding

FreeLCS installation requires either a connection to the internet or access to a local Debian / Ubuntu package repository.

This method requires two computers: one Linux or OS X machine with the X windowing system installed (Desktop computer) and the target server (server computer). When using this method the installer runs on the "headless" server, but its windows will appear on the Desktop computer.


Note: On Ubuntu Server 16.04 and Debian 9 and newer XForwarding is enabled by default so you don't need to do steps 1 and 2, just jump to step 3.


  1. First make an ssh - connection from the Desktop computer to the server with the following command (replace the username with an actual username on the server and the ip with the actual ip of the server):

ssh   -l   username   192.168.1.1

  1. Now add the following line in the file:  /etc/ssh/ssh_config    on the server:
X11Forward yes
  1. Now quit the ssh connection and create it again now using X - forwarding:
ssh  -Y  -C  -l   username   192.168.1.1     (If this does not work try replacing the option -Y with -X).
  1. You might get the message ".Xauthority does not exist". This is not an error, but an announcement telling that the file in question did not exist and it is now created. Next time you make the connection you should no longer see this message.
  2. The following commands are all executed on the server over the ssh - connection.
  3. Update the package database. Installation may fail to fetch some needed packages, if the package database is out of date.

sudo apt-get update

  1. Install programs needed during FreeLCS installation:
sudo  apt-get -y  install  python3  idle3  zip  unzip
  1. Download FreeLCS installer. If a newer FreeLCS package is available replace the name of the zip-file:

wget  http://sourceforge.net/projects/freelcs/files/FreeLCS-3.0.zip

  1. Unzip the package:
unzip FreeLCS-3.0.zip
  1. Enter the unzipped archive directory:
cd freelcs
  1. Run FreeLCS installer:
./installer.py

Now after a few seconds the window of the installer program should appear on the Desktop computer, even though the installer really runs on the server. Now you can follow the Ubuntu Desktop installation instructions.


Note !!!!!!! When installing using this method on Ubuntu Server 18.04 there seems to be a bug that won't let you write the character @ to the installer window (used in email addresses). Please write the character on a terminal on your Desktop computer and copy / paste it to the installer window. This bug seems only to exist on early versions of Ubuntu 18.04.



Automatic security updates on Ubuntu Server and Debian

These instructions apply to Ubuntu Server and Debian. If your operating system is Ubuntu Desktop, then you can do the configuration more easily with graphical tools. Instructions for Ubuntu Desktop are here.

The next intructions sets the operating system to install all security updates automatically.

All following instructions must be run as the root user.
apt-get install unattended-upgrades
dpkg-reconfigure -plow unattended-upgrades
nano -w /etc/apt/apt.conf.d/50unattended-upgrades
"${distro_id}:${distro_codename}-security";

"origin=Debian,archive=stable,label=Debian-Security";

nano -w /etc/apt/apt.conf.d/10periodic

nano -w /etc/apt/apt.conf.d/20auto-upgrades

APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "30";
APT::Periodic::Unattended-Upgrade "1";

The settings we made define that the server will download and install security updates daily. The downloaded installation packages are deleted after 30 days.

When updates are installed then details about the installation are recorded to log files in directory:

/var/log/unattended-upgrades/


Now you can setup automatic reboot once a week so that kernel updates are applied.


Static ip - address for Ubuntu Server and Debian without a GUI

In this example we assing the static ip-address of 192.168.1.1 to the network interface eth0. The default gateway to the internet is the computer at address: 192.168.1.200. We use OpenDNS - service as our name servers (ip-addresses: 208.67.222.222, 208.67.220.220). You need to change these settings to correspond to your network environment.

Important note:

Don't try to change network settings on a remote server through a ssh - connection. There is always the possibility that something goes wrong and you are not able to connect to the server anymore.


sudo nano -w /etc/network/interfaces
auto eth0
iface eth0 inet static

address 192.168.1.1
netmask 255.255.255.0
gateway 192.168.1.200
dns-nameservers  
208.67.222.222   208.67.220.220

You may need to reboot the computer for the changes to take effect.