mini-Howto: Slitaz Squid (cooking edition)

Recently, I love studying Slitaz and make it as powerful as normal linux distro. This mini-howto shows the simple steps on using Slitaz to build a proxy server. It just offers very basic function, please go to the official site http://www.squid-cache.org for more details.

Install Sliatz, please kindly RTFM Install squid tazpkg get-install squid tazpkg [...]

Slitaz Apache 與 mod_security

近日對 Slitaz 既興趣越來越高, 但係原來佢都係有唔完美缺點既. 佢既優點當然係容量小, 電腦硬件要求低. 正正因為容量小, 軟件包支援亦相對少, 而且就算有支援亦並非代表可以有功能上既擴展. 例如, 沒有 mod_security 軟件包提供, 要各位努力 compile. 雖然 modsecurity 有完善既說明文件, 但在 Slitaz 身上卻變成有點困難. 下文會先列出必須既軟件, 最後才將安裝步驟簡單列出.

在 Slitaz, 先安裝套件: slitaz-toolchain, gcc, apache-dev, apr-dev, lua-dev, curl-dev, apr-util-dev, pcre-dev, libxml2-dev, expat-dev

用 modsecurity  網站所提及既步驟便可: 1. 先解壓 source; 2. cd ./apache2; 3. 執行 ./configure; 4. 執行 make; 5. 執行 make test; [...]

Slitaz cooking apache start error

近日因為自己部 server 又唔生性咁 down 咗, 唯有又由頭安裝過. 不過始終都想找到一個較簡單既方案, 所以從網上找一些輕量既 linux distro. 雖然一般既 linux distro 功能好強, 但輕量的 linux distro 對硬件要求較低, 所以對要求低既用戶 (我 ) 仍有發展空間.

Slitaz 係其中一個輕量既 linux distro 而又提供 server application. 不過發現佢個 cooking version 因為 ssl cert 有問題, 所以啟動 apache 時會有 error. 要解決依個問題就要自己動手做一張 ssl cert. 過程如下:

1. Go to /etc/ssl/misc 2. Type ./CA.sh -newca 3. Fill-in proper [...]

解決 Ulteo hal error

今日試用 Ulteo 感覺幾滿意, 但要解決遇到既問題就比較難, 不過只要肯上網搵就無乜問題.

當安裝完整個系統後, 係 ubuntu 8.04 平台在 apt-get update 後會出現 hal error

Errors were encountered while processing: hal

只要執行下列指令再重新啟動電腦就可以解決問題:

sudo chroot /opt/ulteo chown root:polkituser /usr/lib/policykit/* chmod 2755 /usr/lib/policykit/polkit-*-helper chmod 4754 /usr/lib/policykit/polkit-grant-helper-pam exit

參考網址:

http://www.ulteo.com/main/forums/viewtopic.php?t=1343

[...]

解決 Ulteo apt-get GPG error

近日見到一個由 Ulteo 提供既免費 virtual desktop 既 solution, 所以就試裝一下. 不過當中遇到了一點小問題, 當進行 apt-get update 時, 出現 error message:

W: GPG error: http://archive.ulteo.com ovd-polaris Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 924B005D78BFFB01 W: You may want to run apt-get update to correct these problems

找尋後發現原來缺少了 Ulteo 既 PUBKEY, 解決方法原來去簡單, 只要下載以下連結並安裝便可解決問題. [...]

[轉載] Petabytes on a budget: How to build cheap cloud storage

At Backblaze, we provide unlimited storage to our customers for only $5 per month, so we had to figure out how to store hundreds of petabytes of customer data in a reliable, scalable way—and keep our costs low. After looking at several overpriced commercial solutions, we decided to build our own custom Backblaze [...]

[轉載] Build a RAID 6 array for $100/TB

Imagine storage that didn’t cost much more than bare drives. High density storage with RAID 6 – double-fault – protection, reasonable bandwidth and web-friendly HTTPS access.

And really, really cheap.

Not your enterprise’s RAID array Raw disk cost is only 5-10% of an enterprise RAID system’s cost. The rest goes for corporate jets, sales commissions, [...]

snort error: (http_inspect) IIS UNICODE CODEPOINT ENCODING

近日發現 snort 出現了一句 warning message: (http_inspect) IIS UNICODE CODEPOINT ENCODING. 找了很久才找到了簡單既解決方法. 這句錯誤其實是因為 snort 在設定網站語系 (language encoding) 時出錯.

要解決這個問題最好不要直接將該 module 停止, 因為這樣有機會出現安全漏洞, 所以只建議直接收改設定去改善這個問題.

到 snort 設定檔 /etc/snort/snort.conf 找尋 iis_unicode_map 原句為: preprocessor http_inspect: global iis_unicode_map unicode.map 1252, 將最後的數字更改為適當語系便可. 以 UTF-8 為例, 全句應為preprocessor http_inspect: global iis_unicode_map unicode.map 65001

* unicode map 可在同一個設定目錄裡尋找, 檔名為 unicode.map

參考網址: http://it.toolbox.com/blogs/locutus/snort-out-your-unicode-encoding-log-entries-21981

有需要可直接參考 snort manual: [...]

SMTP error 5.7.1 in Win2008 server

最近幫朋友用 win2008 起了個伺服器, 但部份 ASP 網頁未能成功通過 SMTP server 傳遞信息. 翻查錯誤信息, 原來係因為 unable to relay. 只要在 SMTP server 增加相應既 relay host IP 便可解決問題.

進入管理工具 –> IIS 6 –> SMTP 右按鼠鍵進入內容 在存取頁, 按下 Relay button 在相應畫面加入所需既 IP address

如果開啟 SMTP loggin, 設定成功後便可在 logging 那邊查看到 smtpsvc 服務成功運行. 如有需要可留言討論.

Ubuntu 8.04 upgrade to 9.04 in text mode

官方做法:

安裝 update-manager-core 修改 /etc/update-manager/release-upgrades, 將 Prompt=lts 轉為 Prompt=normal 執行 do-release-upgrade

經過一輪下載後, 升級程式便會啟動. 只要按照指示便可進行升級.

[...]

[轉載] How to change the product key on windows 2003

以下方法雖然係引用其他師兄既, 但係小弟就過真係有效, 所以同大家分享一下.

By: Daniel Petri

Warning! This document contains instructions for editing the registry. If you make any error while editing the registry, you can potentially cause Windows to fail or be unable to boot, requiring you to reinstall Windows. Edit the registry at your own risk. Always back up the registry before making [...]