1、某培训机构最新RHCE题库Phase A For the first Phase, We have performed a simple installation and have created eight problems for you to solve. We express these problems interms of end states. The conditions below will not exist on you systemat the begining. Your task in Phase A is fix or modify the Red Hat Ent
2、erprise Linux installation on your system such that these conditionsdo exist: . Compulsory 1:(T01) the examiner can log into your system as root using th password A9b7#Eq.*. The home directory must be /root. (compulsory)rootClever # passwd . Compulsory 2:(T02) ping 192.168.0.254 is successful, and y
3、our system uses static networking as described in /root/network(compulsory)configure your stationX follow is:address is 192.168.0.X (X is your station number)netmask is 255.255.255.0gateway is 192.168.0.254nameserver is 192.168.0.254config correct hostname (you can refer to /etc/hosts)make successfu
4、lly resolve to rootClever # cat /etc/sysconfig/network-scripts/ifcfg-eth0 # Advanced Micro Devices AMD 79c970 PCnet32 LANCEDEVICE=eth0BOOTPROTO=staticONBOOT=yesBOOTPROTO=staticIPADDR=192.168.0.2NETMASK=255.255.255.0GATEWAY=192.168.0.254rootClever # cat /etc/sysconfig/networkNETWORKING=yesNETWORKING_
5、IPV6=noHOSTNAME=rootClever # service network restart正在关闭接口 eth0: 确定关闭环回接口: 确定弹出环回接口: 确定弹出界面 eth0: 确定root station2 # ifconfigeth0 Link encap:Ethernet HWaddr 08:00:27:85:03:7A inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80:a00:27ff:fe85:37a/64 Scope:Link UP BROADCAST RUN
6、NING MULTICAST MTU:1500 Metric:1 RX packets:96019 errors:2 dropped:0 overruns:0 frame:0 TX packets:40706 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:52348895 (49.9 MiB) TX bytes:10048326 (9.5 MiB) Interrupt:11 Base address:0xc020 lo Link encap:Local Loopback inet ad
7、dr:127.0.0.1 Mask:255.0.0.0 inet6 addr: :1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:1248 errors:0 dropped:0 overruns:0 frame:0 TX packets:1248 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:158030 (154.3 KiB) TX bytes:158030 (154.3 KiB)root station
8、2 # ping 192.168.0.254 . Compulsory 3:(T03) dig successfuly resolves that hostname using DNS(compulsory) rootClever # cat /etc/resolv.conf; generated by /sbin/dhclient-scriptnameserver 192.168.0.254search rootClever # dig rootClever # ping . Compulsory 4:(T09) your system has a new 500MB physical pa
9、rtition mounted under /mnt/backup with a 500MB ext3 filesystem. Note: because partition size are seldom exactly what is specified when they are created. anything within the range of 450 to 550MB is acceptable (compulsory)rootClever # fdisk /dev/sdarootClever # partproberootClever # mke2fs j /dev/sda
10、9rootClever # mkdir /mnt/backuprootClever # cat /etc/fstab LABEL=/ / ext3 defaults 1 1LABEL=/boot /boot ext3 defaults 1 2tmpfs /dev/shm tmpfs defaults 0 0devpts /dev/pts devpts gid=5,mode=620 0 0sysfs /sys sysfs defaults 0 0proc /proc proc defaults 0 0LABEL=SWAP-hda2 swap swap defaults 0 0/dev/sda9
11、/mnt/backup ext3 defaults 0 0rootClever # mount -arootClever # df -hPay attention, you must successfully fixed T02 and T03 can complete your RHCE examine. if you successfuly all of them please visiting the website to next for your RHCE exame. your system is installed the distribution is available vi
12、a: NFS :/var/ftp/pub/Server YUM RHCT(Local) Requirements . Install the dialog RPM package. rootClever #vi /etc/yum.repo.d/base.repobasename=yum repobaseurl= gpgcheck=0enabled=1rootClever # yum clean allrootClever # yum listrootClever # yum y install dialog . Use the remaining space to create a RAID
13、1 set on /dev/md1 and mounted this patition on /mnt/commonrootClever # fdisk /dev/sdarootClever # partproberootClever # mdadm -create /dev/md1 -level=1 /dev/sda10,11rootClever # mke2fs j /dev/md1rootClever # mkdir /mnt/commonrootClever # cat /etc/fstab LABEL=/ / ext3 defaults 1 1LABEL=/boot /boot ex
14、t3 defaults 1 2tmpfs /dev/shm tmpfs defaults 0 0devpts /dev/pts devpts gid=5,mode=620 0 0sysfs /sys sysfs defaults 0 0proc /proc proc defaults 0 0LABEL=SWAP-hda2 swap swap defaults 0 0/dev/sda9 /mnt/backup ext3 defaults 0 0/dev/md1 /mnt/common ext3 defaults 0 0rootClever # mount -arootClever # df -h
15、 . SELinux must be running in the Enforcing moderootClever # setenforce 1rootClever # getenforce . neo user tried by: dd if=/dev/zero of=/home/neo/somefile bs=1024 count=100 file created successfully. Again neo tried to create file and having 170K using following command: dd if=/dev/zero of=/home/ne
16、o/somefile bs=1024 count=170 but he is unable to create the file. make the user can create the file less then 170K.rootClever # useradd neorootClever # vi /etc/fstabLABEL=/home /home ext3 defaults,usrquota,grpquota 1 1rootClever # mount -arootClever # df -hrootClever # mount | grep homerootClever #
17、quotacheck avugrootClever # quotaon auvgrootClever # edquota u neoDisk quotas for user neo Filesystem blocks soft hard inodes soft hard /dev/hda3 80 100 170 0 0 0rootClever # repquota a ?. Some users home directory is shared from your system, using showmount -e localhost command, the share directory
18、 is not show, make access the share users home directory. rootClever # yum -y install nfs*rootClever # cat /etc/exports /home *(ro,async)rootClever # service nfs startrootClever # service portmap startrootClever # showmount -e localhostExport list for localhost:/home * . In your system has a logical
19、 volume is created named as common under vol0 volume group and is mount on /common, The initial size of that volume is 100MB,make successfully that the size of logical volume 190MB without losing any data. The size logical volume 160MB-200MB will be acceptable.rootVirtualBox # fdisk /dev/hdbrootVirt
20、ualBox # partproberootVirtualBox # vgextend vol0 /dev/hdb2rootVirtualBox # lvresize -L +80M /dev/vol0/lv0rootVirtualBox # resize2fs /dev/vol0/lv0rootClever # cat /etc/fstab /dev/sda9 /mnt/backup ext3 defaults 0 0/dev/md1 /mnt/common ext3 defaults 0 0/dev/vol0/lv0 /common ext3 defaults 0 0rootVirtual
21、Box # mount -a . In your system has another logical volume is create name as shrink under vol0 volume group and is mount /shrink, The initial size of that valume is 320MB shrink successfully that the size of logical volume 200MB without losing any data, pay attention the size logical volume 192MB-24
22、0MB will be acceptable.rootVirtualBox # umount /shrinkrootVirtualBox # e2fsck -f /dev/vol0/lv0rootVirtualBox # resize2fs /dev/vol0/lv0 80MrootVirtualBox # mount /dev/vol0/lv0 /commonrootVirtualBox # lvresize -l -5 /dev/vol0/lv0降低LV容量,以PE为单位 . Create a raid0 device /dev/md0 by creating equal two disk
23、s from available free space on your system and mount it on /raid0, when your system reboot this mounted directory should automatically mount on /raid0.rootClever # fdisk /dev/sdarootClever # partproberootClever # mdadm -create /dev/md0 -level=0 /dev/sda12,13rootClever # mke2fs j /dev/md0rootClever #
24、 mkdir /raid0rootClever # cat /etc/fstab LABEL=/ / ext3 defaults 1 1LABEL=/boot /boot ext3 defaults 1 2tmpfs /dev/shm tmpfs defaults 0 0devpts /dev/pts devpts gid=5,mode=620 0 0sysfs /sys sysfs defaults 0 0proc /proc proc defaults 0 0LABEL=SWAP-hda2 swap swap defaults 0 0/dev/sda9 /mnt/backup ext3 d
25、efaults 0 0/dev/md1 /mnt/common ext3 defaults 0 0/dev/md0 /raid0 ext3 defaults 0 0rootClever # mount -arootClever # df -h . Make a swap partition have 512MB,make automatically useable at system boot time.rootClever # fdisk /dev/sdaCommand (m for help): t =修改系統 IDPartition number (1-7): 7 =從上結果看到的,七號
26、partitionHex code (type L to list codes): 82 =改成 swap 的 IDrootClever # partproberootClever # mkswap /dev/sda13rootClever # swapon /dev/sda13rootClever # freerootClever # swapon -s . Create the following users,groups,and group memberships: - A group named admin - A user mary who belongs to admin as a
27、 secondary group - A user alice who also belongs to admin as a secondary group - A user bobby who dose not have access to an interactive shell on the system, and who is not a member of admin - mary,alice,and bobby should all have the passwd of password rootVirtualBox # groupadd adminrootVirtualBox #
28、 useradd -G admin maryrootVirtualBox # useradd -G admin alicerootVirtualBox # useradd -s /sbin/nologin bobbyrootVirtualBox # for a in mary alice bobby; do echo password|passwd -stdin $a; done . Create a colloborative directory /common/admin with the following characteristics: - Group ownership of /c
29、ommon/admin is admin - The directory should be readable,writable,and accessiable to members of admin, but not to any other users.(It is understood that root has access to all files and directories on the system) - Files created in /common/admin automatically have group ownership set to the admin grouprootVirtualBox # chown mary:admin /home/adminrootVirtualBox # chmod 2770 /common/adm
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1