目前分類:Server Edition (48)

瀏覽方式: 標題列表 簡短摘要

可以先找看看openwebmail.conf設定檔在哪裡?

sudo find / -name openwebmail.conf

修改openwebmail.conf檔案
sudo vim /usr/lib/cgi-bin/openwebmail/etc/openwebmail.conf
將domainnames auto 改為如下所示:
domainnames abc.com.tw, mail.abc.com.tw

蒼穹 發表在 痞客邦 留言(0) 人氣()

1.當你安裝好vsftp與防火牆iptables後,發現設定都是對的,防火牆也有開啟20-21port,但是使用FTP軟體就是連不上,請修改以下兩個設定檔

2.修改加入以下的文字 sudo vim /etc/vsftpd.conf

pasv_enable=YES
pasv_min_port=4000
pasv_max_port=4500

3.修改防火牆開啟4000-4500的port
iptables -A INPUT  -i ppp0 -p tcp --dport 4000:4500 -j ACCEPT

4.現在就可以連上去FTP Server囉

蒼穹 發表在 痞客邦 留言(0) 人氣()

1.當你安裝號Awstats後,報表會反解IP位置,當然你可以加入外掛讓Awstats顯示國家與程式還有組織的訊息

2.下載所需要的資料
   wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
   wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
   wget http://geolite.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz

蒼穹 發表在 痞客邦 留言(0) 人氣()

新增資料夾
1.mkdir /home/user/backup/
user為你的帳號

2.backup內新增iptables.sh文件,然後將以下的文字貼上,然後再去修改你要的部分。


#先阻擋全部
iptables -P INPUT DROP
# 127.0.0.1 本地端回應全接受
iptables -A INPUT -i lo -j ACCEPT

蒼穹 發表在 痞客邦 留言(0) 人氣()

Apache2開啟網站的Index順序如下:
index.html index.cgi index.pl index.php index.xhtml

若你要改變Index順序,建議修改設定檔,加入以下文字
vim /etc/apach2/apach2.conf
DirectoryIndex  index.php index.html index.cgi index.pl index.xhtml
這樣一開始就會用Index.php開啟網站

 

蒼穹 發表在 痞客邦 留言(0) 人氣()

root@ubuntu:~# /etc/init.d/apache2 reload
 * Reloading web server config apache2                                         

apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName

修改apache2.conf
vim /etc/apache2/apache2.conf
加入
ServerName 127.0.0.1

蒼穹 發表在 痞客邦 留言(0) 人氣()

通常在管理Server的時候,也可以使用一些指令搭配的方式,將所得到的資訊,mail給管理者,方便管理者只需要使用mail就可以查看目前的Server的狀態

sudo df -h | mail -s 'Server HD Space' abc@ccc.com.tw

這樣就可以寄到管理者上囉,當然你也可以把他加入排程

sudo crontab -e

0 8 * * * df -h | mail -s 'Server HD Space' abc@ccc.com.tw

存檔離開就OK囉。

蒼穹 發表在 痞客邦 留言(0) 人氣()

安裝好PostFit後,沒有報表分析怎行呢?找了支援PostFix之源的分析軟體,採用awstats分析
1.sudo apt-get install awstats

修改設定檔案,請參考以下的網址
http://awstats.sourceforge.net/docs/awstats_faq.html#MAIL

蒼穹 發表在 痞客邦 留言(0) 人氣()

預監控Server的狀態如CPU、磁碟空間、網路流量時,可以安裝Cacti套件與Snmpd的套件來監控網路流量。
請在安裝Ubuntu的時候,將LMAP的選項打勾,會裝Apache2+Mysql
1.sudo apt-get install cacti
  點選OK


cacti01.JPG

蒼穹 發表在 痞客邦 留言(0) 人氣()

1.修改 sudo /vim /etc/postfix/mail.cf ,加入以下這段

smtpd_client_restrictions =
                 permit_mynetworks,
                permit_sasl_authenticated,
                reject_unknown_client,
                check_client_access hash:/etc/postfix/access,
                reject_rbl_client cbl.abuseat.org,
                reject_rbl_client sbl.spamhaus.org,
                reject_rbl_client xbl.spamhaus.org,
                reject_rbl_client dsbl.dnsbl.net.au

蒼穹 發表在 痞客邦 留言(0) 人氣()

1.sudo apt-get install postgrey

2.安裝完成後,查看Log檔,的postgrey是使用哪個port號,以下紅色的字體,使用10023

Nov 11 07:42:06 ubuntu postgrey[994]: Process Backgrounded
Nov 11 07:42:06 ubuntu postgrey[994]: 2010/11/11-07:42:06 postgrey (type Net::Server::Multiplex) starting! pid(994)
Nov 11 07:42:06 ubuntu postgrey[994]: Binding to TCP port 10023 on host localhost#012
Nov 11 07:42:06 ubuntu postgrey[994]: Setting gid to "116 116"
Nov 11 07:42:06 ubuntu postgrey[994]: Setting uid to "107"

