|NO.Z.00031|——————————|^^ 部署 ^^|——|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的账户名及密码)

默认初始页

Walter Savage Landor:strove with none,for none was worth my strife.Nature I loved and, next to Nature, Art:I warm'd both hands before the fire of life.It sinks, and I am ready to depart
——W.S.Landor
分类:
cdv007-network
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通