2009年4月15日 星期三

[DEBUG]proxy: ap_get_scoreboard_lb for worker proxy:reverse


ServerName application.mydomain.com
ProxyRequests Off

即可

2009年4月13日 星期一

FEDORA下SSH安装使用的HOWTO文章

一個SSH SERVER被安裝,如果沒有安裝,請執行以下命令

yum install openssh-servier

/etc/init.d/sshd start

摘自:http://blog.csdn.net/beyond911/archive/2007/08/23/1756031.aspx

2009年4月9日 星期四

FreeBSD logrotate

[root@ns1 ~]# cd /usr/ports/sysutils/logrotate
[root@ns1 logrotate]# make install clean
[root@ns1 logrotate]# cd

[root@ns1 ~]# cp /usr/local/etc/logrotate.conf.sample /usr/local/etc/logrotate.conf
[root@ns1 ~]# vi /usr/local/etc/logrotate.conf

errors root
↓
#errors root ←コメントアウト

compress
↓
#compress ←コメントアウト

↓下記をコメントアウト
#/var/log/lastlog {
# monthly
# rotate 1
#}


[root@ns1 ~]# mkdir /usr/local/etc/logrotate.d

[root@ns1 ~]# vi /etc/crontab
0 0 * * * root /usr/local/sbin/logrotate /usr/local/etc/logrotate.conf > /dev/null 2>&1


摘自:http://freebsd.server-manual.com/logrotate.html

2009年4月7日 星期二

XP無法編輯hosts

使用unlocker軟體即可

電子報發送建議作法及調整

.信件分流、分時發送,避免發送過於頻繁被擋的情形
.申請多組不同網段IP,避免整段被擋的情形
.直接寄給收信端後方Mail Server(以yahoo為例)
.同domain收件人統一發送,避免發送過多信件
.整理發送後失敗Email名單,減少發送失敗情形
.申請大量發送IP名單,增加發送量
.設定DNS反解,避免因反解被擋
.建立Queue Server及Retry機制,增加信件寄送成功率
.[From:]標頭中使用相同的地址
.在郵件中加入[Precedence:bulk]標頭欄位,指出其為大量郵件

2009年3月25日 星期三

Xen Server 5 試用感

我本身已用vmware 3.5 basic 版 上線使用一年多...
基本上一些 應用上問題 自己也解決不少...其實不算太有需求找尋其他虛擬化軟體

但是xenserver這次 功能太誘人了
免費版差不多是全部完整功能了

http://www.citrix.com/English/ps2/products/feature.asp?contentID=1686939
上面link 比較圖
1.Live motion !!! =vmotion 動態搬遷 VM
2.多實體機管理..
3.VM樣版..
4.其他功能請參考上述Link

額外購買的Essentials for XenServer (好像還未定價)
1.HA
2.自動控制管理(實體機資源吃高時 自動會搬動VM到別機)

License 下載點
http://downloadns.citrix.com.edgesuite.net/akdlm/3849/XenServer-free-license.xslic
2009 .3.25 會推出申請free licnese 機制
企業版到 2009. 4.2x

XenServer 5 本體下ISO載點
http://downloadns.citrix.com.edgesuite.net/akdlm/3401/XenServer-5.0.0-install-cd.iso

Linux VM樣版和工具
http://downloadns.citrix.com.edgesuite.net/akdlm/3402/XenServer-5.0.0-linux-cd.iso

Xencenter Windows 控制軟體
http://downloadns.citrix.com.edgesuite.net/akdlm/3403/XenServer-5.0.0-XenCenter.msi

AMD T105 無陣列卡 無痛安裝完成...為之前正式版Xenserver 企業版 授權 之前在T105 裝ESX 快裝到快吐血



Mount ISO 請參考

http://wiki.osslab.org.tw/index.php?title=%E5%AF%A6%E9%A9%97%E5%B0%88%E6%A1%88/Virtualization/Citrix_XenServer/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8_iso_%E5%AE%89%E8%A3%9D_VM

開始寫不好的...

