November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

MOUNTING ISO FILES WITHIN RHEL

Download the ISO file using wget.

[root@memberserver ~]# cd tmp;wget http://cdimage.debian.org/debian-cd/7.6.0/multi-arch/iso-cd/debian-7.6.0-amd64-i386-netinst.iso Create a directory which you will use to mount the ISO file to.

[root@memberserver ~]# mkdir /isodir Edit the /etc/fstab as per the below entry:

[root@memberserver ~]# vi /etc/fstab /tmp/debian-7.6.0-amd64-i386-netinst.iso /isodir iso9660 defaults,loop 0 0 Run partprobe to make the kernel aware of the […]

ADDING A GATEWAY ADDRESS

[root@slave network-scripts]# nmcli con show –active NAME UUID TYPE DEVICE CocoChopper e8f14903-4b12-44b2-9e15-a9d47c720d14 802-3-ethernet enp0s3 hostonly febb8ba7-a989-40a7-8683-53388f70da39 802-3-ethernet enp0s8 In /etc/sysconfig/network-scripts, there will be a ifcfg-CocoChopper file which will need to be modified.

[root@slave network-scripts]# cat ifcfg-enp04 TYPE=Ethernet BOOTPROTO=dhcp DEFROUTE=yes PEERDNS=yes PEERROUTES=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_PEERDNS=yes IPV6_PEERROUTES=yes IPV6_FAILURE_FATAL=no NAME=enp04 UUID=e8f14903-4b12-44b2-9e15-a9d47c720d14 DEVICE=enp0s3 ONBOOT=yes We can now […]

RESTRICTING NETWORK ACCESS WITH IPTABLES

The first thing is to install the iptables-services.x86_64 package.

[root@slave ~]# yum -y install iptables-services.x86_64 In this example, we will be blocking traffic from the 10.10.0.0/8 network.

[root@slave ~]# iptables -A INPUT -s 10.10.0.0/8 -j REJECT [root@slave ~]# service iptables restart Redirecting to /bin/systemctl restart iptables.service Verify that the network is being blocked by issuing […]

CREATING A SWAP PARTITION IN RHEL

In this demonstration, I will be adding at 2GB swap partition to /dev/sdb.

You can identify the relevant disk which you wish to add the swap partition to from issuing the following command:

[root@slave ~]# fdisk -l To add the swap partition, rerun the fdisk command with the relevant disk location:

[root@slave ~]# fdisk /dev/sdb […]

HOW TO CREATE LVM USING PVCREATE, VGCREATE, LVCREATE, AND LVEXTEND COMMANDS

HOW TO CREATE LVM USING PVCREATE, VGCREATE, LVCREATE, AND LVEXTEND COMMANDS

What is LVM?

LVM is a tool for logical volume management which includes allocating disks, striping, mirroring and resizing logical volumes. With LVM, a hard drive or set of hard drives is allocated to one or more physical volumes.

How to setup LVM in […]

SETTING UP A LOCAL NFS SERVER

On the NFS Server, we will need to install the following packages:

yum -y install portreserve quota rpcbind nfs4-acl-tools.x86_64 nfs-utils.x86_64 # service rpcbind start # chkconfig rpcbind on # service nfs start # chkconfig nfs on The next step is to make the physical mount point (in this example, it’s /ilovecoco). We then need to […]

CONNECT RHEL7 TO AN OPEN LDAP SERVER

e LDAP server will be named instructor.example.com in this procedure.

Install the following packages:

# yum install -y openldap openldap-clients openldap-servers migrationtools net-tools.x86_64 Generate a LDAP password from a secret key (using redhat):

# slappasswd -s redhat -n > /etc/openldap/passwd Generate a X509 certificate valid for 365 days:

# openssl req -new -x509 -nodes -out […]

Install NFS on the LDAP Server

We need to install NFS on the LDAP server. Note: it’s not required to have the LDAP server and the NFS server on the same machine, it’s only easier.

The first step is to install all the necessary packages for NFS. Once these packages are installed, each package needs to be enabled and started.

# […]

HOW TO SETUP THE NTP SERVICE IN RHEL7

Install the NTP package:

# yum install -y ntp Activate the NTP service at boot:

# systemctl enable ntpd Start the NTP service:

# systemctl start ntpd The NTP configuration is in the /etc/ntp.conf file.

To quickly synchronize a server, type:

# systemctl stop ntpd # ntpdate ntp.internode.on.net 5 Jul 10:36:58 ntpdate[2190]: adjust time server […]

Redhat 7.2 Reset Password

Edit grub2 boot menu, press e key for edit.

Move your cursor ( HINT: move to end of the line with CTRL+E ) on rhgb quiet keywords and replace them with init=/bin/bash Once you edit the boot line as show above press CTRL + x to start booting your system into a single mode.

# […]