蒼穹 發表在 痞客邦 留言(0) 人氣()

簡單而語,您只需要以系統管理員身份 (使用者 root) 身份執行程式 pppoeconf,照著畫面的問題去回得就可以了

 

sudo pppoeconf

蒼穹 發表在 痞客邦 留言(0) 人氣()

提供下列網址,供各位找尋所需要的硬體設備與PC

1.清單列出目前有經過Ubuntu認證過的品牌PC與NB還有Server(資料更新度比較快),我喜歡用這個網頁來購買主機,雖然價格貴了點,但安裝起來比較不會麻煩。

http://webapps.ubuntu.com/certification/

2.列出目前有資源的PC零主件,如主機板、音效卡...等等(這裡的資料通常都比較慢更新)

https://wiki.ubuntu.com/HardwareSupport/

蒼穹 發表在 痞客邦 留言(0) 人氣()

安裝 X 窗口系統
sudo apt-get -y install x-window-system-core
安裝登錄管理器
sudo apt-get -y install gdm
安裝桌面環境
sudo apt-get -y --force-yes install ubuntu-desktop

出處:
http://forum.icst.org.tw/phpbb/viewtopic.php?f=16&t=14944

蒼穹 發表在 痞客邦 留言(0) 人氣()

安裝openwebmail的錯誤訊息
Can't locate Crypt/Eksblowfish/Bcrypt.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl /usr/lib/cgi-bin/openwebmail) at /usr/lib/cgi-bin/openwebmail/auth/auth_unix.pl line 15.
BEGIN failed--compilation aborted at /usr/lib/cgi-bin/openwebmail/auth/auth_unix.pl line 15.

For help, please send mail to the webmaster (webmaster@xxx.com.tw), giving this error message and the time and date of the error.
Software error:

[Tue Jul 15 17:27:36 2008] openwebmail.pl: Can't locate Crypt/Eksblowfish/Bcrypt.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl /usr/lib/cgi-bin/openwebmail) at /usr/lib/cgi-bin/openwebmail/auth/auth_unix.pl line 15.
[Tue Jul 15 17:27:36 2008] openwebmail.pl: BEGIN failed--compilation aborted at /usr/lib/cgi-bin/openwebmail/auth/auth_unix.pl line 15.
Compilation failed in require at /usr/lib/cgi-bin/openwebmail/modules/tool.pl line 90.

蒼穹 發表在 痞客邦 留言(0) 人氣()

adonis@ubuntu10:~$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run `apt-get -f install' to correct these.
The following packages have unmet dependencies:
  libdbd-mysql-perl: Depends: perl (>= 5.10.1-12) but 5.10.1-8ubuntu2 is installed
                     Depends: libdbi-perl (>= 1.610.90) but 1.50-1 is installed
                     Depends: perl-dbdabi-94 but it is not installable
  libdbi-perl: Depends: perlapi-5.8.4 but it is not installable
               Depends: libplrpc-perl but it is not installed
  openwebmail: Depends: perl-suid but it is not installed
               Depends: libnet-ldap-perl but it is not installed
               Depends: libpgperl but it is not installable or
                        libpg-perl but it is not installed
               Depends: wwwconfig-common but it is not installed
               Recommends: spamassassin but it is not installed
               Recommends: clamav but it is not installed
E: Unmet dependencies. Try using -f.

蒼穹 發表在 痞客邦 留言(0) 人氣()

$ sudo vim /etc/network/interfaces
up route add -net 192.168.0.0 netmask 255.255.255.0 gw 192.168.2.1

蒼穹 發表在 痞客邦 留言(0) 人氣()

$sudo vim /etc/apache2/apache2.conf
加入
ServerName 127.0.0.1

重新啟動.....OK

蒼穹 發表在 痞客邦 留言(0) 人氣()

當mail服務器架設好了之後,往往很容易被當成廣告信Server來寄信,利用SMTP Auth認證方式,只有透過帳號密碼認證過的User才能寄信

1.安裝SASL套件
$sudo apt-get install sasl2-bin

2.新增並編輯此檔
$sudo vim /etc/postfix/sasl/smtpd.conf
log_level: 3
pwcheck_method: saslauthd
mech_list: plain login

蒼穹 發表在 痞客邦 留言(0) 人氣()

要查看哪些服務有啟動or要設定啟動狀態不需要一筆一筆輸入指令,安裝sysv-rc.conf就可以直接做設定
$ sudo apt-get install sysv-rc-conf

輸入指令查看
$ sudo sysv-rc-conf

上下左右鍵:移動,空白space鍵:選擇是否啟動,q鍵:離開

蒼穹 發表在 痞客邦 留言(0) 人氣()

«12 3