某培训机构最新RHCE题库.docx

上传人:b****4 文档编号:3994378 上传时间:2022-11-27 格式:DOCX 页数:12 大小:20.24KB
下载 相关 举报
某培训机构最新RHCE题库.docx_第1页
第1页 / 共12页
某培训机构最新RHCE题库.docx_第2页
第2页 / 共12页
某培训机构最新RHCE题库.docx_第3页
第3页 / 共12页
某培训机构最新RHCE题库.docx_第4页
第4页 / 共12页
某培训机构最新RHCE题库.docx_第5页
第5页 / 共12页
点击查看更多>>
下载资源
资源描述

某培训机构最新RHCE题库.docx

《某培训机构最新RHCE题库.docx》由会员分享,可在线阅读,更多相关《某培训机构最新RHCE题库.docx(12页珍藏版)》请在冰豆网上搜索。

某培训机构最新RHCE题库.docx

某培训机构最新RHCE题库

PhaseA

ForthefirstPhase,Wehaveperformedasimpleinstallationandhave

createdeightproblemsforyoutosolve.Weexpresstheseproblemsin

termsofendstates.Theconditionsbelowwillnotexistonyousystem

atthebegining.YourtaskinPhaseAisfixormodifytheRedHat

EnterpriseLinuxinstallationonyoursystemsuchthattheseconditions

doexist:

.Compulsory1:

(T01)theexaminercanlogintoyoursystemasroot

usingthpassword"A9b7#Eq.*".Thehomedirectorymustbe/root.

(compulsory)

[root@Clever~]#passwd

.Compulsory2:

(T02)ping192.168.0.254issuccessful,andyoursystem

usesstaticnetworkingasdescribedin/root/network(compulsory)

configureyourstationXfollowis:

addressis192.168.0.X(Xisyourstationnumber)

netmaskis255.255.255.0

gatewayis192.168.0.254

nameserveris192.168.0.254

configcorrecthostname(youcanreferto/etc/hosts)

makesuccessfullyresolveto

[root@Clever~]#cat/etc/sysconfig/network-scripts/ifcfg-eth0

#AdvancedMicroDevices[AMD]79c970[PCnet32LANCE]

DEVICE=eth0

BOOTPROTO=static

ONBOOT=yes

BOOTPROTO=static

IPADDR=192.168.0.2

NETMASK=255.255.255.0

GATEWAY=192.168.0.254

[root@Clever~]#cat/etc/sysconfig/network

NETWORKING=yes

NETWORKING_IPV6=no

HOSTNAME=

[root@Clever~]#servicenetworkrestart

正在关闭接口eth0:

[确定]

关闭环回接口:

[确定]

弹出环回接口:

[确定]

弹出界面eth0:

[确定]

[root@station2~]#ifconfig

eth0Linkencap:

EthernetHWaddr08:

00:

27:

85:

03:

7A

inetaddr:

192.168.0.2Bcast:

192.168.0.255Mask:

255.255.255.0

inet6addr:

fe80:

:

a00:

27ff:

fe85:

37a/64Scope:

Link

UPBROADCASTRUNNINGMULTICASTMTU:

1500Metric:

1

RXpackets:

96019errors:

2dropped:

0overruns:

0frame:

0

TXpackets:

40706errors:

0dropped:

0overruns:

0carrier:

0

collisions:

0txqueuelen:

1000

RXbytes:

52348895(49.9MiB)TXbytes:

10048326(9.5MiB)

Interrupt:

11Baseaddress:

0xc020

loLinkencap:

LocalLoopback

inetaddr:

127.0.0.1Mask:

255.0.0.0

inet6addr:

:

:

1/128Scope:

Host

UPLOOPBACKRUNNINGMTU:

16436Metric:

1

RXpackets:

1248errors:

0dropped:

0overruns:

0frame:

0

TXpackets:

1248errors:

0dropped:

0overruns:

0carrier:

0

collisions:

0txqueuelen:

0

RXbytes:

158030(154.3KiB)TXbytes:

158030(154.3KiB)

[root@station2~]#ping192.168.0.254

.Compulsory3:

(T03)digsuccessfulyresolvesthat

hostnameusingDNS(compulsory)

[root@Clever~]#cat/etc/resolv.conf

;generatedby/sbin/dhclient-script

nameserver192.168.0.254

search

[root@Clever~]#dig

[root@Clever~]#ping

