8Aug/190

Installation of a graphical user interface for Linux

All Linux-Server operating systems are installed by default without a graphical user interface (GUI). A GUI on a dedicated server can only be accessed if a KVM is connected.
This tutorial will guide you through an easy installation process of the two most common GUIs for Ubuntu, Debian and CentOS.
Please note that you will always have to create an additional user for your GUI login, since a login as root is not possible.
In order to access your GUI, you need to use your VPS VNC connection, or access your dedicated server via KVM. KVM access has to be ordered additionally for our dedicated servers, it is not included by default.

Ubuntu 16.04 / 18.04

Please connect to your server as root via SSH.
Create a new user for your GUI login and set a password:

useradd -m NewUserName && passwd NewUserName

Now you can install the Ubuntu-Dekstop GUI with the following command (the server will fetch updates, install the GUI, and reboot automatically):

apt update && apt upgrade -y && apt install ubuntu-desktop -y && init 6

Alternatively, the following command installs the Kubuntu-Desktop (the server will fetch updates, install the GUI, and reboot automatically):

apt update && apt upgrade -y && apt install kubuntu-desktop -y && init 6

You can connect to your VPS via VNC and login to your new GUI, or via KVM if you have a dedicated server.

Ubuntu 18.10 and later versions

Please connect to your server as root via SSH.
Create a new user for your GUI login and set a password:

useradd -m NewUserName && passwd NewUserName

You can choose from a variety of GUIs, which will automatically be installed with the "tasksel" tool:

apt update && apt upgrade -y && tasksel

Choose a desktop of your liking and confirm, please do not install multiple desktop environments at the same time. Reboot your server to make your GUI accessible via your VPS VNC access or KVM in case of a dedicated server.

CentOS 6

Please connect to your server as root via SSH.
Create a new user for your GUI login and set a password:

useradd -m NewUserName && passwd NewUserName

Now you will need to edit your "/etc/inittab" to boot to runlevel 5 so that you will be able to use the GUI after (re)boot:

nano /etc/inittab

Please change the following line:

id:3:initdefault: -> id:5:initdefault:

Save your changes and close the editor by pressing strg+o, enter, strg+x.

The following command will update your server and install the GNOME GUI and required software (the server will be rebooted automatically):

yum update -y && yum -y groupinstall "Desktop" "X Window System" "Fonts" && init 6

Now you can access your GUI via your VPS VNC access or KVM in case of a dedicated server.

In order to install the KDE GUI, please use the following command. Your server will also be updated and rebooted:

yum update -y && yum -y groupinstall "KDE desktop" "X Window System" "Fonts" && init 6

Now you can access your GUI via your VPS VNC access or KVM in case of a dedicated server.

CentOS 7

Please connect to your server as root via SSH.
Create a new user for your GUI login and set a password:

useradd -m NewUserName && passwd NewUserName

Now you can install the KDE GUI with the following command (the server will fetch updates, install the GUI, and reboot automatically):

yum update -y && yum -y groupinstall "KDE Plasma Workspaces" && ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target && init 6

As alternative the following command for an installation of the GNOME GUI (the server will update and reboot automatically):

yum update -y && yum -y groupinstall "GNOME Desktop" "Graphical Administration Tools" && ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target && init 6

You can connect to your VPS via VNC or KVM in case of a dedicated server and login to your new GUI.

Debian 8 and later versions

Please connect to your server as root via SSH.
Create a new user for your GUI login and set a password:

useradd -m NewUserName && passwd NewUserName

Now you can install the GNOME GUI with the following command (the server will fetch updates, install the GUI, and reboot automatically):

apt update && apt upgrade -y && apt install gnome -y && init 6

As an alternative the following command for an installation of the KDE GUI (the server will update and reboot automatically):

apt update && apt upgrade -y && apt install kde-standard -y && init 6

Now you can connect to your VPS via VNC or KVM in case of a dedicated server and login to your new GUI.

Posted by: Philipp | Tagged as: , , , , , No Comments
24Jul/190

Debian & Ubuntu Upgrade

