Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1368145
  • 博文数量: 828
  • 博客积分: 10000
  • 博客等级: 上将
  • 技术积分: 5030
  • 用 户 组: 普通用户
  • 注册时间: 2008-08-29 13:29
文章分类

全部博文(828)

文章存档

2011年(1)

2008年(827)

我的朋友

分类: LINUX

2008-08-29 13:36:37

 
NFS:

nfs的组成:rpc.portmapper,rpc.nfsd,rpc.mountd

nfs的安装:sudoaptitudeinstallnfs-kernel-serverornfs-user-server

nfs的启动和停止:sudo/etc/init.d/nfs-kernel-serverrestart|stop|start

nfs的检查:psax|grepnfsdps-aux|grepportmap

nfs的配置:/etc/exports文件当中

/usr192.168.1.100(rw)/home/xp192.168.1.12(rw,sync)*(ro,async)

选项说明:

no_root_squash远端root用户对nfs目录具有完全访问权限

rw读写,默认ro只读sync同步

配置检查:exportfs-rv

客户端:

查看NFS共享内容:showmount-e服务器主机名或ip

安装内容:sudomount192.168.1.100:/home/share/mnt/nfsdir

卸载内容:sudoumount/mnt/nfsdir

------------------------------

FTP:port:21

安装:sudoaptitudeinstallvsftpd

启动和停止:sudo/etc/init.d/vsftdstart|stop|restart

配置文件:/etc/vsftpd.conf

PAM配置:/etc/pam.d/vsftpd

用户访问控制:/etc/vsftpd.ftpusers写在当中的本地用户静止登录/etc/vsftpd.user_list

设置空闲会话中断时间:idle_session_timeout=600(second)

设置空闲数据连接的中断时间:data_connection_timeout=120

设置客户端空闲时的自动中断和激活连接时间:accept_timeout=60connect_timeout=60

vsftpd匿名上传配置:

anon_upload_enable=Yes

anon_mkdir_write_enable=Yes

anon_other_write_enable=Yes

anon_world_readable_only=No

配置速率限制和每用户的连接数限制:

local_max_rate

anon_max_rate

max_per_ip

max_clients

基于本地用户的配置:

userlist_enable=Yes

userlist_deny=Yes

userlist_file=/etc/vsftpd.user_list

客户端操作:

getremotefile[localfile]

putlocalfile[remotefile]

mgetremote-files

mputlocal-files

lftp命令:

mirror[option][remote[local]]

-c续传

-R上传整个目录

-r不用递归到目录中

-n只下载较新的档案

------------------------------

有些服务程序需要xinetd:sudoaptitudeinstallxinetd

启动xinetd:sudo/etc/init.d/xinetdreload

测试xinetd:psax|grepxinetd

xinetd的配置文件有:/etc/xinetd.conf/etc/xinetd.d/目录下的与各服务一一对应的配置文件

-----------------------

TFTP:无连接的UDP传送文件,一般用于小文件,实现简单port:69

安装:sudoaptitudeinstalltftpd

安装程序会在/etc/inetd.conf中添加一行:tftpdgramudpwaitnobody……

xinet要使用需要转换:itox-daemon_dir/usr/sbin
创建文件/etc/xinetd.d/tftp内容是转换得到的tftp段

//////////////////////////tftp有此部分////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

看/etc/xinetd.d/tftp文件中server_args=/srv/tftp,则手工创建:

sudomkdir/srv/tftp

sudochmoda w/srv/tftp

/////////////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

重启xinetd以读取配置文件:sudo/etc/init.d/xinetdrestart

客户端:

sudoaptitudeinstallatftp

atftp127.0.0.1

---------------------

TELNET:port:23

安装:sudoaptitudeinstalltelnetd

创建文件:/etc/xinetd.d/telnet内容是/etc/inetd.conf转换过来的段

重启xinetd,读取新的配置文件,服务开通

------------------

SSH:port:22

安装:sudoaptitudeinstallssh

查看:sudonetstat-apn|grep":22"

客户端登录:sshuser@ip退出:logout

登录以后可以像操作自己的电脑一样使用

不登录对方使用:

scplocalfileuser@ip:/remote_pathorremote_file

scpuser@ip:/remote_filelocalfileorlocalpath

/etc/hosts.deny

sudo/etc/init.d/sshstart|stop

常用Linux系统服务程序配置常用Linux系统服务程序配置常用Linux系统服务程序配置常用Linux系统服务程序配置常用Linux系统服务程序配置常用Linux系统服务程序配置常用Linux系统服务程序配置常用Linux系统服务程序配置常用Linux系统服务程序配置常用Linux系统服务程序配置
阅读(1077) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~