RHCE6.0认证考试笔记精华

【RHSCA篇】
一、swap
fdisk /dev/sdb #nt,创建swap分区
mkswap /dev/sdb1         #格式化swap分区
swapon  /dev/sdb1          #激活swap分区
cat /proc/swap            #查看swap激活情况
#创建文件swap (文件swap不能建立在dev目录,否则激活不成功。)
dd if=/dev/zero of=/data/tmpswap bs=1024 count=20000
mkswap -L lableswap /data/tmpswap
swapon /data/tmpswap
 
二、磁盘UUID
ls -l  /dev/disk/by_uuid  #查看磁盘的uuid对应关系
 
三、/etc/fstab
man fstab 查看 5、6列作用
5、dump 1,nodump 0
6、fsck检查磁盘 ,0不检查,1 只检查root,2其他的也检查
挂载iso 到/etc/fstab
/root/rhel-server-6.0-i386-dvd.iso /mnt/rhel6 iso9660 loop,ro 0 0
 
四、创建组(子文件从属组属性)
chmod g+s  dir
 
五、路由转发功能开启
echo 1 > /proc/sys/net/ipv4/ip_forward        #实时更改
#永久更改
echo 1 >/proc/sys/net/ipv4/ip_forward   #改句添加到 /etc/rc.d/rc.local
或者
echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
sysctl -p
或者
sysctl -w net.ipv4.ip_forward=1  #实时更改
 
五、NIS的配置
 
[root@RedHat2 yp]# service ypbind restart
Shutting down NIS service: [ OK ]
Starting NIS service: [ OK ]
Binding NIS service: ......................[FAILED]
客户端连接服务端是绑定nis服务报错
 
1、服务端需要开启rpcbind ,ypserv 服务
2、服务端的防火墙对111udp端口不做限制
3、服务端需要初始化 ypinit(map)数据
/usr/lib/yp/ypinit -m
4、客户端/etc/yp.conf (这点有时候需要,有时候用ip地址也行,想不明白)
domain domainname server hostname
需要填写hostname,并且在/etc/hosts配置上对应的IP地址
5、服务端/etc/ypserv.conf
正确配置访问列表
rpcinfo -p nisservrname
6、服务端rpcbind服务启动后,需要检查端口111的tcp是否启动
如果没有启动,需要到/etc/services 检查
sunrpc 111/tcp portmapper rpcbind # RPC 4.0 portmapper TCP
上面这行是否已经被注释。
7、服务端的hostname命令输入的名字需要和/etc/hosts配置的一致
 
ypcat passwd 测试远程用户
这样会显示出NIS服务器上的password数据,(请记住,只有在服务器上/etc/passwd文件中UID大于等于500的用户才会被放进数据库中)
 
 
六、locale
 
I18N AND L10N
Internationalization(I18N) and localization(L10N) are supported at least in
principle even on EBCDIC platforms. The details are system dependent and discussed
under the "OS ISSUES" in perlebcdic section below.
 
en_US.utf8
 
七、bshell
When bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for
~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and exe-cutes commands from the first one that exists and is readable. The --noprofileoption may be used when the shell is started to inhibit this behavior.
When a login shell exits, bash reads and executes commands from the file
~/.bash_logout, if it exists.
When an interactive shell that is not a login shell is started, bash reads and exe-
cutes commands from ~/.bashrc, if that file exists.

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/21664.html