At Contabo, we always offer you the latest version of many popular Linux operating systems. This tutorial shows you how to upgrade from an old version to the latest Debian (stable) or Ubuntu LTS.

Important:
Before proceeding make sure to have a local backup of all important files, the upgrade might fail and your server becomes inoperable!
In case you are upgrading a VPS with 100% SSD, creating a prior snapshot will be sufficient for backup.
The upgrade really depends on the customization performed on the system and the amount of software installed. The higher the amount of additional software, the higher the risk of package-conflicts which need to be solved manually.

1. Preparation

The system needs to get all pending updates for your software packages, prior to proceeding. If you have not installed updates recently this might take some time.
Packages which were installed due to dependencies and are not needed anymore should be deleted as well.

:~#apt-get update && apt-get upgrade -y
:~#apt-get autoremove

2. Adjusting the apt.conf (Debian)

The following commands will replace "stretch" with "buster" in any repository entry.
In case you manually added additional repositories they might fail, you will have to manually investigate or disable those package sources.

:~#sed -i 's/stretch/buster/g' /etc/apt/sources.list
:~#sed -i 's/stretch/buster/g' /etc/apt/sources.list.d/*

Usually there should be no additional package sources configured and your sources list will have the following configuration:

:~# cat /etc/apt/sources.list
deb http://asi-fs-n.contabo.net/debian buster main non-free contrib
deb http://security.debian.org/debian-security buster/updates main contrib non-free
deb-src http://security.debian.org/debian-security buster/updates main contrib non-free
deb http://asi-fs-n.contabo.net/debian buster-updates main contrib non-free

3. a) Start upgrade (Debian)

The following commands will start the upgrade and will also update the packages.

:~#apt clean && apt update
:~# apt upgrade -y
:~# apt dist-upgrade -y
:~# apt autoremove
:~# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

3. b) Start upgrade (Ubuntu)

Ubuntu has got a Tool/command for this purpose: "do-release-upgrade" it will update to next available LTS version, so 14.04 LTS to 16.04 or 16.04 LTS to 18.04 LTS.
In case the command was not found and the tool is missing, it can be installed with following command:

:~# apt-get install update-manager-core

4. Restart server

In order to use the recently installed kernel, you will have to reboot your server. After rebooting you are running the latest version of Debian (stable)/ Ubuntu LTS.

In case of any issues or inquiries, our customer support team is available to assist you.

Posted by: Gianni-Donato | Tagged as: , , , , , No Comments
15Jul/190

Debian 10 available now!

Just released last week, available at Contabo as of today: Debian 10, codename Buster. It is available for all our VPS and dedicated server - just select it during the order process. If you are an existing customer and would like to upgrade to Debian 10, you can do so via our customer control panel.

Furthermore, you can combine Debian 10 with Webmin, Lamp, Webmin+LAMP and the Software Raid 1. It is not yet available for Plesk, but it will soon be rolled out by Plesk - we kindly ask for your patience.

Besides Debian 10, we offer you a variety of the latest Linux OS as well as Windows Server 2012 and 2016. Just visit our website and select your desired VPS or Root Server 🙂 !

Posted by: Markus | Tagged as: , , , , , , No Comments
20Jun/172

New OS: Debian 9 available now!

Just released a few days ago, already available at Contabo: Debian 9, codename Stretch. You can order the operating system with your new VPS or dedicated server. Existing customers can upgrade to Debian 9 through their customer control panel.

You can combine Debian 9 with Webmin, Lamp, Webmin+LAMP and the Software Raid 1.

In its latest version, the developers have replaced MySQL with MariaDB, and a new Kernel version 4.9 is available as well.

Apart from Debian 9, we offer you a large number of Linux distributions, as well as Windows Server 2012 and 2016. Simply click on "Customize & Order" on our VPS and dedicated servers overview sites and select the operating system that matches your requirements - further details can be found on our website!

Posted by: Markus | Tagged as: , , , , 2 Comments
8Sep/160

Comparison of the different Linux distributions available at Contabo

