Install Debian 10 server

After Installation

Setting static Network interfaces

$ sudo nano /etc/network/interfaces

auto ens18
iface lo inet loopback

auto ens18
iface ens18 inet static
  address 192.168.0.2
  netmask 255.255.255.0
  gateway 192.168.0.1
  dns-nameservers 89.207.128.252 89.207.130.252

Restart network service

$ sudo systemctl restart networking

install ssh service

sudo apt update
sudo apt install openssh-server
$ sudo systemctl status ssh

Enable ssh root

Open /etc/ssh/sshd_config and change the following line:

FROM:
PermitRootLogin without-password
TO:
PermitRootLogin yes

Restarta ssh service
# /etc/init.d/ssh restart

Docker Centos 8

Installation Steps of Docker CE on CentOS 8/RHEL 8 Server

Step:1) Enable Docker CE Repository

[root@docker-ce ~]# dnf config-manager –add repo=https://download.docker.com/linux/centos/docker-ce.repo

Step:2) Install Docker CE using dnf command

[root@docker-ce ~]# dnf repolist -v

or

[root@docker-ce ~]# dnf list docker-ce –showduplicates | sort -r

Step:3) Install Docker CE using dnf command

Error:
Problem: package docker-ce-3:19.03.5-3.el7.x86_64 requires containerd.io >= 1.2.2-3, but none of the providers can be installed

Install the latest available containerd.io package manually

[root@docker-ce ~]# dnf install https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm

After the package is installed, we can simply install the latest docker-ce

[root@docker-ce ~]# dnf install docker-ce

Whatever method we use to install docker-ce, as said before, in order to make DNS resolution work inside Docker containers, we must disable firewalld (a system reboot may be also needed):

$ sudo systemctl disable firewalld

Start and enable the docker daemon

Once docker-ce is installed, we must start and enable the docker daemon, so that it will be also launched automatically at boot. The command we need to run is the following:

$ sudo systemctl enable --now docker

At this point, we can confirm that the daemon is active by running:

$ systemctl is-active docker
active

Similarly, we can check that it is enabled at boot, by running:

$ systemctl is-enabled docker
enabled

Installing docker-compose

Docker compose is a very useful package which let us manage multi-container applications, like for example those based on the LAMP stack, where each part of the environment (PHP, Apache, MariaDB) is provided by a dedicated container (if you are interested in the subject, take a look at our tutorial about creating a docker-based lamp stack). The package is not available on Rhel8, nor an equivalent exists to be used with the Rhel tools. It’s, however, possible to install it in many ways: just keep on reading and decide what suits you best.

Global installation

The way we should install docker-compose varies depending on whether we want to install it globally or just for a single user. At the moment of writing, the only way to install it globally is to download the binary from the github page of the project:

$ curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o docker-compose

Once the binary is downloaded, we move it into /usr/local/bin and we make it executable:

$ sudo mv docker-compose /usr/local/bin && sudo chmod +x /usr/local/bin/docker-compose

The /usr/local hierarchy is not chosen randomly. This directory structure is made to be used for files installed by the local administrator manually (for software compiled from source, for example), in order to ensure separation from the software installed with the system package manager.

Although it’s possible for a normal user to run docker-related commands if he is part of the docker group (the group is automatically created when we install docker-ce), by default they must be executed with root privileges for security reasons. When we need to do the latter, since the /usr/local/bin directory is not in the root user’s PATH, we either need to call the binary specifying its location or add /usr/local/bin to the PATH itself. The first option is the one which I recommend in this case.

Per-user installation

If our user is part of the docker group, and thus it is allowed to run docker commands, and since docker-compose is available as a python package, we can also install it using pip, the python package manager. First, make sure pip itself is installed:

$ sudo dnf install python3-pip

To obtain docker-compose we run:

$ pip3.6 install docker-compose --user


Please notice that even if would be possible to run pip as root to install a package globally, this is not recommended and highly discouraged.

Testing docker

We installed docker and docker-compose, now to check that everything works as expected, we can try to build an image and run a container: in this case we will use the official httpd one. All we have to do is to launch the following command:

sudo docker run --rm --name=linuxconfig-test -p 80:80 httpd

Since the httpd image does not exists locally it will be automatically fetched and built. Finally, a container based on it will be launched in the foreground (it will be automatically removed when stopped). We should be able to see the It works! message when we reach our machine ip via browser.

Conclusions

Red Hat Enterprise Linux 8 does not support Docker: on this distribution it has been replaced by Red Hat own tools like buildah and podman, which are compatible with Docker but don’t need a server/client architecture to run. Using native tools, where possibile, is always the recommended way to go, but for a reason or another you may still want to install the original Docker. In this tutorial, we saw how it is possible to install Docker CE on Rhel8, by using the official Docker repository for CentOS7, which is a 100% compatible clone.

Proxmox VE 6.1.1 Installation

Installation Proxmox VE 6.1.1

(soon)

Thing to do After Proxmox 6.1.1 Installation

Screen Shot 2018-01-27 at 3.02.18 PM

Here are alternative step by step instructions so you can understand what the above command is doing:
Change to working directory

cd /usr/share/javascript/proxmox-widget-toolkit
Make backup of file

cp proxmoxlib.js proxmoxlib.js.bak
Edit the file

nano proxmoxlib.js
Locate this line of code inside the file (use ctrl+w in nano)

if (data.status !== ‘Active’) {
Replace it with this

if (false) {
Restart the Proxmox service (also be sure to clear your browser cache, depending on the browser you may need to open a new tab or restart the browser)

systemctl restart pveproxy.service

root@vm03:~# pvecm status
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_ADDRESS = “id_ID.UTF-8”,
LC_NAME = “id_ID.UTF-8”,
LC_MONETARY = “id_ID.UTF-8”,
LC_PAPER = “id_ID.UTF-8”,
LC_IDENTIFICATION = “id_ID.UTF-8”,
LC_TELEPHONE = “id_ID.UTF-8”,
LC_MEASUREMENT = “id_ID.UTF-8”,
LC_TIME = “id_ID.UTF-8”,
LC_NUMERIC = “id_ID.UTF-8”,
LANG = “en_US.UTF-8”
are supported and installed on your system.
perl: warning: Falling back to a fallback locale (“en_US.UTF-8”).

export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
dpkg-reconfigure locales

root@vm03:~# apt-get update
Hit:1 http://security.debian.org buster/updates InRelease
Hit:2 http://ftp.debian.org/debian buster InRelease
Get:3 http://ftp.debian.org/debian buster-updates InRelease [49.3 kB]
Err:4 https://enterprise.proxmox.com/debian/pve buster InRelease
401 Unauthorized [IP: 66.70.154.81 443]
Reading package lists… Done
E: Failed to fetch https://enterprise.proxmox.com/debian/pve/dists/buster/InRelease 401 Unauthorized [IP: 66.70.154.81 443]
E: The repository ‘https://enterprise.proxmox.com/debian/pve buster InRelease’ is not signed.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

root@vm03:~# nano /etc/apt/sources.list.d/pve-enterprise.list

File : /etc/apt/sources.list.d/pve-enterprise.list

#deb https://enterprise.proxmox.com/debian/pve buster pve-enterprise

root@vm03:~# apt-get update
Hit:1 http://ftp.debian.org/debian buster InRelease
Hit:2 http://ftp.debian.org/debian buster-updates InRelease
Hit:3 http://security.debian.org buster/updates InRelease
Reading package lists… Done