網(LieHuo.Net)教程 對于很多習慣使用windows的用戶,在剛接觸Linux的時候,要使用命令行配置Linux服務器可能會感覺難以適應。今天我們來講解一下,Linux下的圖形配置工具—Webmin,通過這款工具,用戶可以很方便的使用web界面對Linux服務器進行配置。
一、配置bind dns服務器
1、 系統—〉“軟件包”—〉搜索并安裝相應的“軟件包”(upload file &install package)
2、 在webmin的“硬件”—〉“網絡配置”—〉選擇“dns客戶”—〉將“解析順序”改為--“dns、hosts”—〉按“保存”后返回
選擇“服務”—〉“bind 8 dns服務器”—〉可以看到由“全局服務器選項”、“現有dns區域”和其他部分組成
bind在默認安裝的情況下可作為高速緩存服務器(有root zone、127.0.0的反向、localhost的正向)--〉其安裝順序為bind-9.1.3-4—〉bindconf-1.6.1—〉caching-nameserver7.2-1
3、 創建主服務器
在webmin的server中選擇“bind dns server”—〉在“現有區域”中選擇“新建主區域”—〉“區域類型”選擇“正向”,在“域名/網絡”域名輸入“test.com”,主服務器輸入“master.test.com”,email地址輸入“root@localhost”—〉按“新建”完成
在“現有區域”中選擇“新建主區域”—〉“區域類型”選擇“反向”,在“域名/網絡”輸入“192.168.0”,主服務器輸入“master.test.com”,email地址輸入“root@localhost”—〉按“新建”完成
在主服務器中添加正向地址記錄—〉選擇“test.com”—〉選擇“a記錄”—〉在“名稱”處輸入“www”,在地址處輸入“192.168.0.100”—〉按“新增”完成
也可以添加“名稱別稱cname記錄”、“郵件服務器mx記錄”和“輔域名服務器ns記錄”
完成所有的記錄添加后返回“bind dns服務器”中按“應用更改”即完成配置的更改
4、 創建從服務器
在“現有區域中”選擇—〉“新建次區域”—〉選擇“正向解析”(forward),輸入域名“abc.com”,輸入“主服務器”的地址“192.168.0.101”—〉按“新建”后完成—〉按“保存”后返回“bind dns服務器”—〉按“應用更改”使配置生效
用相同步驟實現“從服務器的反向記錄”的設置
二、postfix郵件服務器的配置
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服務器的啟動
在“system”中選擇“bootup and shutdown”—〉選擇“postfix”—〉將“start at boot time” 改為“yes”—〉按“save”返回
在“server”中選擇“extended internet services”—〉分別選擇 “imap”和“pop3”,將“service enable”改為“yes”—〉保存后返回—〉按“applay changes”使設置生效(相當于service xinetd restart)
3、在dns上注冊郵件服務器
(注意兩點:1、在完成添加后需要按“apply changes”使配置生效2、服務器中如寫完整的主機名要以“.”結尾)
4、配置postfix
在“server”中選擇“postfix configuration”—〉選擇“general options”—〉設定“what domain to use in outbound”為“use domainname”表示使用當前郵件服務器的域名作為郵件發送者的域名;設定“what domains to receive mail for”為“whole domain”,表示當前郵件服務器接收整個域的所有郵件;設置“network interfaces for receiving mail”為“all”,表示通過所有的網卡來接收郵件;設置“hostname of this mail system”為當前郵件服務器的主機名輸入“mail.test.com”;在“local internet domain name”中輸入當前主機所在的域名“test.com”;其他項保持默認值—〉按“save and apply”后完成
5、為郵件服務器添加用戶帳號
在“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”按鈕完成用戶創建
5、 郵件別名和虛擬域
郵件別名:
在“webmin”的“server”中選擇“postfix configuration”—〉選擇“mail aliases”—〉選擇“create a new alias”—〉在“alias options”中設置“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為不存在的賬號alias to mailuser2為已存在的賬號,所以發給mailuser3的郵件會自動轉到mailuser2)
郵件的虛擬域:
在“webmin”的“server”的“postfix configuration”中—〉選擇“virtual domain”—〉設置“domain mapping lookup tables”為“hash:/etc/postfix/virtual”—〉選擇“save and apply”—〉在次進入“virtual domains”選擇“new mapping”新建一個映射—〉在“edit a map”中設置“name”為“@newtest.com”,“maps to…”為“@test.com”(表示把所有發往@newtest.com的信映射到@test.com)--〉按“save mapping”保存
上一篇 重新定位鏈接表二步走