As a valued customer of Contabo you have access to a variety of different Linux distributions, for use on all of our servers. These can be easily and automatically installed via our powerful customer control panel, which results in various benefits for our customers:

- Contabo always provides the latest versions for installation on all servers.

- You can conveniently and comfortably choose and switch between the offered Linux distributions at any time.

- All Linux distributions are offered free of any costs or fees.

- From the beginner towards the enthusiast, up to commercial professional use, all requirements can be met with the distributions offered by Contabo.

CentOS:

CentOS (Community Enterprise Operating System) is a Linux distribution based on Red Hat Enterprise Linux (RHEL). It is maintained by an open group of voluntary developers, which take care of maintenance and development. As opposed to RHEL, you can use this operating system without mandatory support contracts and free of charge.

WHMs cPanel is developed for this operating system in particular, which makes this Linux distribution a must have for resellers. As an enterprise operating system it is developed with stability and long-term maintenance cycles in mind. All CentOS versions can be used for 10 years without the need to migrate packages and software versions, which makes it an ideal solution for commercial use.

https://www.centos.org/

Debian:

Debian is another Linux distribution that is composed completely of free software, most of which is under the GNU General Public License.

Long term support was first introduced with version 7 for almost all available software packages that use the architectures i386 and AMD64 (32bit- and 64bit-PC-systems). The Debian Project aims to provide 5 years long-term support with security and bug fixes for all versions from 7 upwards. This Linux distribution has access to online repositories that contain over 50,000 software packages, making it one of the largest software compilations available. Debian officially contains only free software, but non-free software can be downloaded and installed as well if needed. This makes it a valid solution for commercial use, as well as a versatile operating system for the regular user.

https://www.debian.org/

Ubuntu:

Ubuntu is a Linux distribution that is strongly based on and influenced by Debian. The goal of the developers was to create an operating system that is as easy to use as possible. It is one of the most commonly used distributions available today. The development team also releases long term support versions of Ubuntu, which are indicated by “LTS” at the end of the version number.

http://www.ubuntu.com/

OpenSUSE:

The focus of its development is creating usable open source tools for developers and administrators, while providing a user friendly desktop and server environment. A unique feature of this distribution is its specialized installation and configuration tool YaST (“Yet another Setup Tool“), which is a central administrative tool for the OpenSUSE operating system. It also helps finding new software and packages for the OpenSUSE distribution.

https://en.opensuse.org/Main_Page

Fedora:

Compared to other Linux distributions, Fedora does not aim for long term support. The life cycle of a Fedora version is 13 months only. Every 6 months a new version is released by the development team. Owing to this circumstance, Fedora is not suited for long-term usage on systems.

On the other hand, you have always access to the latest software developments available. Being state of the art has never been this comfortable. Enthusiasts that are eager to try out the latest developments on the market should always consider using Fedora.

https://getfedora.org/en/

Posted by: Philipp | Tagged as: , , , , , , No Comments
13Jul/151

Configuring additional IP addresses

Upon ordering a Dedicated Server or VPS you will receive one IPv4 address and one /64 IPv6 subnet. As an example, this could be the IPv4 address 192.51.100.10 and the IPv6 subnet 2001:0db8:2a02:c200::/64.

Your server comes pre-configured with this IPv4 (192.51.100.10) and one IPv6 address (2001:0db8:2a02:c200:0000:0000:0000:0001). Additional IPv4 addresses can be ordered by contacting us at support@contabo.com or through our homepage when placing an order for a new server. These additional IPv4 addresses will not be added to your system automatically but will have to be configured manually.

The following will give an overview on how to configure additional IP addresses on the most popular operating systems. The server used in these examples has the primary IPv4 address 192.51.100.10 and will receive the additional IPv4 addresses 192.51.100.42 and 192.0.2.23. As a general rule we recommend configuring these addresses with a netmask of 255.255.255.255 (/32) and /64 respectively and without adding a new gateway.

Arch Linux

The network configuration file of Arch Linux is stored under /etc/systemd/network/eth0_STATIC.network. For configuring additional IPv4 addresses, it is sufficient to add further Address= entries at the end of the file.

