- 论坛徽章:
- 0
|
Normal
0
7.8 磅
0
2
false
false
false
EN-US
ZH-CN
X-NONE
MicrosoftInternetExplorer4
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:普通表格;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Calibri","sans-serif";}
Server
Client
准备工作:
1.
配置ip,Server:192.168.0.1;Client:192.168.0.2,ping通
2.
修改主机名:vi
/etc/sysconfig/network分别加入HOSTNAME=Server
HOSTNAME=Client ;分别输入hostname
Server/ hostname Client
3.
启动time/time-udp/portmap服务
chkconfig time on
chkconfig time-udp on
service xinetd restart
chkconfig –level 345 portmap on
service portmap start
1.建立NIS域名
1. vi /etc/sysconfig/network 加入一句NISDOMAIN=cz.com
2.nisdomainname cz.com
2.服务端生成数据库文件
1.cd /var/yp
2.make
生成/var/yp/cz.com目录
或者用ypinit –m 代替
3.修改配置文件
1.vi /etc/ypserv.conf
删除最后一句的第一个#,保留
*
* * none
2.vi /etc/securenets
255.255.255.0 192.168.0.0
1.vi /etc/yp.conf
将有大写字母的四行最前方#删除
用服务器名Server替换HOSTNAME
用NIS域名cz.com替换NISDOMAIN
2.vi /etc/hosts加入:
192.168.0.1 Server.cz.com Server
4.启动服务
chkconfig –level 345 ypserv on
service ypserv start
chkconfig –level 345 yppasswdd on
service yppasswdd start
chkconfig –level 345 ypbind on
service ypbind start
5.测试
ypcat –x 能看到服务器共享的数据库
ypcat passwd 能看到服务器上的用户
6.NIS域用户登录
1. vi /etc/exports
/home 192.168.0.0/24(rw,async)
2. chkconfig –level 345 nfs on
3. service nfs start
1.
vi /etc/nsswitch.conf
passwd: files nis
shadow: files nis
group: files nis
hosts: files nis dns
2.
vi /etc/fstab
Server:/home /home nfs default 0 0
mount /home
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/5572/showart_1070905.html |
|