最准特马网站资料2018
RHCE考试EX300题库经验证版 下载本文

证,http://station.domain30.example.com同样能被访问到之前的内容。 确保barry用户可以在/var/www/virtual目录里上传文件。(真题要求!) yum install httpd

mkdir -p /var/www/virtual cd /var/www ll -dZ html/ drwxr-xr-x. root root system_u:object_r:httpd_sys_content_t:s0 html/ wget http://instructor.example.com:/pub/example.html mv example.html index.html ll -Z

-rw-r--r--. root root unconfined_u:object_r:httpd_sys_content_t:s0 example.html

setfacl -m u:barry:rwx /var/www/virtual/

[[email protected] virtual]# vi /etc/httpd/conf/httpd.conf NameVirtualHost *:80

DocumentRoot /var/www/virtual

ServerName www.domain16.example.com

DocumentRoot /var/www/html

ServerName station.domain16.example.com

[[email protected] virtual]# service httpd restart cd /var/www/html ll -dZ *

-rw-r--r--. root root system_u:object_r:httpd_sys_content_t:s0 index.html yum install elinks -y

elinks –dump http://www.domain16.example.com elinks –dump http://station.domain16.example.com

(12、A.从http://ip/dir/restircted.html下载文件,能被本地用户harry通过路径

http://station.domain30.example.com/restircted访问到,但是不可?#21592;籺3gg.com域访问。 htpasswd -cm /etc/httpd/.htpasswd harry mkdir /var/www/html/restricted ls -ldZ restricted

drwxr-xr-x. root root unconfined_u:object_r:httpd_sys_content_t:s0 restricted cd /var/www/html/restricted wget http://ip/dir/restricted.html mv restricted.html index.html service httpd restart

vi /etc/httpd/conf/httpd.conf

DocumentRoot /www/virtual

ServerName www.domain16.example.com

DocumentRoot /var/www/html

ServerName station.domain16.example.com AuthName \ AuthType basic

AuthUserFile /etc/httpd/.htpasswd Require valid-user Order allow,deny Allow from all

Deny from t3gg.com

[[email protected] html]# service httpd restart

[[email protected] html]# elinks http://station.domain16.example.com/restricted)

12、配置web内容访问。在你的服务器的DocumentRoot目录下面创建一个名字是confidential的目录。下载

ftp://server.domain90.example.com/pub/rhce/station.html到这个目录并重命名为index.html。对这个文件的

内容不要做任何的修改。 confidential目录里内容应该允许本系统的任何用户访问,但不能被其他位置的用户访问。

mkdir -p /var/www/html/confidential mkdir -p /var/www/virtual/confidential

wget ftp://server.domain90.example.com/pub/rhce/station.html cp station.html /var/www/html/confidential/index.html cp station.html /var/www/virtual/confidential/index.html vim /etc/httpd/conf/httpd.conf

Options Indexes FollowSymlinks

AllowOverride None Order deny,allow

Allow from 127.0.0.1 localhost station.domain16.example.com 192.168.0.16 Deny from all

Options Indexes FollowSymlinks

AllowOverride None Order deny,allow

Allow from 127.0.0.1 localhost station.domain16.example.com192.168.0.16 ::1 Deny from all

service httpd restart

chkconfig httpd on

elinks http://station.domain16.example.com/restricted

13、写一个脚本/root/program,要求当给脚本输入?#38382;齥ernel?#20445;?#33050;本返回user,给脚本输入?#38382;齯ser?#20445;?#33050;本返回kernel。而脚本没有?#38382;?#25110;者?#38382;?#38169;误是,从标准错误输出输出“usage:/root/program kernel|user”

vi /root/program切记双引号前后都要有空格,if语句结尾有分号!!!!

#!/bin/bash

if [ \then echo %user\

elif [ \ echo \else

echo \fi

#chmod +x program

# ./program user # ./program kernel # ./program

14、将/root/cdrom.iso挂载到/opt/data下,并设置为开机自动挂载。

[[email protected]]# wget http://instructor.example.com:/pub/boot.iso)

[[email protected] ~]# mkdir /opt/data [[email protected] ~]# vim /etc/fstab

/root/boot.iso /opt/data iso9660 loop,ro 0 0 [[email protected] ~]# mount -a [[email protected] ~]# df -h

[[email protected] ~]# cd /opt/data

[[email protected] data]# ls

images isolinux TRANS.TBL

15、配置内核?#38382;齥ernblp=1,并要求可以通过/proc/cmdline验证到你的内核?#38382;?

vi /boot/grub/grub.conf

root=UUID=68ed240a-14fe-47fd-ae13-4cd1cf9cadd6 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet kernblp=1 initrd /boot/initramfs-2.6.32-358.el6.x86_64.img shutdown -r

more /proc/cmdline

16、请你访问iscsi共享存储,存储服务器的地址是172.24.30.100,分出1500M空间,格式化成

ext3文件系统,挂载到/mnt/data下,并实现开机自动挂载。

yum install iscsi-initiator-utils

service iscsi start service iscsid start chkconfig iscsi on chkconfig iscsid on

iscsiadm -m discovery -t st -p 192.168.0.1

[ OK ] iscsid: [ OK]192.168.0.1:3260,1 iqn.example.com.target1 iscsiadm -m node -T iqn.example.com.target1 -p 192.168.0.1 -l fdisk -l

Disk /dev/sdb: 206 MB, 206906368 bytes

fdisk -cu /dev/sda考试题是/dev/sda1)

p n p 1

First sector (2048-404113, default 2048): +100M w

mkfs -t ext3 /dev/sda1(直接在分区上mkfs,考试题是/dev/sda1)

partx -a /dev/sdb blkid /dev/sdb1

/dev/sdb1: UUID=\ vi /etc/fstab

UUID=\ /mnt/data ext3 _netdev 0 0 df -h

mkdir /mnt/data mount -a df –h

chkconfig iptables on chkconfig rpcbind on chkconfig nfs on chkconfig httpd on chkconfig vsftpd on chkconfig crond on chkconfig postfix on chkconfig iscsi on chkconfig iscsid on

福利:打开支付宝首页搜索“608066754”即可领取红包,吃个早点,买杯饮料肯定够了,红包加倍最高可以领取99元红包!

「觉得内容不错,打赏支持一下」

南京廖华

觉得内容不错,打赏支持一下

使用微信扫描二维码完成支付

福利:打开支付宝扫描二维码领红包,可免费下载资料 微信:17702577729




最准特马网站资料2018