“CentOS服务搭建-02-samba文件服务”的版本间的差异
第6行: | 第6行: | ||
#: sudo vi /etc/samba/smb.conf | #: sudo vi /etc/samba/smb.conf | ||
#: [rpi_web_notebooks] | #: [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服务并设置自启动: | # 启动samba服务并设置自启动: | ||
#: sudo systemctl start smb | #: sudo systemctl start smb |
2019年9月26日 (四) 15:30的版本
- 安装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