Professional Documents
Culture Documents
INSTRUCTIONS
Gateway: 172.25.X.254
Note: X is your foundation number.
The hostname of your machine should be desktopX.example.com where X is your foundation number.
Method 2: nmtui
#nmtui -> edit a connection -> go to edit option
change the ipv4 address to static, set ipv4 & subnet in the same field, set gateway &
DNS in corresponding field, navigate by using arrow key and press OK, press Quit
#systemctl restart network
#systemctl enable network
#ip addr show
Method 3: nmcli
#nmcli connection show
#nmcli connection modify “system eth0” ipv4.addresses “172.25.0.10/24 172.25.0.254”
i pv4.method manual
#nmcli connection modify “connection eth0” ipv4.method
#nmcli connection modify “system eth0” ipv4.dns “172.25.254.254”
#systemctl restart network
#systemctl enable network
#ip a -> verify addresses
#groupadd sysadmin
#useradd brownie
#getent group developers -> verify the group ‘developers’ exist. If there is no output,
then the group does not exist; if it gives any output then the group exist).
#groupadd developers
#usermod –aG developers brownie
#id brownie -> verification
#usermod –aG developers hari
#id hari (or) getent group hari
#useradd –s /sbin/nologin achu
#pvcreate /dev/vdb5
#vgcreate –s 16M myvg /dev/vdb5
#lvcreate myvg –l 14 –n mylv
#pvdisplay -> verification
#mkfs.ext3 /dev/myvg/mylv
#mkdir /mnt/database
#vim /etc/fstab
/dev/myvg/mylv /mnt/database ext3 defaults 0 0
#mount –a
#df –h -> verificat
verification
ion
#mkdir –p /mnt/data
#chgrp developers /mnt/data
#chmod g+s /mnt/data
#touch /mnt/data
/mnt/data/f1
/f1 -> verification
#ll /mnt/data
#chmod 775 /mnt/data
#chmod 770 /mnt/data (or)
#setfacl –m o::--- /mnt/data
#getfacl /mnt/data
#vim /etc/yum.repos.d/kernel.repo
/etc/yum.repos.d/kernel.repo
[kernel]
Name = installing kernel
baseurl =
= http://content.example.com/rhel7.0/x86_64/errata
gpgcheck = 0
enabled = 1 :wq !
#yum clean all
#uname –r -> verify the current version of kernel
#yum repolist
#yum install –y kernel*
#fdisk /dev/vdb
.cmd (m for help): n
.first sector: enter
.last sector: +250M
.cmd (m for help): t
.hexacode: 82
.cmd: w
#partprobe
#mkswap /dev/vdb6
#vim /etc/fstab
/dev/vdb6 swap swap defaults 0 0
#swapon –a
#tar –cfj /root/myba
/root/mybackup.tar.bz2
ckup.tar.bz2 /etc [#tar –help]
17) AUTOFS
The home directory of LDAP users is shared via NFS. The classroom.example.com (172.25.254.254)
shares home directory of ldapusers via NFS. Mount /home/guests/ldapuserX to your system, where X
is your foundation number. The ldapuserX’s home directory is at
classroom.example.com:/home/guests/ldapuserX. The ldapuserX’s home directory should be
automatically beneath /home/guests. The home directories must be writable by their users.
#showmount –e 172.25.254.254
#yum install –y autofs.x86_64
#systemctl restart autofs
#systemctl enable autofs
#vim /etc/auto.master.d/new.a
/etc/auto.master.d/new.autofs
utofs
/home/guests /etc/auto.misc
/etc/auto.mi sc :wq!
#vim /etc/auto.misc
/etc/auto.misc
ldapuser0 -rw classroom.example.com:/home/guests/
classroom.examp le.com:/home/guests/ldapuser
ldapuser00