.Compulsory4:

(T09)yoursystemhasanew500MBphysicalpartition

mountedunder/mnt/backupwitha500MBext3filesystem.Note:

because

partitionsizeareseldomexactlywhatisspecifiedwhentheyare

created.anythingwithintherangeof450to550MBisacceptable

(compulsory)

[root@Clever~]#fdisk/dev/sda

[root@Clever~]#partprobe

[root@Clever~]#mke2fs–j/dev/sda9

[root@Clever~]#mkdir/mnt/backup

[root@Clever~]#cat/etc/fstab

LABEL=//ext3defaults11

LABEL=/boot/bootext3defaults12

tmpfs/dev/shmtmpfsdefaults00

devpts/dev/ptsdevptsgid=5,mode=62000

sysfs/syssysfsdefaults00

proc/procprocdefaults00

LABEL=SWAP-hda2swapswapdefaults00

/dev/sda9/mnt/backupext3defaults00

[root@Clever~]#mount-a

[root@Clever~]#df-h

Payattention,youmustsuccessfullyfixedT02andT03cancompleteyour

RHCEexamine.

ifyousuccessfulyallofthempleasevisitingthewebsitetonextfor

yourRHCEexame.

yoursystemisinstalledthedistributionisavailablevia:

NFS:

/var/ftp/pub/Server

YUM

RHCT(Local)Requirements

.InstallthedialogRPMpackage.

[root@Clever~]#vi/etc/yum.repo.d/base.repo

[base]

name=yumrepo

baseurl=

gpgcheck=0

enabled=1

[root@Clever~]#yumcleanall

[root@Clever~]#yumlist

[root@Clever~]#yum–yinstalldialog

.UsetheremainingspacetocreateaRAID1seton/dev/md1and

mountedthispatitionon/mnt/common

[root@Clever~]#fdisk/dev/sda

[root@Clever~]#partprobe

[root@Clever~]#mdadm--create/dev/md1--level=1/dev/sda{10,11}

[root@Clever~]#mke2fs–j/dev/md1

[root@Clever~]#mkdir/mnt/common

[root@Clever~]#cat/etc/fstab

LABEL=//ext3defaults11

LABEL=/boot/bootext3defaults12

tmpfs/dev/shmtmpfsdefaults00

devpts/dev/ptsdevptsgid=5,mode=62000

sysfs/syssysfsdefaults00

proc/procprocdefaults00

LABEL=SWAP-hda2swapswapdefaults00

/dev/sda9/mnt/backupext3defaults00

/dev/md1/mnt/commonext3defaults00

[root@Clever~]#mount-a

[root@Clever~]#df-h

.SELinuxmustberunningintheEnforcingmode

[root@Clever~]#setenforce1

[root@Clever~]#getenforce

.neousertriedby:

ddif=/dev/zeroof=/home/neo/somefilebs=1024count=100

filecreatedsuccessfully.Againneotriedtocreatefileand

having170Kusingfollowingcommand:

ddif=/dev/zeroof=/home/neo/somefilebs=1024count=170

butheisunabletocreatethefile.maketheusercancreate

thefilelessthen170K.

[root@Clever~]#useraddneo

[root@Clever~]#vi/etc/fstab

LABEL=/home/homeext3defaults,usrquota,grpquota11

[root@Clever~]#mount-a

[root@Clever~]#df-h

[root@Clever~]#mount|grephome

[root@Clever~]#quotacheck–avug

[root@Clever~]#quotaon–auvg

[root@Clever~]#edquota–uneo

Diskquotasforuserneo

Filesystemblockssofthardinodessofthard

/dev/hda380100170000

[root@Clever~]#repquota–a

?

.Someusershomedirectoryissharedfromyoursystem,using

showmount-elocalhostcommand,thesharedirectoryisnotshow,

makeaccesstheshareusershomedirectory.

[root@Clever~]#yum-yinstallnfs*

[root@Clever~]#cat/etc/exports

/home*(ro,async)

[root@Clever~]#servicenfsstart

[root@Clever~]#serviceportmapstart

[root@Clever~]#showmount-elocalhost

Exportlistforlocalhost:

/home*

.Inyoursystemhasalogicalvolumeiscreatednamedascommonunder

vol0volumegroupandismounton/common,Theinitialsizeofthat

volumeis100MB,makesuccessfullythatthesizeoflogicalvolume190MB

