“CentOS服务搭建-02-samba文件服务”的版本间的差异

来自DeerGrove Wiki
跳转至: 导航搜索
(创建页面,内容为“category:IS # 安装samba: #: sudo yum install samba # 配置samba共享目录 #: sudo vi /etc/samba/smb.conf #: [rpi_web_notebooks] * comment = 树莓…”)
 
第6行: 第6行:
 
#: sudo vi /etc/samba/smb.conf
 
#: sudo vi /etc/samba/smb.conf
 
#: [rpi_web_notebooks]
 
#: [rpi_web_notebooks]
*       comment = 树莓派jupyter notebook目录
+
* comment = 树莓派jupyter notebook目录
*       path = /home/pi/web_notebooks
+
* path = /home/pi/web_notebooks
*       browseable = Yes
+
* browseable = Yes
*       read only = No
+
* read only = No
*       public = yes
+
* public = yes
*       guest ok = yes
+
* guest ok = yes
*       writable = yes
+
* writable = yes
*       create mask = 0777
+
* create mask = 0777
*       directory mask = 0777
+
* directory mask = 0777
 
# 启动samba服务并设置自启动:
 
# 启动samba服务并设置自启动:
 
#: sudo systemctl start smb
 
#: sudo systemctl start smb

2019年9月26日 (四) 15:29的版本


  1. 安装samba:
    sudo yum install samba
  2. 配置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
  1. 启动samba服务并设置自启动:
    sudo systemctl start smb
    sudo systemctl enable smb
    sudo systemctl status smb
  2. 修改防火墙:
    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