CC00031.LinuxNetwork——|Linux&Samba服务.V04|——|挂载Samba|

一、映射网络驱动器(挂载)
### --- 映射网络驱动器(挂载)
### --- Linux下:
### --- 临时挂载:
~~~		//服务器IP/服务器共享/本地挂载目录;默认的文件系统是cifs;-t:指定文件系统,
~~~		-o:账户名及密码

[root@server22 ~]# mount -t cifs -o username=zs,password=空格
### --- 永久挂载:/etc/fstab

[root@server22 ~]# vim /etc/fstab                              // 永久挂载让李四用户访问atyanqi目录到指定目录下
//20.20.20.21/atyanqi                   /atyanqi                  cifs    defaults,username=lisi,password=空格      0 0
### --- 服务器IP/服务器共享 /本地挂载目录cifs  defaults,username=xxx,password=xxx 0 0

[root@server22 ~]# mount -a                                   // mount -a表示扫描/etc/fstab文件下的未挂载的挂载到指定位置
 mount: mount point /atyanqi does not exist                   // 挂载点不会存在
[root@server22 ~]# mkdir  /atyanqi
[root@server22 ~]# mount -a 
mount: block device //20.20.20.21/atyanqi is write-protected, mounting read-only //正常挂载
### --- 可以查看到一个新的挂载

[root@server22 ~]# df -h   
20.20.20.21/atyanqi   18G     2.2G    15G     13%     /atyaqni
### --- windows下:
 
~~~		我的电脑/计算机/此电脑/这台电脑等右键映射网络驱动器[注意是反斜杠\]——>驱动号:Z
~~~		——>文件夹:\\20.20.20.21\atyanqi——>END
二、图形化web管理界面
### --- 图形化web管理界面
~~~		将samba图形化界面程序包导入服务器samba-swat.tar.gz
~~~		这些程序包是el6的,只能在centos6.x下使用,centos7.x是不可以使用的。

[root@server21 ~]# tar -zxvf samba-swat.tar.gz
[root@server21 ~]# cd samba-swat
### --- 安装(导入程序包)

[root@server21 samba-swat]# yum install -y *                // 安装程序包,下面两个软件包必须安装
 samba-swat                                
 xinetd
### --- 修改/etc/xinetd.d/swat

[root@server21 ~]# vim /etc/xinetd.d/swat
添加:
        only_from       = 20.20.20.240                     // 修改登录来源IP地址
        disable = no                                       // disable no是不禁止,disable yes是禁止
### --- 重启xinetd服务

[root@server21 ~]# service xinetd restart
[root@server21 ~]# chkconfig --list xinetd
xinetd          0:off   1:off   2:off   
3:on    4:on    5:on    6:off       					  // 默认开机自启
[root@server21 ~]# netstat -antp                          // 查看901端口是否开启
tcp        0      0 :::901                      :::*                        LISTEN      2050/xinetd
### --- 测试

http://20.20.20.21:901/
三、登录初始状态:用户名:root    密码:空格(默认使用root的账户名及密码)
默认初始页
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

yanqi_vip

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值