1 / 15

Linux 操作系统 网络文件系统

Linux 操作系统 网络文件系统. 周炯 上海艾基信息技术有限公司. 内容提要. 1 FTP 服务器的安装与设置 2 NFS 服务器的安装与设置 3 SAMBA. 1. FTP 服务器的安装. ftp 软件 vsftpd wu-ftpd 、 proftpd 、 pureftpd 等 vsftpd 安装 如果选择完全安装 Linux ,则系统就默认安装 vsftpd 服务器。 Linux 添加应用程序

carl
Download Presentation

Linux 操作系统 网络文件系统

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Linux操作系统网络文件系统 周炯 上海艾基信息技术有限公司 Acegene IT Co. Ltd.

  2. 内容提要 • 1 FTP服务器的安装与设置 • 2 NFS服务器的安装与设置 • 3 SAMBA Acegene IT Co. Ltd.

  3. 1. FTP服务器的安装 • ftp软件 • vsftpd • wu-ftpd、proftpd、pureftpd等 • vsftpd安装 • 如果选择完全安装Linux,则系统就默认安装vsftpd服务器。 • Linux添加应用程序 • Redhat: 单击【主菜单】|【系统设置】|【添加删除应用程序】菜单项,在出现的【软件包管理】对话框里选中“FTP服务器”选项,然后单击【更新】按钮,插入要求的安装光盘,按照屏幕提示完成安装。 • SUSE: 使用YaST • RPM安装 • 获得vsftpd-1.1.3-8.i386.rpm安装包 • # rpm –ivh vsftpd-1.1.3-8.i386.rpm Acegene IT Co. Ltd.

  4. 1. FTP服务器的安装与设置 • vsftpd配置文件 • /etc/vsftpd.ftpusers 指定哪些用户帐号不能访问FTP服务器。 • /etc/vsftpd.usr_list 该文件里的用户帐号在默认情况下也不能访问FTP服务器。 • /etc/vsftpd/vsftpd.conf 定义用户登录控制、用户权限控制、超时设置、服务器性能选项、服务器响应消息等FTP服务器的配置。 Acegene IT Co. Ltd.

  5. 1 FTP服务器的设置 • (1)用户登录控制 • anonymous.enable=YES,允许匿名用户登录。 • no_anon_password=YES,匿名用户登录时不需要输入密码。 • local_enable=YES,允许本地用户登录。 • deny_email_enable=YES,可以创建一个文件保存某些匿名电子邮件的黑名单,以防止这些人使用Dos攻击。 • (2)用户权限控制 • write_enable=YES,开启全局上传权限。 • anon_upload_enable=YES,允许匿名用户具有上传权限。 • anon_mkdir_wirte_enable=YES,允许匿名用户有创建目录的权利。 • chown_username=whoever,当启用chown_uploads=YES时,所指定的属主用户帐号,此处的whoever用合法的用户帐号来代替。 • chroot_list_enable=YES,用一个列表限定哪些本地用户只能在自己目录下活动。 • (3)用户连接和超时选项 • idle_session_timeout=600,设定默认的空闲超时时间,用户超过这段时间不动作将被服务器踢出。 • data_connection_timeout=120,设定默认的数据连接超时时间。 • (4)服务器日志和欢迎信息 • dirmessage_enable=YES,允许为目录配置显示信息,显示每个目录下面的message_file文件的内容。 • ftpd_banner=Welcome to FTP service,自定义FTP用户登录到服务器所看到的欢迎信息。 • xferlog_enable=YES,启用记录上传/下载活动日志功能。 • xferlog_file=/var/log/vsftpd.log,自定义日志文件的保存路径和文件名,默认是/var/log/vsftpd.log。 Acegene IT Co. Ltd.

  6. 1 FTP服务器的安装与设置 • 启动/重新启动/停止vsftpd服务 • 启动vsftpd服务: • # /etc/rc.d/init.d/vsftpd start • 重新启动vsftpd服务: • # /etc/rc.d/init.d/vsftpd restart • 关闭vsftpd服务: • # /etc/rc.d/init.d/vsftpd stop Acegene IT Co. Ltd.

  7. 2 网络文件系统NFS服务器配置 • Make nfs mountpoint (NFS host): • mkdir -p /nfs • Set /etc/exports (NFS host) /nfs prv1.demo(rw,no_root_squash) prv2.demo(rw,no_root_squash) • Set /etc/hosts • 127.0.0.1 localhost.localdomain localhost • 10.1.1.1 prv1.demo prv1 #public network interface • 10.1.1.2 prv2.demo prv2 #public network interface • Configure start unused services(NFS host): • chkconfig --level 2345 nfs on • Set the accessrights for the nfs mountpoint (NFS host) • chmod 777 /nfs • mount -t ext3 /dev/sdd3 /nfs • /etc/fstab • /dev/sdd3 /nfs ext3 defaults 1 2 • Mount /nfs • Edited /etc/modules.conf (NFS host) • options nfs nfs_uncached_io=1 • Reboot Acegene IT Co. Ltd.

  8. 2 网络文件系统NFS客户端配置 • Make the mountpoint (NFS client) : • mkdir -p /oracle/oradata • Configure /etc/fstab (NFS client) share.demo:/nfs /u01/oradata nfs rsize=8192,wsize=8192,timeo=14,soft,nointr,tcp,noac • Mount the nfs mountpoint (NFS client) • mount /u01/oradata Acegene IT Co. Ltd.

  9. 3 Samba文件系统 • samba是Windows系统的网络文件协议 • samba可以用于与Windows系统文件共享 • Linux中访问Windows文件系统 • 配置/etc/fstab //[host]/[share] /[dir] smbfs username=[user],password=[pwd] 1 2 • #mount /[dir] • 直接连接 #mount -t smbfs -o username=[user],password=[pwd] //[host]/[share] /[dir] Acegene IT Co. Ltd.

  10. 3 配置Linux上的samba服务器 • 配置文件 /etc/samba • smb.conf主要配置 • smbpasswd 帐户信息 Acegene IT Co. Ltd.

  11. 3 Samba • smb.conf配置信息 • workgroup : 設定網絡群組 • printcap name : Samba 3預設為CUPS,CUPS為Unix系統列印服務 • load printers :Samba啟動時自動載入印表機設定 • printing :如系統使用CUPS可忽略上兩項 • hosts allow : 設定可連線之客戶端IP地址範圍 • security : 設為user,效果類似一般MSWindows檔案共享(非網域架構) • password server : 可讓Samba用第二台電腦作密碼認證 • encrypt passwords : 把密碼以加密形式傳送 • local master : 本地主瀏覽 • os level : 系統等級 • preferred master : 主瀏覽優勢 Acegene IT Co. Ltd.

  12. 3 Samba • smb.conf配置信息 [sample] comment = something share path = /home/somewhere browseable = yes writable = yes create mask = 0755 valid users = @staff lancelot public = no printable = no Acegene IT Co. Ltd.

  13. 3 Samba • 注意事项 • 檔案權限層次 • 使用者名稱對換 • 密碼加密情況 • 網域角色 • 群組證策 • 軟件派發 • 並非盲目替代MSWindows Acegene IT Co. Ltd.

  14. Q & Q U E S T I O N S A N S W E R S A

  15. 练习 • 配置vsftpd • 启动服务器 • 客户端连接服务器 • 配置NFS • 启动服务器 • 客户端连接服务器 • 配置samba • 连接windows系统共享文件 • /etc/fstab //[host]/[share] /[dir] smbfs username=[user],password=[pwd] 1 2 Acegene IT Co. Ltd.

More Related