withoutlosinganydata.Thesizelogicalvolume160MB-200MBwillbeacceptable.

[root@VirtualBox~]#fdisk/dev/hdb

[root@VirtualBox~]#partprobe

[root@VirtualBox~]#vgextendvol0/dev/hdb2

[root@VirtualBox~]#lvresize-L+80M/dev/vol0/lv0

[root@VirtualBox~]#resize2fs/dev/vol0/lv0

[root@Clever~]#cat/etc/fstab

/dev/sda9/mnt/backupext3defaults00

/dev/md1/mnt/commonext3defaults00

/dev/vol0/lv0/commonext3defaults00

[root@VirtualBox~]#mount-a

.Inyoursystemhasanotherlogicalvolumeiscreatenameasshrinkunder

vol0volumegroupandismount/shrink,Theinitialsizeofthatvalumeis

320MBshrinksuccessfullythatthesizeoflogicalvolume200MBwithout

losinganydata,payattentionthesizelogicalvolume192MB-240MBwillbe

acceptable.

[root@VirtualBox~]#umount/shrink

[root@VirtualBox~]#e2fsck-f/dev/vol0/lv0

[root@VirtualBox~]#resize2fs/dev/vol0/lv080M

[root@VirtualBox~]#mount/dev/vol0/lv0/common

[root@VirtualBox~]#lvresize-l-5/dev/vol0/lv0

降低LV容量,以PE为单位

.Createaraid0device/dev/md0bycreatingequaltwodisksfromavailable

freespaceonyoursystemandmountiton/raid0,whenyoursystemreboot

thismounteddirectoryshouldautomaticallymounton/raid0.

[root@Clever~]#fdisk/dev/sda

[root@Clever~]#partprobe

[root@Clever~]#mdadm--create/dev/md0--level=0/dev/sda{12,13}

[root@Clever~]#mke2fs–j/dev/md0

[root@Clever~]#mkdir/raid0

[root@Clever~]#cat/etc/fstab

LABEL=//ext3defaults11

LABEL=/boot/bootext3defaults12

tmpfs/dev/shmtmpfsdefaults00

devpts/dev/ptsdevptsgid=5,mode=62000

sysfs/syssysfsdefaults00

proc/procprocdefaults00

LABEL=SWAP-hda2swapswapdefaults00

/dev/sda9/mnt/backupext3defaults00

/dev/md1/mnt/commonext3defaults00

/dev/md0/raid0ext3defaults00

[root@Clever~]#mount-a

[root@Clever~]#df-h

.Makeaswappartitionhave512MB,makeautomaticallyuseableatsystemboottime.

[root@Clever~]#fdisk/dev/sda

Command(mforhelp):

t<==修改系統ID

Partitionnumber(1-7):

7<==從上結果看到的,七號partition

Hexcode(typeLtolistcodes):

82<==改成swap的ID

[root@Clever~]#partprobe

[root@Clever~]#mkswap/dev/sda13

[root@Clever~]#swapon/dev/sda13

[root@Clever~]#free

[root@Clever~]#swapon-s

.Createthefollowingusers,groups,andgroupmemberships:

--Agroupnamedadmin

--Ausermarywhobelongstoadminasasecondarygroup

--Auseralicewhoalsobelongstoadminasasecondarygroup

--Auserbobbywhodosenothaveaccesstoaninteractiveshell

onthesystem,andwhoisnotamemberofadmin

--mary,alice,andbobbyshouldallhavethepasswdof"password"

[root@VirtualBox~]#groupaddadmin

[root@VirtualBox~]#useradd-Gadminmary

[root@VirtualBox~]#useradd-Gadminalice

[root@VirtualBox~]#useradd-s/sbin/nologinbobby

[root@VirtualBox~]#forainmaryalicebobby;doecho"password"|passwd--stdin$a;done

.Createacolloborativedirectory/common/adminwiththefollowing

characteristics:

--Groupownershipof/common/adminisadmin

--Thedirectoryshouldbereadable,writable,andaccessiableto

membersofadmin,butnottoanyotherusers.(Itisunderstood

thatroothasaccesstoallfilesanddirectoriesonthesystem)

--Filescreatedin/common/adminautomaticallyhavegroupownership

settotheadmingroup

[root@VirtualBox~]#chownmary:

admin/home/admin

[root@VirtualBox~]#chmod2770/common/adm

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 农林牧渔 > 林学

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1