RHCE考试题与解答.doc

上传人:jian****018 文档编号:9281354 上传时间:2020-04-04 格式:DOC 页数:9 大小:393.50KB
返回 下载 相关 举报
RHCE考试题与解答.doc_第1页
第1页 / 共9页
RHCE考试题与解答.doc_第2页
第2页 / 共9页
RHCE考试题与解答.doc_第3页
第3页 / 共9页
点击查看更多>>
资源描述
RHCSA考试题:1、配置好你的主机名,IP地址,网关,DNS主机名:station.domain40.example.comIP:172.24.40.40/24网关:172.24.40.1DNS:172.24.40.1直接编辑配置文件或者使用setup配置网络,过程略2、添加3个用户,用户harry、natasha、tom,要求harry、natasha用户的附加组为admin组,tom用户的登陆shell为非交互式shell。useradd harry; passwd harryuseradd natasha; passwd natatshauseradd tom; passwd tomgroupadd adminusermod -a -G admin harryusermod -a -G admin natashausermod -s /sbin/nologin tom3、在/home下创建一个目录,名为admins,要求所属组为admin组,组成员可以读写,其它用户没有任何权限,同组成员在目录下创建的文件的所属组也为admin组。mkdir /home/admins; cd /homechgrp admin adminschmod -R 770 adminschmod g+s admins4、配置任务计划每天的14:23分,执行echo hello 命令。crontab -e23 14 * * * /bin/echo hello5、找出harry拥有的文件,拷贝到目录/opt/dir下。mkdir /opt/dirfind / -user harry -exec cp -a /opt/dir ;6、从文件/etc/testfile中找出包含abcde的行,写入到文件/tmp/testfile中,要求顺序与/etc/testfile中一致。cat /etc/testfile |grep abcde /tmp/testfile7、创建一个2G的交换分区,并开机自动生效,但不影响原有的swap分区。fdisk分区类型选swap过程略,此处例为/dev/sdb1,大小为500Mmkswap /dev/sdb1swapon /dev/sdb1echo swapon /dev/sdb1 /etc/rc.local8、创建一个用户alex,用户ID为1234,用户密码为alex111。useradd -u 1234 alexecho alex111 |passwd -stdin alex9、安装一个FTP服务器,要求可以从/var/ftp/pub目录中匿名下载(需要你配置yum指向已经存在的文件服务器)。vim /etc/yum.repos.d/mybase.repoyum -y install vsftpdservice vsftpd startchkconfig vsftpd on10、配置一个HTTP服务器,通过http:/station.domain40.example.com可以被访问到,发布的页面请从http:/ip/dir/example.html下载。yum -y install httpdcd /var/www/htmlwget http:/ip/dir/example.htmlmv example.html index.htmlservice httpd startchkconfig httpd on11、配置你的主机账号和密码验证方式为LDAP方式,通过ldapuser40可以登录成功,ldapuser40密码为:password。证书可以从下载:http:/ip/dir/ldap.crt,用户登录后是没有宿主目录的,除非你配置了后续题目中的autofs。system-config-authentication用户信息与验证都是用ldap服务器,服务器信息如考试提供getent passwdsu - zp12、配置autofs,实现ldapuser40登录成功后,有家目录/rhome/ldapuser40。家目录在172.24.40.10上被nfs共享为:/rhome/ldapuser40。并且要求,其它的ldap用户登录成功后也能正常使用宿主目录。nfs服务器配置:vim /etc/exportsservice portmap restartservice nfs restartshowmount -e客户端配置:vim /etc/auto.mastervim /etc/auto.ldapservice autofs restart13、配置你的系统时间与172.24.40.10同步。system-config-date14、把名为vo的逻辑卷容量由190M变为300M,大小浮动范围为280320(此逻辑卷已经事先挂载)。mkfs.ext4 /dev/vg02/vomount /dev/vg02/vo /medialvdisplay15、创建一个卷组,16M为一个extends,并在其上划分一个50个extends的逻辑卷lv,制作成ext4文件系统,并开机自动挂载到/mnt/data下。mkfs.ext4 /dev/vg01/lvvim /etc/fstab16、升级内核为2.6.36.7.1,设置为系统启动默认内核,并保留旧的内核可用。lftp:/xxx/kernel-2.6.36.7.1.rpmrpm -ivh kernel-2.6.36.7.1.rpmvim /boot/grub/grub.conf修改default到新的内核RHCE考试题(注意配置selinux):注意:你的IP,主机名,网关,DNS已经配置好IP: 172.24.30.5/24主机名:station.domain30.example.com你是域domain30.example.com的成员主机,另一个域是t3gg.com(172.25.0.0/16网络)1、请将selinux状态设置为enforcing状态。setenforce 1vim /etc/sysconfig/selinux2、请将ip_forward功能打开,并永久生效vim /etc/sysctl.confsysctl -p3、配置ssh允许harry用户访问,拒绝t3gg.com域访问service sshd startchkconfig sshd oniptables -A INPUT -s 172.25.0.0/16 -p tcp -dport 22 -j REJECT4、配置ftp允许匿名从/var/ftp/pub目录中下载,拒绝t3gg.com域访问。service vsftpd startchkconfig vsftpd oniptables -A INPUT -s 172.25.0.0/16 -p tcp -dport 20:21 -j REJECT5、将/root/cdrom.iso关在到/opt/data下,并设置为开机自动挂载。mount -o loop /root/cdrom.iso /opt/datavim /etc/fstab/root/cdrom.iso/opt/dataiso9660loop,ro0 06、配置web服务器,能被http:/station.domain30.example.com访问。service httpd startchkconfig httpd on7、配置web服务器,实现虚拟主机。 http:/www.domain30.example.com能访问到/www/virtual目录下的页面,页面从http:/ip/dir/example.html下载。并保证,http:/station.domain30.example.com同样能被访问到之前的内容。mkdir -p /www/virtualchcon -t httpd_sys_content_t /wwwchcon -t httpd_sys_content_t /www/virtualcd /www/virtualwget http:/ip/dir/example.htmlmv example.html index.htmlvim /etc/httpd/conf/httpd.confservice httpd restartelinks http:/station.domain30.example.comelinks http:/www.domain30.example.com8、从http:/ip/dir/restircted.html下载文件,能被本地用户harry通过路径http:/station.domain30.example.com/restircted访问到,但是不可以被t3gg.com域访问。mkdir /var/www/html/restrictedcd /var/www/html/restrictedwget http:/ip/dir/restricted.htmlmv restricted.html index.htmlservice httpd restartiptables -A INPUT -s 172.25.0.0/16 -p tcp -dport 22 -j REJECT9、配置nfs服务器,将/common目录共享给domain30.example.com域,并允许客户端以root用户访问时,也拥有root用户权限。假设domain30.example.com为192.168.0.0/16vim /etc/exportsservice nfs restartchkconfig nfs on10、配置samba服务器,将/common共享,能被浏览到。用户harry对此共享只读,如果需要,harry用户密码为harryuser。yum install sambaservice smb startchkconfig smb onmkdir /commonchcon -t samba_var_t commonvim /etc/samba/smb.confsmbpasswd -a harryservice smb restart11、配置一台domian30.example.com域的邮件服务器,要求可以在服务器本地或者通过harry用户从网络上连接到服务器收发邮件。harry用户的邮箱是/var/spool/mail/harry。注意DNS服务器已经帮你做好MX记录的解析。yum -y install postfixservice sendmail stopchkconfig sendmail offservice postfix startchkconfig postfix onalternatives -config mtarhel6默认的mta即为postfix,以上步骤可以省略vim /etc/postfix/main.cfservice postfix restart12、连接到邮件服务器给admin发邮件,可以被harry用户收到。vim /etc/aliasesnewaliases13、配置内核参数 rhelblq=1,并要求可以通过/proc/cmdline验证到你的内核参数。vim /boot/grub/grub.conf14、配置cron不允许tom用户使用。echo tom /etc/cron.deny
展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 图纸专区 > 大学资料


copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!