How To Install Docker on Centos 7 and Red Hat 7

Hello friends, I’m starting some posts referring to a Docker.
During the next months, we will make an update more frequent, all of us who have a suggestion please send an email to: geraldo@techpoli.info.

Introduction:

Docker is a software technology providing containers, promoted by the company Docker, Inc. Docker provides an additional layer of abstraction and automation of operating-system-level virtualization on Windows and Linux. Docker uses the resource isolation features of the Linux kernel such as cgroups and kernel namespaces, and a union-capable file system such as OverlayFS and others to allow independent “containers” to run within a single Linux instance, avoiding the overhead of starting and maintaining virtual machines.

The Linux kernel’s support for namespaces mostly isolates an application’s view of the operating environment, including process trees, network, user IDs and mounted file systems, while the kernel’s cgroups provide resource limiting, including the CPU, memory, block I/O, and network. Since version 0.9, Docker includes the libcontainer library as its own way to directly use virtualization facilities provided by the Linux kernel, in addition to using abstracted virtualization interfaces via libvirt, LXC (Linux Containers) and systemd-nspawn.

Step 1: Installation of Docker

As a matter of best practice we’ll update our packages:

yum -y update

Now run this command. It will add the official Docker repository, download the latest version of Docker and install it:

curl -fsSL https://get.docker.com/ | sh

Step 2: Start the docker and configure to start with the operating system.

Set the Docker service to start at boot:

systemctl enable docker

Then start the Docker service:

systemctl start docker

And verify your work by checking the status of Docker:

systemctl status docker

Step 3: Download Container

Download the centos Docker image:

Note you can choose any system like Ubuntu or Debian.

docker pull centos

Step 4: Run Container

As an example, let’s run a container using the latest image of CentOS. The combination of the -i and -t switches gives you interactive shell access into the container:

docker run -i -t centos /bin/bash

You are now using a docking dock inside a docker centos.

To disconnect or detach from the shell without exiting, use a string of Ctrl + Ctrl-p + Ctrl-q.

There are many community containers already available that can be found through a survey. On the command below, I look for a Ubuntu keyword:

docker search ubuntu:17.04

Friends, that’s all.
We will continue with more advanced articles on docker.

Continue Reading

How to install MailServer Zimbra on Centos 7

Disabled SELINUX

# vim /etc/sysconfig/selinux

Change enforcing to disabled :

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

Stop any MTA services installed in the server

# systemctl stop postfix
# systemctl disable postfix
# systemctl stop sendmail
# systemctl disable sendmail

Update the OS

# yum update -y

Install the required packages and libraries by issuing the following command :

#yum install perl perl-core ntpl nmap sudo libidn gmp libaio libstdc++ unzip sysstat sqlite -y

Extract the downloaded tar file :

Using the following command you can extract the tar file, We downloaded in previous step

wget https://files.zimbra.com/downloads/8.6.0_GA/zcs-8.6.0_GA_1153.RHEL7_64.20141215151110.tgz
tar xzf zcs-8.6.0_GA_1153.RHEL7_64.20141215151110.tgz

Go to extracted ZCS Open Source Edition :

cd zcs-8.6.0_GA_1153.RHEL7_64.20141215151110

Instal Zimbra.

./install.sh
Continue Reading