| 论坛注册| 加入收藏 | 设为首页| RSS
Google
您当前的位置:首页 > Linux频道 > Linux入门与提高 > 安装与配置

Linux系统 常用服务程序配置

时间:2007-11-12 15:34:06  来源:Linux联盟收集整理  作者:
 

NFS: YrpLinux联盟

nfs的组成:rpc.portmapper, rpc.nfsd, rpc.mountd YrpLinux联盟

nfs的安装:sudo aptitude install nfs-kernel-server or nfs-user-server YrpLinux联盟

nfs的启动和停止:sudo /etc/init.d/nfs-kernel-server restart|stop|start YrpLinux联盟

nfs的检查:ps ax | grep nfsd ps -aux | grep portmap YrpLinux联盟

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

/usr 192.168.1.100 (rw) /home/xp 192.168.1.12(rw,sync) *(ro,async) YrpLinux联盟

选项说明: YrpLinux联盟

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

rw 读写,默认 ro 只读 sync 同步 YrpLinux联盟

配置检查:exportfs -rv YrpLinux联盟

客户端: YrpLinux联盟

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

安装内容:sudo mount 192.168.1.100:/home/share /mnt/nfsdir YrpLinux联盟

卸载内容:sudo umount /mnt/nfsdir YrpLinux联盟

------------------------------ YrpLinux联盟

FTP: port:21 YrpLinux联盟

安装:sudo aptitude install vsftpd YrpLinux联盟

启动和停止:sudo /etc/init.d/vsftd start|stop|restart YrpLinux联盟

配置文件:/etc/vsftpd.conf YrpLinux联盟

PAM配置:/etc/pam.d/vsftpd YrpLinux联盟

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

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

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

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

vsftpd匿名上传配置: YrpLinux联盟

anon_upload_enable = Yes YrpLinux联盟

anon_mkdir_write_enable = Yes YrpLinux联盟

anon_other_write_enable = Yes YrpLinux联盟

anon_world_readable_only = No YrpLinux联盟

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

local_max_rate YrpLinux联盟

anon_max_rate YrpLinux联盟

max_per_ip YrpLinux联盟

max_clients YrpLinux联盟

基于本地用户的配置: YrpLinux联盟

userlist_enable = Yes YrpLinux联盟

userlist_deny = Yes YrpLinux联盟

userlist_file = /etc/vsftpd.user_list YrpLinux联盟

客户端操作: YrpLinux联盟

get remotefile [localfile] YrpLinux联盟

put localfile [remotefile] YrpLinux联盟

mget remote-files YrpLinux联盟

mput local-files YrpLinux联盟

lftp命令: YrpLinux联盟

mirror [option] [remote [local]] YrpLinux联盟

-c 续传 YrpLinux联盟

-R 上传整个目录 YrpLinux联盟

-r 不用递归到目录中 YrpLinux联盟

-n 只下载较新的档案 YrpLinux联盟

------------------------------ YrpLinux联盟

有些服务程序需要xinetd: sudo aptitude install xinetd YrpLinux联盟

启动xinetd:sudo /etc/init.d/xinetd reload YrpLinux联盟

测试xinetd:ps ax | grep xinetd YrpLinux联盟

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

----------------------- YrpLinux联盟

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

安装:sudo aptitude install tftpd YrpLinux联盟

安装程序会在/etc/inetd.conf中添加一行:tftp dgram udp wait nobody ..... YrpLinux联盟

xinet要使用需要转换:itox -daemon_dir /usr/sbin < /etc/inetd.conf YrpLinux联盟

创建文件/etc/xinetd.d/tftp 内容是转换得到的tftp段 YrpLinux联盟

//////////////////////////tftp有此部分////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ YrpLinux联盟

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

sudo mkdir /srv/tftp YrpLinux联盟

sudo chmod a+w /srv/tftp YrpLinux联盟

/////////////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ YrpLinux联盟

重启xinetd以读取配置文件:sudo /etc/init.d/xinetd restart YrpLinux联盟

客户端: YrpLinux联盟

sudo aptitude install atftp YrpLinux联盟

atftp 127.0.0.1 YrpLinux联盟

--------------------- YrpLinux联盟

TELNET: port:23 YrpLinux联盟

安装:sudo aptitude install telnetd YrpLinux联盟

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

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

------------------ YrpLinux联盟

SSH: port:22 YrpLinux联盟

安装:sudo aptitude install ssh YrpLinux联盟

查看:sudo netstat -apn | grep ":22" YrpLinux联盟

客户端登录:ssh user@ip 退出:logout YrpLinux联盟

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

不登录对方使用: YrpLinux联盟

scp localfile user@ip:/remote_path or remote_file YrpLinux联盟

scp user@ip:/remote_file localfile or localpath YrpLinux联盟

/etc/hosts.deny YrpLinux联盟

sudo /etc/init.d/ssh start|stop YrpLinux联盟

来顶一下
近回首页
返回首页
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表
相关文章
栏目更新
栏目热门