1. 下载yumdownloader
yum install -y yum-utils
2. 下载samba
mkdir samba cd samba yumdownloader --resolve avahi-autoipd samba samba-client
3. 安装samba
yum localinstall avahi-autoipd-0.6.31-17.el7.x86_64.rpm avahi-libs-0.6.31-17.el7.x86_64.rpm cups-libs-1.6.3-29.el7.x86_64.rpm krb5-libs-1.15.1-8.el7.x86_64.rpm libldb-1.1.29-1.el7.x86_64.rpm libsmbclient-4.6.2-11.el7_4.x86_64.rpm libtalloc-2.1.9-1.el7.x86_64.rpm libtdb-1.3.12-2.el7.x86_64.rpm libtevent-0.9.31-1.el7.x86_64.rpm libwbclient-4.6.2-11.el7_4.x86_64.rpm pytalloc-2.1.9-1.el7.x86_64.rpm samba-4.6.2-11.el7_4.x86_64.rpm samba-client-4.6.2-11.el7_4.x86_64.rpm samba-client-libs-4.6.2-11.el7_4.x86_64.rpm samba-common-4.6.2-11.el7_4.noarch.rpm samba-common-libs-4.6.2-11.el7_4.x86_64.rpm samba-common-tools-4.6.2-11.el7_4.x86_64.rpm samba-libs-4.6.2-11.el7_4.x86_64.rpm
4. 配置samba
mkdir /home/share vim /etc/samba/smb.conf 在末尾添加 [share] comment = share path = /home/share writable = yes保存并关闭smb.conf 设置登录用户名和密码su rootsmbpasswd -a root
5. 重启samba
service smb restart
6. 访问共享文件夹
\\192.168.1.100\share
PS:如果想要下载指定版本的samba,建议下载地址:http://rpm.pbone.net/。
原文地址:https://www.cnblogs.com/dongc/p/7716166.html
时间: 2024-10-08 19:47:43