CentOS7 安装Samba

Posted zelzzz

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CentOS7 安装Samba相关的知识,希望对你有一定的参考价值。

 

系统:CentOS7.6

1、 关闭防火墙

查看状态:firewall-cmd --state
关闭: systemctl stop firewalld
开机禁用: systemctl disable firewalld

2、关闭SELinux
setenforce 0

3、安装samba和samba-client
yum install -y samba sambe-client

4、添加用户
useradd test
pdbedit -a test

5、启动samba服务
添加开机启动:chkconfig smb on
立即启动samba:service smb start

6、测试
1、在windows电脑中打开我的电脑
2、在地址栏中输入 \\IP

7、自定义共享目录
1、创建共享目录,并修改权限
mkdir -p /var/www/html
chmod -R 777 /var/www/html
2、修改配置文件:
先备份 cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
vi /etc/samba/smb.conf
修改如下内容: [html] #共享目录名称 path = /var/www/html #共享目录位置 browseable = yes #是否可以浏览 writeable = yes #是否可以写入 public = no #是否公开

  

 

以上是关于CentOS7 安装Samba的主要内容,如果未能解决你的问题,请参考以下文章

centos7怎么安装 centos7安装步骤

centos7怎么安装 centos7安装步骤

centos7怎么安装 centos7安装步骤

centos7安装教程?

如何安装Centos7

安装centos7正在执行安装后设置需要多久