服務器搭建手冊標準版之openbsd與freebsd的samba服務器建設
提綱
- 安裝openbsd
- 安裝samba
- 配置samba
- 測試samba
- 啟用samba
- 安裝freebsd
- 安裝samba
- 配置samba
- 測試samba
- 啟用samba
- 安裝openbsd
安裝過程略
- 安裝samba
用源代碼方式安裝samba。
1、打開openbsd系統自帶的ftp服務器。
# vi /etc/inetd.conf
取消
#ftp stream tcp nowait root /usr/libexec/ftpd ftpd -US
#ftp stream tcp6 nowait root /usr/libexec/ftpd ftpd –US
前面的#號
重啟inetd服務或重啟服務器.
- 先用cute-ftp 等ftp工具將0.tar.gz 上傳到服務器。現在是上傳到/home/zymh目錄下面。
- 安裝samba
#cd /home/zymh
#tar zxvf samba3.0.tar.gz
# cd samba3.0
# ./configure
# make
# make install
Samba默認會安裝在/usr/local/samba目錄。
- 配置samba
# cd /usr/local/samba/lib
# vi smb.conf
設置以下變量:
workgroup = DING9
server string = Samba Server
security = share
hosts allow = 192.168.1. 192.168.1. 254.
load printers = yes
[public]
comment = Public Stuff
path = /usr/text
public = yes
writable = yes
printable = no
write list = @staff
這樣就可以將/usr/test共享出來,WINDOWS的用戶就可以在網上鄰居訪問open這台機的/public目錄。
- 測試samba
可用以下命令來測試samba的配置是否正確。
# /usr/local/samba/bin/testparm
- 啟用samba
編輯/etc/rc.local 加入samba的啟動命令.
#vi /etc/rc.local 加下以下內容:
/usr/local/samba/sbin/smbd -D &
/usr/local/samba/sbin/nmbd -D &
重啟服務器.
- 安裝freebsd
安裝過程略
- 安裝samba
以ports的形式安裝samba
#cd /usr/ports/net/samba
# make install clean
- 配置samba
#cd /usr/local/etc
#vi smb.conf
設置以下變量:
workgroup = DING9
server string = Samba Server
security = share
hosts allow = 192.168.1. 192.168.1. 254.
load printers = yes
[common]
comment = Common Stuff
path = /home/common
public = yes
writable = yes
printable = no
write list = @staff
這樣就可以將/home/common共享出來,WINDOWS的用戶就可以在網上鄰居訪問free這台機的common目錄。
- 測試samba
# /usr/local/bin/testparm
- 啟動samba
編輯/etc/rc.conf 增加samba的啟動項
#vi /etc/rc.conf 加入以下內容:
nmbd_enable=”YES”
smbd_enable=”YES”
重啟服務器.
以下文章點擊率最高
Loading…