Professional Documents
Culture Documents
Open Office
Open Office
#passwd username
change ip-add
#system-config-network
change hostname
#vim /etc/sysconfig/network
set base.repo file
#vim /etc/yum.repos.d/base.repo
#reboot
#iptables -L
#lokkit disabled
#lokkit selinux=permissive
1.LVM
Resize your LVM /home to 150MB
I)Reduce
#umount /home
#e2fsck -f /dev/vol0/home
#resize2fs /dev/vol0/home 150M
#lvreduce -L 150M /dev/vol0/home
#mount -a
#df -h
II)Extend
#lvextend -L 300M /dev/vol0/home
#resize2fs /dev/vol0/home
2.Usermgmt
Create a group sysadmin .Create users susan , natasha & harry .
Users susan & harry should be a part of the sysadmin group.natasha should not be a part of
that
group and she is given an non interactive shell.password of all users are password
#groupadd sysadmin
#useradd -G sysadmin harry
mget kernal-*
bye
#rpm -ivh kernel-*
#vim /etc/grub.conf
defaults=0
Restart and press up n down key before extracting
9.cron
Add a cron job for the user jane /bin/echo hiya .
This job should run every day at 1:30 .
#crontab -e -u jane
30 1 * * * /bin/echo hiya
:wq!
#crontab -l -u jane
10.ftp anon
Create an ftp server in such a way that anonymous user can login &
download from the directory /var/ftp/pub/downloads
#yum install vsftpd*
#/etc/init.d/vsftpd restart
#chkconfig vsftpd on
#ftp machine ip
11.swap
Create a Swap partition of 100MB
#fdisk -cu /dev/vda
create new partition:n->+100M->t-5-82-p-w
#partx -a /dev/sda
#mkswap /dev/sda5
#vim /etc/fstab
/dev/sda5 swap swap defaults 0 0
:wq!
#swapon /dev/sda5
#swapon -s
12.httpd page
Host a webpage on your hostname . download the page to be hosted from
ftp://rhgls.server.example.com/pub/web/station.html .
(ftp://instructor.example.com/pub/web/station.html) .
Do not make any modifications or changes to this file .
#lftp 192.168.0.254
get station.html
bye
#yum install httpd*
#mv station.html /var/www/html/index.html
#/etc/init.d/httpd restart
#chkconfig httpd on
#elinks http://desktop1.example.com(hostname)
13.user of Specific UID
Create a user jean .User id of this user should be 3564 .
#useradd -u 3564 jean
14.find
locate all files owned by user sasha & copy them to /home/lost+found/
# find / -user sasha -exec cp -vp {} /home/lost+found/ \;
^exc cmd ^src ^dstn ^ cmd syntax in find
15.grep
Search for the text strato in the file /usr/share/dict/words & copy this to a file
/root/lines.txt .The new file should not have any blank spaces or lines .
The order of the names in the new file should be same as the order in which it appears
in the original file
# grep strato /usr/share/dict/words > /root/lines.txt
16.lvm
Create a logical volume wshare from the volume group wgroup .
The volume group should have extents of size 8MiB . The logical volume
should have 100 extents . Mount this lvm as /mnt/lvm .
#fdisk /dev/sda
n-1G-p-t-6-8e-p-w
#partx -a /dev/sda
#pvcreate /dev/sda6
#reboot
#uname -r (check new kernal)