RHEL 6.3 安装 samba 方法整理.md

来源:互联网 发布:天敏网络电视机顶盒 编辑:程序博客网 时间:2024/04/27 17:46

1. 安装 samba

方法一:

[root@localhost ~]# yum install samba

方法二:

[root@localhost ~]# yum -y install samba samba-client samba-common samba-winbind samba-winbind-clients

2. 添加用户

添加用户:[root@localhost ~]# adduser smb添加密码:[root@localhost ~]# smbpasswd -a smb

3. 配置 samba

[root@localhost ~]# cd /etc/samba/[root@localhost ~]# cp smb.conf smb.conf.bak(备份 samba 配置文件)[root@localhost ~]# vim smb.conf 

配置如下
这里写图片描述

4. RHEL 系统配置

(1)关闭 SELinux

[root@localhost /]# vi /etc/selinux/config 

这里写图片描述

(2)关闭防火墙

[root@localhost ~]# chkconfig iptables off(禁止开机自启)[root@localhost ~]# service stop iptables[root@localhost ~]# service status iptables (查看iptables状态)

注意:
在 RHEL 中, 要真正看是否禁止了 iptables ,重启后运行 service status iptables 如果还在运行,则要 chkconfig libvirtd off 这样 防火墙就再也不会自启了

5. 重启samba

[root@localhost /]# service smb restart [root@localhost /]# chkconfig smb on (使 samba 开机自启)

6. 测试 samba

打开windows运行
输入如:\\192.168.2.146

7. 参考:

[1]:RHEL6.3 Samba服务器安装配置

0 0
原创粉丝点击