Welcome To: Disk Management and Run Levels
Welcome To: Disk Management and Run Levels
Module 8
• systemd is the new service manager in CentOS/RHEL 7 that manages the boot
sequence
• Steps:
• Create a new file in /etc/profile.d/motd.sh
• Add desired commands in motd.sh file
• Modify the /etc/ssh/sshd_config file to edit
#PrintMotd yes to PrintMotd no
• Restart sshd service
• systemctl restart sshd.service
• Local Storage
• SAN (Storage Area Network)
• NAS (Network Attached Storage)
C:
D:
E:
/oracle = 1.0G
/oracle = Full
Few Options:
• Delete older files to free up disk space
• Add new physical disk mount to /oracle2
• Create a new virtual disk and mount to /oracle2
• Or extend /oracle through LVM.
If M < 2
then S = M *2
Else S=M+2
• Commands
• dd
• mkswap
• swapon or swapoff By: Imran Afzal
RAID
• RAID (Redundant Array of Independent Disks)
• Type of RAID
• RAID0
• RAID1
• RAID5
5 5 5 5 5 5 5
+ 5+5=10G = 5,5=5G + + 5+5+5=12G
= =
• dd is a command-line utility for Unix and Unix-like operating systems whose primary
purpose is to convert and copy files
• As a result, dd can be used for tasks such as backing up the boot sector of a hard
drive, and obtaining a fixed amount of random data
• Please note the source and destination disk should be the same size
By: Imran Afzal
System Backup (dd Command)…
• To backup or clone an entire hard disk to another hard disk connected to the
same system, execute the dd command as shown
• Restoring this image file to other machine after copying the .img
# dd if=/root/sda1.img of=/dev/sdb3
NFS Request
Server Client
Network File System (NFS)…
Steps for NFS Server Configuration
• It works exactly like NFS but the difference is NFS shares within Linux or Unix
like system whereas Samba shares with other OS (e.g. Windows, MAC etc.)
• For example, computer “A” shares its filesystem with computer “B” using Samba
then computer “B” will see that shared filesystem as if it is mounted as the local
filesystem
Approved
mount request
Server Client
Samba (smb vs. CIFS)
• Samba shares its filesystem through a protocol called SMB (Server Message
Block) which was invented by IBM
• Another protocol used to share Samba is through CIFS (Common Internet File
System) invented by Microsoft and NMB (NetBios Named Server)
• CIFS became the extension of SMB and now Microsoft has introduced newer
version of SMB v2 and v3 that are mostly used in the industry
• In simple term, most people, when they use either SMB or CIFS, are talking
about the same exact thing
Samba Installation and Configuration
• Take snapshot of your VM
• Install samba packages
• Enable samba to be allowed through firewall (Only if you have firewall running)
• Disable firewall
• Create Samba share directory and assign permissions
• Also change the SELinux security context for the samba shared directory
• Or disable SELinux
• Modify /etc/samba/smb.conf file to add new shared filesystem
• Verify the setting
• Once the packages are installed, enable and start Samba services (smb and nmb)
• Mount Samba share on Windows client
• Mount Samba share on Linux client
• Additional instructions on creating secure Samba share.
Difference Between CentOS/RHEL 7 and 8
• Red Hat Enterprise Linux 8 (RHEL 8) is now available for production use with lots of
developer-friendly capabilities
• RHEL 8 official release by Red Hat Inc, was announced on May 7, 2019
• I will cover only what is changed and what you should in terms of my Linux course
RHEL 8 RHEL 7
General Availability Date 14-Nov-18 10-Jun-14
Code Name Ootpa Maipo
Kernel Version 4.18 3.10.0-123
End of Support May-2029 30-Jun-2024
Last Minor Release 8.x 7.7
Network Time Synchronization Only Chrony Chrony and ntpd
GUI Interface (Desktop) Gnome 3.28 Gnome 3
MySQL 8.0, MariaDB 10.3,
Default Database PostgreSQL 10 and 9.6, and MariaDB
Redis 5.0
Difference Between CentOS/RHEL 7 and 8
RHEL 8 RHEL 7
Firewalld, it uses nftables Firewalld, it uses Iptables
Default Firewall
framework in the backend framework in the backend