Chinaunix首页 | 论坛 | 博客
  • 博客访问: 28132
  • 博文数量: 10
  • 博客积分: 360
  • 博客等级: 一等列兵
  • 技术积分: 110
  • 用 户 组: 普通用户
  • 注册时间: 2008-11-24 20:58
文章分类

全部博文(10)

文章存档

2011年(1)

2010年(9)

我的朋友
最近访客

分类: LINUX

2010-08-16 00:07:17

tftp服务器配置
 
1、netstat -a | grep tftp  //查看那tftp服务是否启动
   已安装结果:udp 0 0 *:tftp *:*
 
2、如果没有安装:rpm -ivh tftp-server-0.42-3.1.i386.rpm
 
3、建立tftp主工作目录
   mkdir /tftpboot
 
4、修改配置文件vi /etc/xinetd.d/tftp
# default: off
# description: The tftp server serves files using the trivial file transfer \
#       protocol.  The tftp protocol is often used to boot diskless \
#       workstations, download configuration files to network-aware printers, \
#       and to start the installation process for some operating systems.
service tftp
{
        disable   = no   //tftp服务关闭,设置no为不关闭
        socket_type             = dgram
        protocol                = udp
        wait                    = yes
        user                    = root
        server                  = /usr/sbin/in.tftpd
        server_args             = -s /tftpboot  //tftp工作目录
        per_source              = 11
        cps                     = 100 2
        flags                   = IPv4
}
 

5、tftp重启服务
#/etc/init.d/xinetd restart
#netstat -a | grep tftp
udp 0 0 *:tftp *:*
 
总结:
setup命令查看已经安装的服务
                                                            
                         ┌─────┤ 选择一种工具 ├─────┐                         
                         │                            │                         
                         │        X 配置             │                         
                         │        时区配置          │                         
                         │        系统服务          │                         
                         │        网络配置          │                         
                         │        键盘配置          │                         
                         │        防火墙配置        │                         
                         │        验证配置          │                         
                         │                          │                         
                         │  ┌──────────┐  ┌──────┐  │                         
                         │  │ 运行工具 │  │ 退出 │  │                         
                         │  └──────────┘  └──────┘  │                         
                         │                          │                         
                         │                          │                         
                         └──────────────────────────┘                         
 在系统服务选项中有tftp服务
 - (C) 2000-2001 Red Hat, Inc.                                 
                      ┌────────────┤ 服务 ├─────────────┐                     
                      │                                 │                     
                      │ 您想自动启动哪些服务?          │                     
                      │                                 │                     
                      │ [*] sshd                      ↑ │                     
                      │ [*] syslog                    ? │                     
                      │ [ ] tcpmux-server             ? │                     
                      │ [ ] telnet                    ? │                     
                      │ [*] tftp                      ? │                     
                      │ [ ] time-dgram                ? │                     
                      │ [ ] time-stream               ? │                     
                      │ [ ] tux                       ↓ │                     
                      │                                 │                     
                      │     ┌──────┐       ┌──────┐     │                     
                      │     │ 确定 │       │ 取消 │     │                     
                      │     └──────┘       └──────┘     │                     
                      │                                 │                     
                      │                                 │                     
                      └─────────────────────────────────┘  
samba服务器配置
1、配置:/etc/samba/smb.conf添加:
[root]
comment = Root Directories
browseable = yes
writeable = yes
path = /smb_root (共享目录, mkdir /smb_root   chmod 777 /smb_root)
valid users = linux (用户名)
 
2、添加samba用户
useradd linux   (添加用户)
smbpasswd -a linux  (修改密码)
 
3、重启
#/etc/init.d/smb restart
 
4、windows——运行

输入用户名:linux
密码:linux
   
nfs服务器配置
1、查看是否安装:rpm -q nfs-utils
     nfs-utils-1.0.9-24.el5
     或者使用setup命令查看是否安装
 
2、安装:rpm -ivh nfs-utils-1.0.9-24.el5.i386.rpm
 
3、nfs配置:vi /etc/exports
    加入允许其它计算机访问的目录和访问权限
    mkdir nfs_root
    例:/nfs_root 192.168.0.*(rw, sync, no_root_squash)
    /nfs_root:允许其他计算机访问的目录
    192.168.0.*:被允许访问该目录的客户端的IP地址
    rw:可读写
    sync:同步写磁盘(async:资料会先暂存于内存当中,而非直接写入硬盘)
    no_root_squash:表示客户端root用户对该目录具备写权限
 
4、启动nfs服务器命令:/etc/init.d/nfs start
 
5、重启nfs服务器命令:/etc/init.d/nfs restart
 
6、挂载nfs服务器上的共享目录
    #mount -t nfs servername:/shared_dir /localdir
    例:#mount -t nfs 192.168.0.211:/nfs_root /mnt/nfs
    有时:#mount -o nolock -t nfs 192.168.0.111:/nfs_root /mnt/nfs
阅读(1040) | 评论(0) | 转发(0) |
0

上一篇:小程序

下一篇:重连

给主人留下些什么吧!~~