Академический Документы
Профессиональный Документы
Культура Документы
change password
#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
#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 .
#reboot
#uname -r (check new kernal)