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里的选项的配置,我在这里就不多说了,一看便知。