RHCE 6.0 集训试题+答案(2)
日期:2011-11-04
点击:133
来源: 未知
分享至:
fdisk /dev/sda
mkfs.etx3 /dev/sda
mount /dev/sda5 /mnt/storage
写在开机脚本/etc/fstab
属性_netdev
脚本
写一个脚本/root/myscripts.sh,当用户输入/root/myscripts.sh all显示none,当用户输入/root/myscripts.sh none显示all,执行/root/myscripts.sh非all或none时候,则显示\"Error,please input all/no\"
#!/bin/bash
word=$1
if [ $word = all ]
then echo \"none\"
else if [ $word = none ]
then echo \"all\"
else
echo \"Error,please input all/none\"
fi
fi
Chmod a+x /myscripts.sh
[$word = none ] 可以修改为test $word = none test 命令脚本
共享/mnt/storage目录。允许example.com域里面的用户对该目录有读写权限,remote.test对该用户仅有只读权限。
service nfs restart
chkconfig nfs on
vim /etc/exports
/mnt/storage *.example.com(rw,sync)
/mnt/storage *.remote.test(ro,sync)
测试: ssh 192.168.0.16 ; showmount -e 192.168.0.116 ;
允许example.com域中的计算机可以访问ssh server 拒绝remote.test域中的计算级访问ssh server
sshd:.example.com
/etc/hosts.allow sshd: ALL EXCEPT .example.com
/etc/hosts.deny sshd: .example.com
关于我们 - 联系我们 - 广告服务 - 友情链接 - 网站地图 - 版权声明 - 发展历史