| 两侧同时换到之前的修订记录前一修订版后一修订版 | 前一修订版 |
| zh:常见问题及解答:centos6.x主机之间网络文件挂载 [2016/11/14 10:11] – liuxl | zh:常见问题及解答:centos6.x主机之间网络文件挂载 [2016/11/14 10:27] (当前版本) – liuxl |
|---|
| {{:zh:常见问题及解答:selection_134.png?500|}} | {{:zh:常见问题及解答:selection_134.png?500|}} |
| |
| 9、卸载删除共享 | 9、卸载删除共享: |
| <code>umount 192.168.1.76:/root/my</code> | <code>umount 192.168.1.76:/root/my</code> |
| |
| iptables -I INPUT -p udp -m multiport --dports 137,138 -j ACCEPT</code> | iptables -I INPUT -p udp -m multiport --dports 137,138 -j ACCEPT</code> |
| |
| 新增出站规则:(根据OUTPUT链默认规则添加) | {{:zh:常见问题及解答:selection_038.png?750|}} |
| <code>iptables -I OUTPUT -p tcp -m multiport --sports 139,445 -j ACCEPT | |
| iptables -I OUTPUT -p udp -m multiport --sports 137,138 -j ACCEPT</code> | |
| |
| {{:zh:常见问题及解答:selection_036.png?750|}} | 6、执行挂载操作: |
| | <code> mount -t cifs -o username=sbu,password=123321 //192.168.1.76/root /mnt </code> |
| |
| 6、设置开机自动挂载,客户机上可设置开机自动挂载: | 7、设置开机自动挂载,客户机上可设置开机自动挂载: |
| <code> VIM编辑/etc/fstab,文件末末增加如下: //192.168.1.76/root /mnt cifs defaults,username=smb,password=123321 0 0 </code> | <code> VIM编辑/etc/fstab,文件末增加如下: //192.168.1.76/root /mnt cifs defaults,username=smb,password=123321 0 0 </code> |
| |
| {{:zh:常见问题及解答:selection_035.png?1000|}} | {{:zh:常见问题及解答:selection_035.png?1000|}} |
| | |
| | 8、查看是否已挂载: |
| | <code>df -hT</code> |
| | {{:zh:常见问题及解答:selection_037.png?750|}} |
| | |
| | 9、卸载删除共享: |
| | <code>umount //192.168.1.76/root</code> |