1、系统和软件版本 [root@localhost ~]# cat /etc/redhat-release CentOS Linux release 7.2.1511 (Core) [root@localhost ~]# ls samba-4.5.2 samba-4.5.2.tar.gz
2、安装gcc编译器及samba依赖包 [root@localhost ~]# yum -y install gcc perl python-devel gnutls-devel libacl-devel openldap-devel 3、检查系统环境并生成MakeFile [root@localhost samba-4.5.2]# ./configure 4、编译 [root@localhost samba-4.5.2]#make 5、编译安装 [root@localhost samba-4.5.2]#make install
如果没有报错到这里就安装完成了。
下面是共享的简单配置
6、软件的默认安装目录 [root@localhost samba]# pwd /usr/local/samba 配置文件在: /usr/local/samba/etc/smb.conf #smb.conf默认是没有的需要手动创建,示例在安装包samba-4.5.2/examples/smb.conf.default smb.conf的内容 [global] workgroup = MYGROUP server string = Samba Server server role = standalone server log file = /usr/local/samba/var/log.%m max log size = 50 dns proxy = no [homes] comment = Home Directories browseable = no writable = yes 这段配置默认把用户的家目录共享
新建用户 [root@localhost ~]#useradd test 更改samba用户密码,注意用户密码和samba用户密码不是同一个密码 [root@localhost ~]# /usr/local/samba/bin/smbpasswd -a test 关闭防火墙 [root@localhost ~]# systemctl stop firewalld 启动samba [root@localhost ~]# /usr/local/samba/sbin/smbd [root@localhost ~]# /usr/local/samba/sbin/nmbd
这个就可以访问了 (责任编辑:IT) |