歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Samba服務器入門(1)

Samba服務器入門(1)

日期:2017/2/25 10:35:19   编辑:Linux教程
准備工作
[root@localhost /]# /sbin/service smb restart
#restart重新打開samba服務,有的系統安裝完開機就會自動打開.
#start打開,stop關閉
關閉 SMB 服務: [確定]
啟動 SMB 服務: [確定]
[root@localhost /]# /sbin/service nmb restart
#這個服務也打開
關閉 NMB 服務: [確定]
啟動 NMB 服務: [確定]
[root@localhost samba]# /sbin/iptables -F
#把防火牆規則清掉,等於關閉防火牆,這一步很有必要,否則Windows無法訪問Linux
[root@localhost ~]# netstat -tlnp |grep smb
#當然你也可以通過這一步來查看samba服務器所占用的端口,可以將單個端口也行
[root@localhost samba]# /sbin/ifconfig eth0
#查看自己網卡以及IP地址,去掉eth0,就是查看所有IP地址,例如無線的
#可以看到自己的IP地址是192.168.0.33
eth0 Link encap:Ethernet HWaddr 00:1E:C9:05:2E:EE
inet addr:192.168.0.33 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::21e:c9ff:fe05:2eee/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:664 errors:0 dropped:0 overruns:0 frame:0
TX packets:798 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:555884 (542.8 KiB) TX bytes:102336 (99.9 KiB)
Interrupt:17
Copyright © Linux教程網 All Rights Reserved