#/etc/systemd/network/eth0_STATIC.network
[Match]
Name=eth0
[Network]
Address=2001:0db8:2a02:c200:0000:0000:0000:0001/64
Gateway=fe80::1
DNS=2a02:c207::1:53
Address=192.51.100.10/24
Gateway=192.51.100.1
DNS=213.136.95.11
DNS=213.136.95.10
Address=192.51.100.42/32
Address=192.0.2.23/32

Further IPv6 addresses can be added similarly:

#/etc/systemd/network/eth0_STATIC.network
...
Address=2001:0db8:2a02:c200:0000:0000:0000:0002/64
Address=2001:0db8:2a02:c200:0000:0000:0000:0003/64
...

To apply the changes, reboot your server.

CentOS 6.x

CentOS has all its network interface configuration files stored in /etc/sysconfig/network-scripts/. In order to configure additional IPv4 addresses, one virtual interface per additional IPv4 address has to be created. If the main interface is e.g. eth0, the virtual interfaces would be named eth0:0, eth0:1, eth0:2 and so on. Their configurations reside in individual configuration files named ifcfg-eth0:0, ifcfg-eth0:1, ifcfg-eth0:2 receptively.

#/etc/sysconfig/network-scripts/ifcfg-eth0:0
DEVICE="eth0:0"
BOOTPROTO="none"
ONBOOT="yes"
IPADDR="192.51.100.42"
NETMASK="255.255.255.255"

#/etc/sysconfig/network-scripts/ifcfg-eth0:1
DEVICE="eth0:1"
BOOTPROTO="none"
ONBOOT="yes"
IPADDR="192.0.2.23"
NETMASK="255.255.255.255"

Additional IPv6 addresses can be specified using the variable IPV6ADDR_SECONDARIES in the interface's primary configuration file (/etc/sysconfig/network-scripts/ifcfg-eth0 in case of eth0). Multiple addresses are separated by a white space:

#/etc/sysconfig/network-scripts/ifcfg-eth0
...
IPV6ADDR_SECONDARIES="2001:0db8:2a02:c200:0000:0000:0000:0002/64 2001:0db8:2a02:c200:0000:0000:0000:0003/64"
...

To apply the changes, reboot your server.

CentOS 7.x / Fedora

The network interface configuration files of both CentOS 7.x and Fedora are stored under /etc/sysconfig/network-scripts/. Additional IPv4 addresses can be added to the respective interface's configuration file by using variables of the pattern IPADDR0, IPADDR1, IPADDR2 and PREFIX0, PREFIX1, PREFIX2 etc., in case of e.g. eth0 this would be /etc/sysconfig/network-scripts/ifcfg-eth0:

#/etc/sysconfig/network-scripts/ifcfg-eth0
...
IPADDR0="192.51.100.42"
PREFIX0="32"
IPADDR1="192.0.2.23"
PREFIX1="32"
...

The old method using virtual interfaces as employed in CentOS 6.x and described above will also still work.

Additional IPv6 addresses can be specified using the variable IPV6ADDR_SECONDARIES in the interface's primary configuration file (/etc/sysconfig/network-scripts/ifcfg-eth0 in case of eth0). Multiple addresses are separated by a white space:

#/etc/sysconfig/network-scripts/ifcfg-eth0
...
IPV6ADDR_SECONDARIES="2001:0db8:2a02:c200:0000:0000:0000:0002/64 2001:0db8:2a02:c200:0000:0000:0000:0003/64"
...

To apply the changes, reboot your server.

cPanel

With cPanel there is no need to deal with configuration files. Log in to WHM and navigate to "IP Functions" » "Add a New IP Address". Enter the IP address, select subnet mask 255.255.255.255 and click "Submit":

cpanel-ip

Debian / Ubuntu (until 17.04)

Debian's and Ubuntu's network interface configuration is stored in /etc/network/interfaces. Additional IP addresses can be assigned by adding them in separate iface sections. The following adds 192.51.100.42 and 192.0.2.23 to eth0 whose primary address is 192.51.100.10:

