Posts

Showing posts with the label CentOS

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 CentOS 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 CentOS 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

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 ...

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. ...

Installing CentOS in Oracle VirtualBox Part 1: Create a New Virtual Machine For CentOS

Image
If you want to know your way around Red Hat Enterprise Linux distribution, but the you don't have the financial ability to obtain a license.  CentOS is your best bet get to the the Red Hat Enterprise Linux official experience.  Because CentOS is a binary capatible version of Red Hat Enterprise Linux.  Meaning all the things that matters are the same, only the branding and logos are different.  CentOS is open sourced and can be downloaded for free.  Although it might be a couple of versions behind Red Hat Enterprise Linux.  But, you should be able to perform everything you can with CentOS that you can with Red Hat Enterprise.  Below is a step by step instruction on how to install CentOS in Oracle VirtualBox. Step-By-Step Instructions: 1.  Type http://centos.org in your browser 2.  Click on the "Get CentOS Now" button   3.  Click on "DVD ISO" 4.  Select the mirror site that is closest to you, or whatever fancies you, then save ...