Introduction

Unbound is a validating, recursive, and caching DNS server. Having said that, Unbound DNS server cannot be used as an authoritative DNS server, which means it cannot be used to host custom domain name records. As a result, if your goal is to build a cache-only or forwarding DNS server, Unbound may be your preferred choice, as it does just that and it does it well.

Objective

The objective is to provide quick and easy to follow installation and configuration guide for the Unbound cache-only DNS server on Redhat 7 Linux. At the end of this guide you will be able to use Unbound DNS server from all clients on your local area network.

Requirements

Privileged access to your Redhat 7 Linux server with configured standard RedHat repositories.

Difficulty

MEDIUM

Conventions

  • # - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
  • $ - requires given linux commands to be executed as a regular non-privileged user

Instructions

Unbound and DNS tools installation

In the first step we are going to install the actual Unbound DNS server as well as DNS tools which will be eventually used to test your DNS cache-only server configuration. Given that you have your Redhat repository configured correctly you can install both by executing the following linux command:
# yum install unbound bind-utils

Objective

The objective is to permanently disable a last login message after user terminal or ssh login on Redhat Linux. Example:
$ ssh This email address is being protected from spambots. You need JavaScript enabled to view it.
This email address is being protected from spambots. You need JavaScript enabled to view it.'s password: 
Last login: Tue Dec  6 11:23:11 2016 from 10.1.1.3
rhel linux last login message disable or clear

Requirements

Privileged access to your Redhat Linux server.

Difficulty

EASY

Conventions

  • # - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
  • $ - requires given linux commands to be executed as a regular non-privileged user

Instructions

Single user

To permanently suppress a Last Login message as per on user basis, create a hidden .hushlogin file inside a user's home directory. For example to suppress a Last Login message for a linuxconfig user run:
# touch /home/linuxconfig/.hushlogin

Objective

By default the regular user does not have an ability to execute commands with root privileges. As a result the following message will appear:
$ sudo -i
[sudo] password for linuxconfig: 
linuxconfig is not in the sudoers file.  This incident will be reported.
redhat 7 user not in sudoers file
The objective is to gain a superuser ( root ) access on Redhat 7 Linux server using sudo command.

Requirements

Privileged root access to your Redhat 7 Linux server installation.

Difficulty

EASY

Conventions

  • # - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
  • $ - requires given linux commands to be executed as a regular non-privileged user

SUBSCRIBE TO NEWSLETTER
Subscribe to Linux Career NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials.


Instructions

Add user to WHEEL group

Using your current shell or log in as a root user execute the following linux command to add any user you wish to grant a sudo access. The example below will give a sudo access to linuxconfig user:
# usermod -G wheel linuxconfig

Objective

The objective is to instruct Gnome Desktop Manager to automatically login a specified system user.

Requirements

Privileged access to your CentOS 7 installation and existing user account to enable Automatic login upon.

Difficulty

EASY

Conventions

  • # - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
  • $ - requires given linux commands to be executed as a regular non-privileged user

Instructions

Update GDM settings

Add the following stanza into a [daemon] section of your /etc/gdm/custom.conf while replacing keyword "linuxconfig" with a username of your autologin user:
[daemon]
AutomaticLogin=linuxconfig
AutomaticLoginEnable=True

Objective

The objective is to install KDE desktop environment on a minimal CentOS 7 installation.

Requirements

Privileged access to CentOS 7 system installation and Internet access or configured local CentOS 7 package repository. Furthermore, the guide assumes that you have already performed a CentOS 7 Linux installation.

Difficulty

EASY

Conventions

  • # - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
  • $ - requires given linux commands to be executed as a regular non-privileged user

Instructions

Install Group packages

Use yum command to install KDE and X Window System group packages
# yum groupinstall 'KDE' 'X Window System'

Objective

Resetting the root password in RHEL7/CentOS7/Scientific Linux 7

Requirements

RHEL7 / CentOS7 / Scientific Linux 7

Difficulty

MODERATE

Instructions

Things have changed in the RHEL7 world and so has the preferred way of resetting the root password. Although the old way of interrupting the boot process (init=/bin/bash) still works, it is no longer bulletproof and recommended. 'Systemd' uses 'rd.break' to interrupt the boot. Let's have a quick walk through the whole procedure.

Introduction

