Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
BY SARAVANAN.C (919688798896)
Set hostname
Set IP Address
yum repo
SELinux Enforcing
new password:
confirm password:
sh] touch /autorelabel
search for Linux16 string and press end key and add this line
exit
rd.break console=tty
press ctl+x to save and restart
#root: mount -o remount,rw /sysroot
#chroot /sysroot/
sh] passwd
exit
Setting hostname
Setting hostname
#hostname (or) #cat /etc/hostname
displays the current hostname
Change host temporarily
#host newhostname
change host permanently
#hostctl set-hostname newhostname
Setting IP Address
Using nmcli
Activate connection
Setting IP
Can be in 3 ways
adding connection
Restart network
To check
set dns
#ifconfig
#nmcli connection modify as ip4.dns 172.25.6.8
manual assign
Using nmtui
#nmtui
#cat /etc/resolv.conf
1 . swap partition
#fdisk -l
:n
#fdisk /dev/vda
default(first sector)
e or p (extended or primary)
:e
default(first sector)
default(last sector)
#mkswap /dev/vda2
#mkdir /test
#vim /etc/fstab
/dev/vda2 /test swap swap defaults 0 0
#swapon -a
#mount -a
#df -h
/dev/vda2 /test
100M
# date -d +1month
#passwd ashwin
#cat /etc/passwd
# chage -l ashwin
#groudadd sysmanager
#passwd kaviya
#su - kayiva
Not allowed
3 . Crontab
Set cronjon for user to /bin/echo string at h:m
#crontab -e -u username
#vim /etc/cron.deny
m h * * * /bin/echo "string"
ashwin
#crontab -e -u ashwin
or
#chmod 770 /a/b
sets read,write to group sysmanger and other no
permission to access /a/b
#chmod g+s /a/b
sets group permission automatically when files created
in that directory
5 . LDAP
Autofs
Setting LDAP
#yum install authconfig-gtk* ssd* krb5* -y
#authconfig-gtk
#vim /etc/auto.misc
ldapuserx -rw,sync,nfvers=3 servername:/rhome/ldapuserx
#systemctl restart autofs
#systemctl enable autofs
#su - ldapuserx #ls
#cd ldapuserx
6 . LVM
LVM reduce
LVM Increase
#lvdisplay
#lvdisplay
#vim /etc/fstab
#vim /etc/fstab
#umount /dev/vgname/vo
#umount /dev/vgname
#e2fsck -f /dev/vgname/vo
#e2fsck -f /dev/vgname
#resize2fs -p /dev/
#mount /dev/vgname
#mount /dev/vgname
#lvdisplay
#lvdisplay
#df -h
#df -h
7 . LVM creation
Convert volume to filesystem
Creating physical volume
#fdisk -l
:n
#pvcreate /dev/vdb4
#fdisk /dev/vda
default(first sector)
e or p (extended or primary)
#lvcreate -l 35 -n volname
/dev/mapper/vgname
:e
Display volume
default(first sector)
#lvdisplay
default(last sector)
#mkfs.ext3
/dev/mapper/vgnanme/volna
me
#mkfs.vfat
/dev/mapper/vgname/volnam
#vgcreate -s 8M vgname /dev/vdb4
e
Creating volume
Kernel Update
download the file from the given url using ezlink
#rpm -vh package name
#reboot
NTP Service
#vim /etc/chrony.conf
add the source url given the question for NTP
Compression methods:
tar
#tar -cvf /destionationpath/filename.tar /source path
bz2
#tar -cvjf /destionationpath/filename.bz2 /source path
gz
#tar -cvzf /destionationpath/filename.gz /source path
xz
#tar -cvJf /destionationpath/filename.xz /source path
#reboot