#/etc/network/interfaces
auto eth0
allow-hotplug eth0
iface eth0 inet static
address 192.51.100.10/24
gateway 192.51.100.1

iface eth0 inet static
address 192.51.100.42/32

iface eth0 inet static
address 192.0.2.23/32
...

Additional IPv6 addresses are configured similarly:

#/etc/network/interfaces
...
iface eth0 inet6 static
address 2001:0db8:2a02:c200:0000:0000:0000:0001/64
gateway fe80::1
accept_ra 0
autoconf 0
privext 0


iface eth0 inet6 static
address 2001:0db8:2a02:c200:0000:0000:0000:0002/64
...

To apply the changes, reboot your server.

Ubuntu (17.10 and above)

In Ubuntu beginning with version 17.10, you can find the network configuration in the file /etc/netplan/01-netcfg.yaml. With this method you can assign additional IPv4 and IPv6 addresses to the interface eth0. Additionally to the main IPv4 address 192.51.100.10 and the first IPv6 address of your IPv6 network, you might configure the additional IPv4 addresses 192.51.100.42 and 192.0.2.23 and the additional  IPv6 addresses 2001:0db8:2a02:c200:0000:0000:0000:0002 and 2001:0db8:2a02:c200:0000:0000:0000:0003 in the area  addresses: below of eth0: . It is important to keep the correct indentation!

#/etc/netplan/01-netcfg.yaml

network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      match:
        macaddress: 00:50:56:3d:c3:aa
      addresses:
        - 192.51.100.10/24
        - 192.51.100.42/24
        - 192.0.2.23/24
        - 2001:0db8:2a02:c200:0000:0000:0000:0001/64
        - 2001:0db8:2a02:c200:0000:0000:0000:0002/64
        - 2001:0db8:2a02:c200:0000:0000:0000:0003/64
      gateway6: fe80::1
      routes:
        - to: 0.0.0.0/0
        via: 192.51.100.1
        on-link: true
      nameservers:
        search: [ invalid ]
        addresses:
          - 79.143.183.251
          - 79.143.183.252
          - 2a02:c205::1:53
          - 2a02:c205::2:53

To apply the changes, please enter the command below and reboot your server:

netplan apply

openSUSE

openSUSE has its network interface configuration files stored under /etc/sysconfig/network/. All settings concerning e.g. eth0 are saved in ifcfg-eth0, additional IPv4 and IPv6 addresses can be added using the pattern IPADDR_1, IPADDR_2, IPADDR_3 etc:

#/etc/sysconfig/network/ifcfg-eth0
...
IPADDR_1='192.51.100.42/32'
IPADDR_2='192.0.2.23/32'
IPADDR_3='2001:0db8:2a02:c200:0000:0000:0000:0002/64'
IPADDR_4='2001:0db8:2a02:c200:0000:0000:0000:0003/64'
...

To apply the changes, reboot your server.

Windows Server 2008, 2012 and 2016

Open the "Network and Sharing Center" and click on "Local Area Connection".

In Windows Server 2016:  Open the "Network and Sharing Center" and click on "Ethernet".

ws2008_01

In the newly opened windows, click on "Properties".

ws2008_02

If you want to add an additional IPv4 address, select "Internet Protocol Version 4 (TCP/IPv4)" and click on "Properties".

ws2008_03

In the newly created windows, click on "Advanced..." and in the following one on "Add..." under "IP addresses"

ws2008_05

Enter the new IP address and its netmask into the dialog and then click "Add".

ws2008_06

The new IP address is now active.

ws2008_07

IPv6 addresses can be added similarly by selecting "Internet Protocol Version 6 (TCP/IPv6)":

ws2008_08

ws2008_09

ws2008_12

ws2008_13

 

4Jul/150

Creating static routes

All traffic in our network has to pass through our core-routers, additionally switch ports are configured in such a way that they only accept ethernet frames with mac addresses originating from these routers. Consequently, no layer-2 traffic is forwarded between switch ports and direct communication between servers, even when on the same subnet, is not possible. If you have multiple servers with us which use IPv4 addresses from the same subnet (usually /24), and you want these servers to exchange traffic between each other, you will have to create static routes on these servers to each other.