If your Redhat server is not connected to the official RHN repositories, you will need to configure your own private repository which you can later use to install packages. The procedure of creating a Redhat repository is quite simple task. In this article we will show you how to create a local file Redhat repository as well as remote HTTP repository.

Using Official Redhat DVD as repository

After default installation and without registering your server to official RHN repositories your are left without any chance to install new packages from redhat repository as your repository list will show 0 entries:

# yum repolist
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
repolist: 0

Official archive signing keys for CentOS 7 are located inside /etc/pki/rpm-gpg/ directory:
# ls /etc/pki/rpm-gpg/
RPM-GPG-KEY-CentOS-7  RPM-GPG-KEY-CentOS-Debug-7  RPM-GPG-KEY-CentOS-Testing-7

Symptoms

Any attempt to play video will result in an error:
Movie Player requires additional plugins to decode this file. The following plugins are required : MPEG-4-AAC decoder and H.264 decoder
The following plugins are required : MPEG-4-AAC decoder and H.264 decoder - CentOS 7
The offered help for search also fails.

This guide will discuss a procedure on how to connect/establish a VPN connection using PPTP protocol on CentOS 7 or Redhat 7 Linux the non-GUI way. Below you can find connection details which will be used as an example. Replace the bellow PPTP VPN information to align with your PPTP VPN server settings:
  • Connection name: linuxconfig ( can be any descriptive name )
  • VPN connetion type: PPTP
  • PPTP VPN server IP or domain: 123.123.1.1
  • CHAP Username: admin
  • CHAP User password: 00000000

Configuration

Let's begin by installation of PPTP client:
# yum install pptp

This config will describe a procedure on how to persistently load kernel modules during a boot time on CentOS or Redhat Linux system. In the below commands will use nf_conntrack_pptp as a sample module. Replace the name of this module with a module name you wish to load.

First, create a script within /etc/sysconfig/modules/ directory with a file extension modules. Where the name of the script can be any name of your choice. In our case the script will be called nf_conntrack_pptp.modules. Enter a following code into your new nf_conntrack_pptp.modules script while replacing the name of the module with the one you wish to load:
#!/bin/sh
exec /sbin/modprobe nf_conntrack_pptp  >/dev/null 2>&1

Every time you update your CentOS Linux and the update includes a new kernel image update the system will not remove your old kernel but it will cumulatively add new kernel to the top of your Linux kernel installed list. Normally, this does not present any issue to your running system and you are not required to take any action to remove any old and unused kernel images.

The reason why you may wish to remove/uninstall unused kernel images is that you need to reduce disk usage space of your system, especially if your /boot mount point is mounted separately and has a limited disk space
$ df -h /boot/
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       331M  198M  112M  64% /boot

The following linux commands will help you to install Amazon s3cmd Command Line S3 tool on CentOS Linux.
First, enable EPEL repository:
# wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
# rpm -Uvh epel-release*.rpm

debootstrap is Debian GNU/Linux bootstrapper which allows you to install Debian base systems such as Debian or Ubuntu into a directory of your currently running system. This config is a getting started guide on how to debbootstrap on CentOS/RHEL. The debootstrap package is not available in a standard CentOS repository. To make it available we first need to enable EPEL repository. Download EPEL repository package:
# wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
and install it using RPM command:
# rpm -Uvh epel-release-7-5.noarch.rpm
The EPEL repository should now be enabled. To confirm run:
# yum repolist | grep epel                                                                                  
 * epel: epel.mirror.digitalpacific.com.au

In order to disable YUM package repository on CentOS we first need to get a unique repository ID using the following yum command:
# yum repolist
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.optus.net
 * epel: epel.mirror.digitalpacific.com.au
 * extras: mirror.ventraip.net.au
 * updates: mirror.optus.net
repo id              repo name                                            status
base/7/x86_64        CentOS-7 - Base                                      8,652
epel/x86_64          Extra Packages for Enterprise Linux 7 - x86_64       8,935
extras/7/x86_64      CentOS-7 - Extras                                      285
google-chrome        google-chrome                                            3
isv_ownCloud_desktop The ownCloud Desktop Client (CentOS_7)                  63
updates/7/x86_64     CentOS-7 - Updates                                   1,726
virtualbox/7/x86_64  Oracle Linux / RHEL / CentOS-7 / x86_64 - VirtualBox    13

FIND LATEST LINUX JOBS on LinuxCareers.com
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.

You may also be interested in: