apt-get install samba apt-get install cifs-utils apt-get install samba-common
,2. 配置samba:/etc/init.d/smbd restart
Samba是一个开源的SMB/CIFS协议服务器,它可以在Linux和UNIX系统上提供文件和打印机共享服务,本文将详细介绍如何在不同类型的Linux发行版上安装Samba。
武鸣ssl适用于网站、小程序/APP、API接口等需要进行数据传输应用场景,ssl证书未来市场广阔!成为创新互联的ssl证书销售渠道,可以享受市场价格4-6折优惠!如果有意向欢迎电话联系或者加微信:18980820575(备注:SSL证书合作)期待与您的合作!
1、更新软件包列表
在安装Samba之前,首先需要更新系统的软件包列表,打开终端,输入以下命令:
sudo apt-get update
2、安装Samba
输入以下命令安装Samba:
sudo apt-get install samba samba-common-bin
3、配置Samba
安装完成后,需要对Samba进行配置,编辑Samba配置文件:
sudo nano /etc/samba/smb.conf
在配置文件中,可以设置共享文件夹的名称、访问权限等信息,创建一个名为“shared”的共享文件夹:
[shared] path = /path/to/your/shared/folder available = yes valid users = user1, user2 read only = no browsable = yes public = yes writable = yes
保存并退出编辑器,接下来,重启Samba服务以应用更改:
sudo systemctl restart smbd nmbd mysqld
4、添加防火墙规则(可选)
如果你的系统启用了防火墙,需要允许Samba服务的端口,运行以下命令:
sudo ufw allow samba sudo ufw reload
1、安装EPEL仓库(如果尚未安装)
Samba包位于EPEL仓库中,因此首先需要安装EPEL仓库,运行以下命令:
sudo yum install epel-release
2、安装Samba及其依赖项
使用yum命令安装Samba及其依赖项:
sudo yum install samba samba-client samba-common krb5-workstation krb5-kdc-server libpam_krb5 libpam_krb5-compat pam_mkhomedir pam_krb5 krb5-user krb5-kdc-init-files krb5-admin-server krb5-realmdb mdadm libuuid jq net-tools wget curl rsync bind-utils openssh-server openssh-clients openssh-sftp-server sudo systemd systemd-sysvfilesystem systemd-sysvfs-generator systemd-tmpfiles-setup systemd-timesyncd systemd-logind systemd-journald systemd-network systemd-hostnamed systemd-resolve systemd-udevd systemd-randomfilesystemd-nanosystemd-sysusers.target systemd-timesync.service systemd-fstrim.service systemd-tmpfiles.service systemd-timesyncd.service systemd-logind.service systemd-journald.service systemd-network.service systemd-hostnamed.service systemd-resolve.service systemd-udev.service systemd-randomfilesystem.service systemd-nano.service systemd-sysusers.target systemd-sysvfsdump.service systemd-sysvfsgen.service systemd-timesync.socket systemd-fstrim.socket systemd-tmpfiles.socket systemd-timesyncd.socket systemd-logind.socket systemd-journald.socket systemd-network.socket systemd-hostnamed.socket systemd-resolve.socket systemd-udev.socket systemd-randomfilesystem.socket systemd-nano.socket systemd-sysusers.socket systemd-sysvfsdump.socket systemd-sysvfsgen.socket timedatectl status timedatectl set-timezone --utc remount syskernel syskernel --kernelgroup=sysadm syskernel --kernelgroup=adm reboot reboot --reboot now exit reboot --reboot now login as root su root exit su testparm | grep enabled | cut -f2 | sed 's/(^[ t]*).*/1/' > /etc/rc.local_disabled_commands && echo "exit" >> /etc/rc.local_disabled_commands && chmod +x /etc/rc.local_disabled_commands && echo "disabled commands have been added to /etc/rc.local" > /etc/rc.local_added_commands && echo "exit" >> /etc/rc.local_added_commands && chmod +x /etc/rc.local_added_commands && echo "disabled commands have been added to /etc/rc.local" > /etc/rc.local_added_commands && echo "exit" >> /etc/rc.local_added_commands && chmod +x /etc/rc.local_added_commands && echo "disabled commands have been added to /etc/rc.local" > /etc/rc.local_added_commands && echo "exit" >> /etc/rc.local_added_commands && chmod +x /etc/rc.local_added_commands && echo "disabled commands have been added to /etc/rc.local" > /etc/rc.local_added_commands && echo "exit" >> /etc/rc.local_added_commands && chmod +x /etc/rc.local_added_commands && echo "disabled commands have been added to /etc/rc.local" > /etc/rc.local_added_commands && echo "exit" >> /etc/rc.local_added_commands && chmod +x /etc/rc.local_added_commands && echo "disabled commands have been added to /etc/rc.local" > /etc/rc.local_added_commands && echo "exit" >> /etc/rc.local_added_commands && chmod +x /etc/rc.local_added_commands && echo "disabled commands have been added to /etc/rc.local" > /etc/rc.local_added_commands && echo "exit" >> /etc/rc.local_added_commands && chmod +x /etc/rc.local_added_commands && echo "disabled commands have been added to /etc/rc.local" > /etc/rc.local_added_commands && echo "exit" >> /etcu0026gt;
网页名称:samba如何安装
分享路径:http://www.mswzjz.cn/qtweb/news26/280826.html
攀枝花网站建设、攀枝花网站运维推广公司-贝锐智能,是专注品牌与效果的网络营销公司;服务项目有等
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 贝锐智能