The following examples assume that the server with the IPv4 address 192.51.100.10 and the server with the IPv4 address 192.51.100.42 want to communicate with each other.

CentOS

In CentOS, you can add static routes to the route-file of the respective interface. In case of eth0, the file is called route-eth0 and located under /etc/sysconfig/network-scripts/. The below entry on server 192.51.100.10 adds a static to server 192.51.100.42:

#/etc/sysconfig/network-scripts/route-eth0
...
192.51.100.42/32 via 192.51.100.1 dev eth0

Vice versa, the server 192.51.100.42 needs a corresponding route to server 192.51.100.10:

#/etc/sysconfig/network-scripts/route-eth0
...
192.51.100.10/32 via 192.51.100.1 dev eth0

Alternatively, both servers can have a single route added to the whole /24 subnet:

#/etc/sysconfig/network-scripts/route-eth0
...
192.51.100.0/24 via 192.51.100.1 dev eth0

Debian / Ubuntu (until 17.04)

Static routes in Debian and Ubuntu are saved to /etc/network/interfaces. Entries are added to the end of the file or under the iface sections of the respective interface. Assuming the interface to be eth0,  the entry on server 192.51.100.10 would look like this:

#/etc/network/interfaces
...
up ip route add 192.51.100.42/32 via 192.51.100.1 dev eth0
down ip route del 192.51.100.42/32 via 192.51.100.1 dev eth0

On server 192.51.100.42, this would be the static route to 192.51.100.10:

#/etc/network/interfaces
...
up ip route add 192.51.100.10/32 via 192.51.100.1 dev eth0
down ip route del 192.51.100.10/32 via 192.51.100.1 dev eth0

It is also possible to add a static route to the whole /24 on both servers instead:

#/etc/network/interfaces
...
up ip route add 192.51.100.0/24 via 192.51.100.1 dev eth0
down ip route del 192.51.100.0/24 via 192.51.100.1 dev eth0

Ubuntu (17.10 and above)

In Ubuntu beginning with version 17.10, static routes are added to the file /etc/netplan/01-netcfg.yaml . On the server with the IP  192.51.100.10,the entry has to be added in the correct indentation to the network interface, in this case  eth0 . Because of some particularities in Netplan, there are two routes that have to be added for each server ip. Please note the prefixes that that got changed to /25:

#/etc/netplan/01-netcfg.yaml
...
    eth0:
      routes:
        - to: 192.51.100.0/25
          via: 192.51.100.1
        - to: 192.51.100.128/25
          via: 192.51.100.1

Finally it is required to reset the routing table and to apply the changes. Please use the whole command at once to prevent a network connection loss:

ip route flush table main; ip route flush cache; netplan apply

openSUSE

Static routes in openSUSE can be set in /etc/sysconfig/network/routes. On server 192.51.100.10, the static route to 192.51.100.42 is as follows:

#/etc/sysconfig/network/routes
...
192.51.100.42/32 192.51.100.1 - eth0

Conversely, the static route on 192.51.100.42 to 192.51.100.10:

#/etc/sysconfig/network/routes
...
192.51.100.10/32 192.51.100.1 - eth0

As an alternative, both servers can have a static route to the whole /24 subnet:

#/etc/sysconfig/network/routes
...
192.51.100.0/24 192.51.100.1 - eth0

Windows Server

To create a static route under Windows Server 2008 or 2012, please open the "Command Prompt" with administrative privileges. On server 192.51.100.10 enter the following:

route -p add 192.51.100.42 mask 255.255.255.255 192.51.100.1

The corresponding entry on server 192.51.100.42 is:

route -p add 192.51.100.10 mask 255.255.255.255 192.51.100.1

Setting the -p option makes the route persistent across reboots. If the route is meant to be temporary, you may omit -p.

Posted by: Andreas | Tagged as: , , , , No Comments