linux|linux 配置samba服务器
samba为文件服务器,可实现Linux和windows的数据互发,非常常用和常见。
1.安装samba服务器
yum install -y samba samba-common(工具) samba-client(终端)
2.备份samba配置文件
cp /etc/samba/smb.conf/etc/samba/smb.conf.backup
3.配置samba配置文件
vi /etc/samba/smb.conf
内容如下:
【linux|linux 配置samba服务器】samba-client-4.7.1-6.el7.x86_64
[root@localhost log]# vim /etc/samba/smb.conf
# See smb.conf.example for a more detailed config file or
# read the smb.conf manpage.
# Run 'testparm' to verify the config is correct after
# you modified it.
[global]
workgroup = workgroup
security = user
map to guest = Bad User
passdb backend = tdbsam
printing = cups
printcap name = cups
load printers = yes
cups options = raw
[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = No
read only = No
inherit acls = Yes
[printers]
comment = All Printers
path = /var/tmp
printable = Yes
create mask = 0600
browseable = yes
[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @printadmin root
force group = @printadmin
create mask = 0664
directory mask = 0775
[test123]
comment=this is a import files
path=/etc/test
public=yes
writable=yes
guest ok =yes
保存并关闭:wq
4.关闭网络防火墙和selinux
systemctl stop firewalld
setenforece 0
systemctl restart smb
5.在windows种查看结果
在任务栏输入\\192.168.x.x\test123
推荐阅读
- vue-cli|vue-cli 3.x vue.config.js 配置
- Linux下面如何查看tomcat已经使用多少线程
- Beego打包部署到Linux
- 从战略性的角度可以配置股票
- Linux|109 个实用 shell 脚本
- linux定时任务contab
- 缓存有关的配置和属性
- 芯灵思SinlinxA33开发板Linux内核定时器编程
- Spring|Spring Boot 自动配置的原理、核心注解以及利用自动配置实现了自定义 Starter 组件
- Vagrant|Vagrant (三) - 网络配置