CentOS服务搭建-02-samba文件服务
- 安装samba:
- sudo yum install samba
- 配置samba共享目录
- sudo vi /etc/samba/smb.conf
- [rpi_web_notebooks]
- comment = 树莓派jupyter notebook目录
- path = /home/pi/web_notebooks
- browseable = Yes
- read only = No
- public = yes
- guest ok = yes
- writable = yes
- create mask = 0777
- directory mask = 0777
- 启动samba服务并设置自启动:
- sudo systemctl start smb
- sudo systemctl enable smb
- sudo systemctl status smb
- 修改防火墙:
- sudo firewall-cmd --zone=public --add-port=139/tcp --permanent
- sudo firewall-cmd --zone=public --add-port=445/tcp --permanent
- sudo firewall-cmd --zone=public --add-port=137/udp --permanent
- sudo firewall-cmd --zone=public --add-port=138/udp --permanent
- sudo firewall-cmd --reload
- sudo systemctl restart firewalld.service