網(wǎng)(LieHuo.Net)教程 對(duì)于很多習(xí)慣使用windows的用戶,在剛接觸Linux的時(shí)候,要使用命令行配置Linux服務(wù)器可能會(huì)感覺難以適應(yīng)。今天我們來講解一下,Linux下的圖形配置工具—Webmin,通過這款工具,用戶可以很方便的使用web界面對(duì)Linux服務(wù)器進(jìn)行配置。
一、配置bind dns服務(wù)器
1、 系統(tǒng)—〉“軟件包”—〉搜索并安裝相應(yīng)的“軟件包”(upload file &install package)
2、 在webmin的“硬件”—〉“網(wǎng)絡(luò)配置”—〉選擇“dns客戶”—〉將“解析順序”改為--“dns、hosts”—〉按“保存”后返回
選擇“服務(wù)”—〉“bind 8 dns服務(wù)器”—〉可以看到由“全局服務(wù)器選項(xiàng)”、“現(xiàn)有dns區(qū)域”和其他部分組成
bind在默認(rèn)安裝的情況下可作為高速緩存服務(wù)器(有root zone、127.0.0的反向、localhost的正向)--〉其安裝順序?yàn)閎ind-9.1.3-4—〉bindconf-1.6.1—〉caching-nameserver7.2-1
3、 創(chuàng)建主服務(wù)器
在webmin的server中選擇“bind dns server”—〉在“現(xiàn)有區(qū)域”中選擇“新建主區(qū)域”—〉“區(qū)域類型”選擇“正向”,在“域名/網(wǎng)絡(luò)”域名輸入“test.com”,主服務(wù)器輸入“master.test.com”,email地址輸入“root@localhost”—〉按“新建”完成
在“現(xiàn)有區(qū)域”中選擇“新建主區(qū)域”—〉“區(qū)域類型”選擇“反向”,在“域名/網(wǎng)絡(luò)”輸入“192.168.0”,主服務(wù)器輸入“master.test.com”,email地址輸入“root@localhost”—〉按“新建”完成
在主服務(wù)器中添加正向地址記錄—〉選擇“test.com”—〉選擇“a記錄”—〉在“名稱”處輸入“www”,在地址處輸入“192.168.0.100”—〉按“新增”完成
也可以添加“名稱別稱cname記錄”、“郵件服務(wù)器mx記錄”和“輔域名服務(wù)器ns記錄”
完成所有的記錄添加后返回“bind dns服務(wù)器”中按“應(yīng)用更改”即完成配置的更改
4、 創(chuàng)建從服務(wù)器
在“現(xiàn)有區(qū)域中”選擇—〉“新建次區(qū)域”—〉選擇“正向解析”(forward),輸入域名“abc.com”,輸入“主服務(wù)器”的地址“192.168.0.101”—〉按“新建”后完成—〉按“保存”后返回“bind dns服務(wù)器”—〉按“應(yīng)用更改”使配置生效
用相同步驟實(shí)現(xiàn)“從服務(wù)器的反向記錄”的設(shè)置
二、postfix郵件服務(wù)器的配置
1、 postfix的安裝
在“webmin”的界面中選擇“system”—〉選擇“software package”—〉選擇“install a new package”—〉“from upload file”—〉“install”安裝 postfix-1.1.7-2.i386.rpm、imap-2001a-10.i386.rpm
2、配置postfix服務(wù)器的啟動(dòng)
在“system”中選擇“bootup and shutdown”—〉選擇“postfix”—〉將“start at boot time” 改為“yes”—〉按“save”返回
在“server”中選擇“extended internet services”—〉分別選擇 “imap”和“pop3”,將“service enable”改為“yes”—〉保存后返回—〉按“applay changes”使設(shè)置生效(相當(dāng)于service xinetd restart)
3、在dns上注冊(cè)郵件服務(wù)器
(注意兩點(diǎn):1、在完成添加后需要按“apply changes”使配置生效2、服務(wù)器中如寫完整的主機(jī)名要以“.”結(jié)尾)
4、配置postfix
在“server”中選擇“postfix configuration”—〉選擇“general options”—〉設(shè)定“what domain to use in outbound”為“use domainname”表示使用當(dāng)前郵件服務(wù)器的域名作為郵件發(fā)送者的域名;設(shè)定“what domains to receive mail for”為“whole domain”,表示當(dāng)前郵件服務(wù)器接收整個(gè)域的所有郵件;設(shè)置“network interfaces for receiving mail”為“all”,表示通過所有的網(wǎng)卡來接收郵件;設(shè)置“hostname of this mail system”為當(dāng)前郵件服務(wù)器的主機(jī)名輸入“mail.test.com”;在“local internet domain name”中輸入當(dāng)前主機(jī)所在的域名“test.com”;其他項(xiàng)保持默認(rèn)值—〉按“save and apply”后完成
5、為郵件服務(wù)器添加用戶帳號(hào)
在“webmin”的“system”中的“users and groups”—〉選擇“local groups”按“create a new group”—〉在“group name”中輸入“mailuser”—〉在“local user”中選擇“create a new user”—〉在“username”中輸入“mailuser1”,在“home directory”中輸入“/home/mailuser1”,在“password”中輸入“normal password”,在“group membership”中“primary group”的“existing group”選擇“mailuser”—〉按“create”按鈕完成用戶創(chuàng)建
5、 郵件別名和虛擬域
郵件別名:
在“webmin”的“server”中選擇“postfix configuration”—〉選擇“mail aliases”—〉選擇“create a new alias”—〉在“alias options”中設(shè)置“alias databases used by the local delivery agent”和“alias databases built by newaliases command”為“hash:/etc/postfix/aliases”—〉選擇“create a new alias”—〉在“alias properties edition”頁中“name”輸入“mailuser3”在“alias to…”中輸入“mailuser2”(mailuser3為不存在的賬號(hào)alias to mailuser2為已存在的賬號(hào),所以發(fā)給mailuser3的郵件會(huì)自動(dòng)轉(zhuǎn)到mailuser2)
郵件的虛擬域:
在“webmin”的“server”的“postfix configuration”中—〉選擇“virtual domain”—〉設(shè)置“domain mapping lookup tables”為“hash:/etc/postfix/virtual”—〉選擇“save and apply”—〉在次進(jìn)入“virtual domains”選擇“new mapping”新建一個(gè)映射—〉在“edit a map”中設(shè)置“name”為“@newtest.com”,“maps to…”為“@test.com”(表示把所有發(fā)往@newtest.com的信映射到@test.com)--〉按“save mapping”保存