Posts

Showing posts with the label Linux

Docker : Command to See What Containers Are Running

Image
In our previous blog posts we ran containers with the Fedora and CentOS images.  In this blog we are going to run a command to see which containers are running in our host system.  To get a list of all the containers running on our host Ubuntu system we type in the command docker ps -a command.

Docker : Pull The Latest Fedora Image Into A Ubuntu Server

Image
The beauty of Docker is that you can run a very lightweight image of another Linux distro on your host system.  In this post we will be pulling the latest image of Fedora into our docker container on our Ubuntu server. Step-by-Step: 1. Open the terminal in Ubuntu, then make sure docker is running by typing service docker status, you should see something a message like the image below

Docker : Adding Non Root Users To The Docker Group In Ubuntu

Image
One of the most common task you have to do as a Linux administrator is to add a new user.  Especially developers who always wants root access. Docker needs root access, however the person who is administering Docker is probably not the system administrator.  Most likely it will be the application developer. To accomplish this task you can use the useradd command in the Terminal session then add the new user to the Docker group.  Follow the steps below to add a new user to Ubuntu. 1.  Switch into the root user using  sudo su -  command

Docker : Adding Docker Repository Key and Updating Docker To The Latest Version

Image
In the previous post we installed Docker on our Ubuntu server.  Now we are going to add the Docker repository to our local server so that we can get the latest version of Docker. Step-By-Step Instructions: Open the terminal command line tool and switch to root user with the sudo su command 2. Now we have to add the Docker repo key to our local machine by typing the following command wget -qO- https://get.docker.com/gpg | apt-key add - 3. The next command is to add the Docker repository to the Ubuntu repository source list.  Type the following command into the terminal: echo deb http://get.docker.com/ubuntu docker main > /etc/apt/sources.list.d/docker.list 4.  Now type apt-get update to get the latest updates from the Docker repository.  If you haven't ran update for a while.  This might take a while. 5.  After the update has completed type docker -v to the version number

Installing Docker On CentOS

Image
Docker is the hottest infrastructure technology to hit the tech world in a long time.  The appeal of Docker is that it allows the infrastructure team to utilize the capacity of the servers to near full capacity.  Docker is a container.  A container is like a micro virtualization minus the operating system.  It only contains enough infrastructure to host an app, without the fat.  Hence the term container is used to describe it. Here are the steps to install Docker on a CentOS Server: 1.  Open the CentOS terminal, then type the following command to switch to the super user:       sudo su 2.  Now get the latest update for CentOS by typing yum update 3.  To install Docker type the following command in the terminal     yum install -y docker 4.  Once the installation is complete type following command to start the docker service       systemctl start docker.service , then type systemctl status docker.service ...

Installing Docker On Ubuntu Server

Image
Docker is the hottest infrastructure technology to hit the tech world in a long time.  The appeal of Docker is that it allows the infrastructure team to utilize the capacity of the servers to near full capacity.  Docker is a container.  A container is like a micro virtualization minus the operating system.  It only contains enough infrastructure to host an app, without the fat.  Hence the term container is used to describe it. Here are the steps to install Docker on a Ubuntu Server: 1.  Open the Ubuntu terminal, then type the following command to switch to the super user:       sudo su 2.  Now get the latest update for Ubuntu by typing apt-get update 3.  To install Docker type the following command in the terminal      apt-get install -y docker.io 4.  Once the installation is complete type service docker status Now we have Docker installed and running on Ubuntu.  It was pretty simple wasn't it?

Install CentOS ISO on VirtualBox Part 2 : Install the CentOS Operating System

Image
On the previous blog  we went over how to create a new virtual machine for CentOS in VirtualBox.  In this blog we will go over how to install the CentOS ISO file on the new virtual machine that we've just created. Below are the step by step instructions of how to install CentOS on VirtualBox. Step-By-Step Instructions: 1. Launch VirtualBox, right-click then select "Settings" 2.  Click on "Storage", you will see the disc icon is "Empty" 3.  Select the "Empty" disc icon, the right hand side will change to "CD/DVD Drive", click on the disc icon next to the drive, like the screen shoot below. 4.  Browse to the CentOS ISO file that you've just downloaded in the previous blog.  Select the .iso file then click on the "Open" button. 5.  The disc icon will now have the CentOS iso file mounted, click on the "OK" button 6. In VirtualBox, click, right click on the CentOS machine and click "Start" 7.  An Install...

Install CentOS on VirtualBox Part 3 : Installing the Gnome Desktop Environment

Image
In previous blog we've installed the CentOS operating system on VirtualBox however, when we reboot, it takes us to a text prompt.  In this blog we will be installing a graphical desktop environment to our operating system using "yum".  Follow the steps below to get the Gnome desktop in your CentOS. 1.  Make sure you have internet connection 2.  Click "Start" on your "CentOS" VM 3.  After the boot messages you will be presented with login prompt.  Type in the login name of the Administrator user that you've created on the last blog . 6.  Now type sudo yum groupinstall "GNOME Desktop" without the quotes 7.  Type y when asked "Is this ok [y/d/N] 8. After the Gnome desktop has been installed type reboot now -r to reboot CentOS 9.  After the CentOS has been rebooted, login using the Administrator user and type sudo systemctl set-default graphical.target this step is optional.  You only want to do this if you want to start up CentOS in ...

Install CentOS Part 4 : Adding A New User With useradd and usermod Command

Image
One of the most common task you have to do as a Linux administrator is to add a new user.  Especially developers who always wants root access.  To accomplish this task you can use the useradd command in the Terminal session.  Follow the steps below to add a new user to CentOS. 1.  Switch into the root user using su - command 2. Type the following command useradd -s  /bin/bash -d /home/john -m john then press "Enter" useradd is the command to add a new user to CentOS, below is an explaination of what each switch means in the command above -s --shell SHELL - the login shell of the new account, which is the/bin/bash shell -d --home-dir HOME_DIR - home directory of the new account, which is /home/john 3.  Type ls /home to list the content of the /home directory and you will see the john directory has been created for the user john 4.  We've created a new user name john, but he has no password, to set a password for john we can use the passwd command. ...