1.mount iso 不支源中文檔名 iso
2.第一次裝雨林木風版快速XP 完全不行..(VMware ESX 到正常的很) 用他win pe內 ghost 才可 .....
3.系統空間 3GB ..ISO 這樣一定不夠放......還是我安裝法不對? XD (安裝時不像esx 可自由分割空間)
後來發現正解 XEN 5可用Mount NFS or CIFS(網芳) 的ISO 目錄. 通常請準備一個NAS VM 內放ISO跟一些常用軟體方便


[root@tpexen /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 3.8G 1.7G 2.0G 46% /
none 377M 0 377M 0% /dev/shm

[root@tpexen /]# mount
/dev/sda1 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw)
none on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)

[root@tpexen /]# uname -r
2.6.18-92.1.10.el5.xs5.0.0.394.644xen



XenServer VM內的 XP 效能.


實體效能對照


先說到此...Pools 試驗中

摘自:http://bbs.vmware.cn/thread-18763-1-1.html

2009年3月17日 星期二

[Linux]AWSTATS 安裝設定教學

AWStats是一套免費及功能強大的Log分析軟體產生報表。
官方網址 ( http://awstats.sourceforge.net/)
解壓縮 awstats-6.6.tar.gz(http://prdownloads.sourceforge.net/awstats/awstats-6.6.tar.gz)
# tar zxvf awstats-6.6.tar.gz
將解壓縮出來的 tools 及 wwwroot 目錄移至到 /usr/local/awstats 目錄下
切換目錄至 /usr/local/awstats 目錄
# cd /usr/local/awstats
執行 tools 目錄下的 awstats_configure.pl
#cd tool
#./awstats_configure.pl
設定config檔
----- AWStats awstats_configure 1.0 (build 1.6) (c) Laurent Destailleur -----
This tool will help you to configure AWStats to analyze statistics for
one web server. You can try to use it to let it do all that is possible
in AWStats setup, however following the step by step manual setup
documentation (docs/index.html) is often a better idea. Above all if:
- You are not an administrator user,
- You want to analyze downloaded log files without web server,
- You want to analyze mail or ftp log files instead of web log files,
- You need to analyze load balanced servers log files,
- You want to 'understand' all possible ways to use AWStats...
Read the AWStats documentation (docs/index.html).
-----> Running OS detected: Linux, BSD or Unix
-----> Check for web server install
Enter full config file path of your Web server.
Example: /etc/httpd/httpd.conf
Example: /usr/local/apache2/conf/httpd.conf
Example: c:\Program files\apache group\apache\conf\httpd.conf
Config file path ('none' to skip web server setup):
> /etc/httpd/conf/httpd.conf
-----> Check and complete web server config file '/etc/httpd/conf/httpd.conf'
Add 'Alias /awstatsclasses "/usr/local/awstats/wwwroot/classes/"'
Add 'Alias /awstatscss "/usr/local/awstats/wwwroot/css/"'
Add 'Alias /awstatsicons "/usr/local/awstats/wwwroot/icon/"'
Add 'ScriptAlias /awstats/ "/usr/local/awstats/wwwroot/cgi-bin/"'
Add '' directive
AWStats directives added to Apache config file.
-----> Update model config file '/usr/local/awstats/wwwroot/cgi-bin/awstats.mode l.conf'
File awstats.model.conf updated.
-----> Need to create a new config file ?
Do you want me to build a new AWStats config/profile
file (required if first install) [y/N] ?y
-----> Define config file name to create
What is the name of your web site or profile analysis ?
Example: www.mysite.com
Example: demo
Your web site, virtual server or profile name:
> 你的網站
-----> Define config file path
In which directory do you plan to store your config file(s) ?
Default: /etc/awstats
Directory path to store config file(s) (Enter for default):
>
-----> Create config file '/etc/awstats/awstats.你的網站.conf'
Config file /etc/awstats/awstats.你的網站.conf created.
-----> Restart Web server with '/sbin/service httpd restart'
停止 httpd: [ 確定 ]
啟動 httpd: [ 確定 ]
-----> Add update process inside a scheduler
Sorry, configure.pl does not support automatic add to cron yet.
You can do it manually by adding the following command to your cron:
/usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=www.nauticaltech.o rg
Or if you have several config files and prefer having only one command:
/usr/local/awstats/tools/awstats_updateall.pl now
Press ENTER to continue...

A SIMPLE config file has been created: /etc/awstats/awstats.你的網站 .conf
You should have a look inside to check and change manually main parameters.
You can then manually update your statistics for '你的網站' with com mand:
> perl awstats.pl -update -config=你的網站
You can also read your statistics for '你的網站' with URL:
> http://localhost/awstats/awstats.pl?config=你的網站
Press ENTER to finish...

以上步驟完成後,會在/etc/awstats目錄下建立一檔案- awstats.你的網站.conf
建立 /var/lib/awstats 目錄,並設定 777權限
#mkdir /var/lib/awstats
#chmod 777 /var/lib/awstats

檢查在httpd.conf中是否有以下設定,並且重新啟動httpd服務
# Directives to allow use of AWStats as a CGI
#
Alias /awstatsclasses "/usr/local/awstats/wwwroot/classes/"
Alias /awstatscss "/usr/local/awstats/wwwroot/css/"
Alias /awstatsicons "/usr/local/awstats/wwwroot/icon/"
ScriptAlias /awstats/ "/usr/local/awstats/wwwroot/cgi-bin/"
#
# This is to permit URL access to scripts/files in AWStats directory.
#
Options None
AllowOverride None
Order allow,deny
Allow from all
--------------------------
#service httpd restart
設定httpd的log format為combined,請編輯 httpd.conf,將CustomLog設定為combined
CustomLog logs/access_log combined

設定awstats.你的網站.conf
LogFile="/var/log/httpd/access_log" <----請指定apache log file的絕對路徑及log名稱
LogType=W <---- W分析類型為web log
LogFormat=1 <---- 1代表Apache or Lotus Notes/Domino native combined log format
SiteDomain="你的網站" <----指定定從log檔中過濾符合SiteDomain的記錄(不同的Virtual Domain就須指定為不同的SiteDomain)
HostAliases="你的網站"
設定完畢,請存檔
執行awstats.pl
# /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=你的網站 -update
如果出現以下訊息,就代表執行成功
Update for config "/etc/awstats/awstats.你的網站.conf"
With data in log file "/var/log/httpd/access_log.1"...
Phase 1 : First bypass old records, searching new record...
Direct access after last parsed record (after line 4311)
Jumped lines in file: 251
Found 4311 already parsed records.
Parsed lines in file: 0
Found 0 dropped records,
Found 0 corrupted records,
Found 0 old records,
Found 0 new qualified records.
開啟瀏覽器,輸入 http://你的網站/awstats/awstats.pl?config=你的網站,便可檢視你剛剛所產生的報表了。
將 /usr/local/awstats/wwwroot/cgi-bin/awstats.pl -config=你的網站 -update的指令設定在crontab,讓它定期產生產生資料更新

這給大家參考一下 滿有用的

摘自:http://maizao.com/dz/thread-39-1-1.html


補充1:HOW TO ROTATE MY LOGS WITHOUT LOSING DATA

/usr/local/apache/logs/*log
{
notifempty
daily
rotate 7
compress
sharedscripts
prerotate
/usr/local/awstats/wwwroot/cgi-bin/awstats.pl -update -config=mydomainconfig
endscript
postrotate
/usr/bin/killall -HUP httpd
endscript
}


補充2:讓Awstats中搜尋的關鍵字正常顯示的方法!!]
AWStats分析報表中,有關搜尋的關鍵字句會變成亂碼的主因,是因為現在的搜尋引擎都是使用UTF8,而Awstats是使用Big5,所以在顯示上會出現亂碼。

要解決此問題,就是把awstats設定中的LoadPlugin="decodeutfkeys"啟動。就可以了


# Plugin: DecodeUTFKeys
# Perl modules required: Encode and URI::Escape
# Allow AWStats to show correctly (in language charset) keywords/keyphrases
# strings even if they were UTF8 coded by the referer search engine.
#
LoadPlugin="decodeutfkeys"

wibiya widget