1、去官網下載下傳samba-3.0.32.tar.gz包
2、然後預設地配置、安裝,如下:
[root@localhost src]# cd samba-3.0.32
[root@localhost samba-3.0.32]# cd source/
[root@localhost source]# ./configure
[root@localhost source]# make;make install
[root@localhost samba-3.0.32]# cd /usr/local/samba/
[root@localhost samba]# ls
bin include lib private sbin share swat var
[root@localhost samba]# cp bin/* /bin/
[root@localhost samba]# cp sbin/* /sbin/
[root@localhost samba-3.0.32]# cp examples/smb.conf.default /etc/smb.conf
[root@localhost samba]# cp /root/src/samba-3.0.32/packaging/RHEL/setup/swat /etc/xinetd.d/swat
[root@localhost samba]# cat /etc/xinetd.d/swat
# default: off
# description: SWAT is the Samba Web Admin Tool. Use swat \
# to configure your Samba server. To use SWAT, \
# connect to port 901 with your favorite web browser.
service swat
{
disable = no
port = 901
socket_type = stream
wait = no
only_from = 192.168.1.0 <——-設定成了讓192.168.1.0網段内的主機可以通路
user = root
server = /usr/sbin/swat
log_on_failure += USERID
}
[root@localhost samba]# chkconfig swat –list
swat off
[root@localhost samba]# chkconfig swat on
swat on
[root@localhost samba]# chkconfig xinetd –list
xinetd 0:off 1:off 2:off 3:on 4:on 5:on 6:off
[root@localhost samba]# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
[root@localhost samba]# netstat -tln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:1024 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:1089 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:901 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN
打開192.168.1.0網段中的任意一台主機的浏覽器,輸入samba伺服器的IP位址及端口号,
這樣就可以在任意一台同網段的主機裡管理samba伺服器了,對于Swat裡的選項的配置,我在這裡就不多說了,一看便知。