红帽-rhce认证考试题库(共25页).docx





《红帽-rhce认证考试题库(共25页).docx》由会员分享,可在线阅读,更多相关《红帽-rhce认证考试题库(共25页).docx(25页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、精选优质文档-倾情为你奉上不用破解system1,system2密码 注意看网络信息 考前题目1.配置 SELinuxSELinux 必须在两个系统 system1 和 system2 中运行于 Enforcing 模式-1) getenforcerootsystem1 # getenforceEnforcing2) setenforce 1rootsystem1 # setenforce -helpusage: setenforce Enforcing | Permissive | 1 | 0 rootsystem1 # setenforce 13) vi /etc/selinux/conf
2、ig将SELINUX=permissive 改成 SELINUX=enforcing同样地在system2上执行同样操作。2.配置 SSH 访问按以下要求配置 SSH 访问:用户能够从域 rhce.cc 内的客户端通过 SSH 远程访问您的两个虚拟机系统在域 my133t.org 内的客户端不能访问您的两个虚拟机系统-1)查看当前域rhce.cc的网段:rootsystem1 # host system1.rhce.ccsystem1.rhce.cc has address 192.168.122.100可知网段为192.168.122.02)vi /etc/hosts.allow添加如下内容
3、:#sshd : 192.168.122.0/255.255.255.03)vi/etc/hosts.deny#sshd : .my133t.org4)scp /etc/hosts.allow /etc/hosts.deny system2.rhce.cc:/etc/3.自定义用户环境在系统 system1 和 system2 上创建自定义命令名为 qstat 此自定义命令将执行以下命令:/bin/ps -Ao pid,tt,user,fname,rsz此命令对系统中所有用户有效。-1)vim/etc/bashrc unset -f pathmungefi# vim:ts=4:sw=4alia
4、s qstat=/bin/ps -Ao pid,tt,user,fname,rsz /最后一行2)source /etc/bashrc3) qstat2301 ? root kworker/ 0 2315 ? root kworker/ 0 2333 ? root anacron 748 2344 ? root kworker/ 0 2346 pts/1 root ps 12644)scp /etc/bashrc system2:/etc5)在system2上执行source /etc/bashrc4.配置端口转发在系统 system1 配置端口转发, 要求如下:在 192.168.122.0
5、/24 网络中的系统, 访问 system1 的本地端口 5423 将被转发到 80此设置必须永久有效-1) 在system1上添加富规则firewall-cmd -add-rich-rule rule family=ipv4 source address=192.168.122.100/24 forward-port port=5423 protocol=tcp to-port=80 2) 在system1上添加永久性富规则rootsystem1 # firewall-cmd -add-rich-rule rule family=ipv4 source address=192.168.122
6、.100/24 forward-port port=5423 protocol=tcp to-port=80 -permanentsuccess3) 查看当前富规则:firewall-cmd -list-rich-rulesrootsystem1 # firewall-cmd -list-rich-rules rule family=ipv4 source address=192.168.122.0/24 forward-port port=5423 protocol=tcp to-port=805.配置聚合链路在 system1.rhce.cc 和 system2.rhce.cc 之间按以下
7、要求配置一个链路:此链路使用接口 eth1 和 eth2此链路在一个接口失效时仍然能工作此链路在 system1 使用下面的地址 172.16.11.25/255.255.255.0此链路在 system2 使用下面的地址 172.16.11.35/255.255.255.0此链路在系统重启之后依然保持正常状态-1) 配置system1上的team0文件nmcli connection add type team con-name team0 ifname team0 config runner:name:activebackup2) 为team0配置IP地址nmcli connection
8、modify team0 ipv4.addresses 172.16.11.25/243) 为team0设置手动管理nmcli connection modify team0 ipv4.method manual 4) 添加一个类型为team-slave的从设备,连接名为team0-1 接口为eth1, master 为team0nmcli connection add type team-slave con-name team0-1 ifname eth1 master team05) 添加一个类型为team-slave的从设备,连接名为team0-2 接口为eth1, master 为te
9、am0nmcli connection add type team-slave con-name team0-2 ifname eth2 master team0 cd /etc/sysconfig/network-scripts/vi ifcfg-team0 检查onboot是否=yesvi ifcfg-team0 检查onboot是否=yessystemctl restart networkssh 远程到另一台主机 192.168.122.200 复制如上命令,重复执行如下命令nmcli connection add type team con-name team0 ifname team
10、0 config runner:name:activebackupnmcli connection modify team0 ipv4.addresses 172.16.11.35/24 /ip要更换nmcli connection modify team0 ipv4.method manual nmcli connection add type team-slave con-name team0-1 ifname eth1 master team0nmcli connection add type team-slave con-name team0-2 ifname eth2 master
11、team0 systemctl restart networkping 172.16.11.35 或者 172.16.11.25teamdctl team0 state 查看状态6.配置 IPv6 地址在您的考试系统上配置接口 eth0 使用下列 IPv6 地址:system1 上的地址应该是 200e:ac18:e0a/64system2 上的地址应该是 200e:ac18:e14/64两个系统必须能与网络 200e:ac18/64 内的系统通信。地址必须在重启后依旧生效。两个系统必须保持当前的 IPv4 地址并能通信。-1) 在system1上修改管理方式为autonmcli connec
12、tion modify eth0 ipv6.method auto2) 在system1上修改eth0网卡的mac地址nmcli connection modify eth0 ipv6.addresses 200e:ac18:e0a/643) 在system1上修改管理方式为manualnmcli connection modify eth0 ipv6.method manualnmcli connection show eth0|grep ipv6 /可以检查如下值是否为 auto,如果不为auto则会无法成功配置mac地址。ipv6.method: auto4) 重启网络服务systemc
13、tl restart network在system2上再执行一次:1) 在system2上修改管理方式为autonmcli connection modify eth0 ipv6.method auto2) 在system2上修改eth0网卡的mac地址nmcli connection modify eth0 ipv6.addresses 200e:ac18:e14/643) 在system2上修改管理方式为manualnmcli connection modify eth0 ipv6.method manual4) 重启网络服务systemctl restart network5) 最后在s
14、ystem1使用如下命令测试网络连通性:ping6 200e:ac18:e147.配置本地邮件服务老段工作室 在系统 system1 和 system2 上 配置邮件服务, 满足以下要求:这些系统不接收外部发送来的邮件在这些系统上本地发送的任何邮件都会自动路由到 rhgls.rhce.cc从这些系统上发送的邮件显示来自于 rhce.cc您可以通过发送邮件到本地用户 dave 来测试您的配置, 系统 rhgls.rhce.cc 已经配置把此用户的邮件转到下列 URL -本地系统不接受外部发来的邮件:分别在system1,2上开启smtp富规则:firewall-cmd -add-service=
15、smtpfirewall-cmd -add-service=smtp -permanent1) 编辑邮件配置文件:vim /etc/postfix/main.cf2) 查找mydestination#mydestination = $myhostname, localhost.$mydomain, localhost/注释该行mydestination = /取消下一行注释,并删除=号后面内容将本地发送的邮件自动路由到rhgls.rhce.cc1) 查找relayhost#relayhost = an.ip.add.ress /在该行下新起一行relayhost = rhgls.rhce.cc
16、 /修改成rhgls.rhce.cc从这些系统上发送的邮件显示来自于 rhce.cc 1) 查找myorigin#myorigin = $mydomain /在该行下新起一行myorigin = rhce.cc /修改成rhgls.rhce.cc2) 重启system1邮件服务systemctl restart postfixrootlocalhost # vi /etc/resolv.conf rootlocalhost # systemctl restart networkrootlocalhost # host system1.rhce.ccsystem1.rhce.cc has add
17、ress 192.168.122.1001) 拷贝system1邮件服务配置文件到system2上scp /etc/postfix/main.cf system2.rhce.cc:/etc/postfix/main.cf2) 重启邮件服务systemctl restart postfixyum y install mailxecho aaa |mail -s system1 dave8.通过 SMB 共享目录在 system1 上配置 SMB 服务您的 SMB 服务器必须是 STAFF 工作组的一个成员共享 /common 目录 共享名必须为 common只有 rhce.cc 域内的客户端可以
18、访问 common 共享common 必须是可以浏览的用户 andy 必须能够读取共享中的内容, 如果需要的话, 验证的密码是 redhat-您的 SMB 服务器必须是 STAFF 工作组的一个成员yum - y install samba1) 编辑sbm.conf配置文件vim /etc/samba/smb.conf查找workgroupworkgroup = STAFFserver string = Samba Server Version %v共享 /common 目录 共享名必须为 common1) 创建共享目录mkdir /common2) 编辑sbm.conf配置文件vim /et
19、c/samba/smb.conf切到最后一行,添加commonpath = /commonhosts allow = 192.168.122.0/24 /只有 rhce.cc 域内的客户端可以访问 common 共享,而rhce.cc的网段为192.168.122.0/243) 更改上下文chcon R t samba_share_t /common用户 andy 必须能够读取共享中的内容, 如果需要的话, 验证的密码是 redhatuseradd andypdbedit L 查看samba用户列表yum whatprovides */smbpasswd 查看smbpasswd命令由哪个包提供
20、Repo : aaMatched from: : /etc/raddb/mods-available/smbpasswdsamba-client-4.1.1-31.el7.x86_64 : Samba client programsRepo : aaMatched from: : /usr/bin/smbpasswdsmbpasswd a andy 为andy设置密码firewall-cmd -add-service=samba 添加samba服务富规则firewall-cmd -add-service=samba -permanent 永久添加samba服务富规则systemctl rest
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- rhce 认证 考试 题库 25

限制150内