Tech テクニクス

Windows 綠色軟體 @ Ubuntu 8.10

這幾週把自己的電腦桌面環境轉移到 Linux 系統。
像我這種上上網、聽聽音樂,不太玩遊戲的人,對於 WinXP 的依賴程度並不高。
首要的就是要先把常用的工具都給找到解決方案。

稍微測試了一下,很多的綠色軟體都可在 Wine 的環境下正常執行:

千千靜聽 ttplayer
http://www.ttplayer.com/
這個想必是很多人聽音樂的必備軟體。
除了操作方便,線上搜尋歌詞的功能更令人依賴。
經過測試在 Wine 下可正常啟動,但會有些小問題。
例如多個檔案匯入播放清單會當機,可以參照下面設定更改來解決。
Configure Wine >> Windows版本 --> Windows 98

[Drupal] 安裝教學

Drupal 是一個功能相當強的 CMS 系統。藉由基本的系統安裝,再搭配無數的模組使用,即可馬上建立任何類型的網站。相關的介紹就不多加詳述,本教學主要在如何從零開始,利用 Drupal 創建個人部落格。

安裝的基本系統環境: http://drupal.org/requirements

首先,先到官方網站 http://drupal.org 抓取最新版本的檔案。目前有 6.x 與 5.x 兩大分支。目前 5.x 的模組支援還是比較完整,但是 6.x 卻也增加了許多強大的功能。就參照自己的考量選擇囉,差異性不大,此文件以 5.x 為示範。

自動將資料庫等資料備份到Gmail

首先必須安裝 mutt,放在 /usr/ports/mail/mutt
然後就可以複製這份 script 來修改成你的版本

#!/bin/sh

##################################################
# Backup Mysql Datebase To Gmail ( for FreeBSD )
#
# Fixed by ajer001
##################################################
#where you want to save the backup files.
BACKUP_PATH=備份檔案的儲存路徑

#what mail you want to mail to.
RECEIVE_MAIL=填入e-mail account

#what your MySQL database server root's password.

用 Gmail 備份 MySQL on FreeBSD

先在自己的機器與 mysql server 安裝 GnuPG (現在是 1.4.0):

# cd /usr/ports/security/gnupg
# make install clean

如果是 FreeBSD 4.x,在自己的機器上產生 key 前,先設定 random device:

# rndcontrol -s 5
# rndcontrol -s 11

其中的 5 與 11 是 IRQ number,可以用下面的指令看哪個 IRQ 可以當 random device:

# pciconf -l

接下來在自己機器上用下面的指令產生 publickey 與 privatekey:

$ gpg –gen-key

Postfix+SASL+IMAP-UW+MailScanner+F-prot on FreeBSD

網路上有許多相關的文件
可是有些設定或方法 我實際操作遇到了問題
經過嘗試之後 將自己完整的安裝過程紀錄 分享
應該會讓你在整個安裝過程順利進行

我們先停止sendmail 並安裝Postfix
# killall sendmail
# cd /usr/port/mail/postfix
# make install clean

在出現的第一個選單中選擇 SASL 和 TLS
在出現的第二個選單中選擇 DB3 和 PWCHECK
之後的程序中會出現兩個選項,一個是問「是否將 postfix 加入 mail 群組?」,

FreeBSD source 更新與系統升級

FreeBSD source 更新與系統升級 for 4-stable
Last Update: 2005/12/03

安裝完 FreeBSD 也安裝好 CVSup 套件後
就可以開始做 source 更新與系統升級
來修補 FreeBSD 系統上的漏洞 維護系統安全

不過要先確定在安裝FreeBSD時 有安裝 src 否則更新會花很多時間
可透過 /stand/sysinstall 選擇安裝 src
# /stand/sysinstall

將 stable-supfile 複製至 /root/
# cp /usr/share/examples/cvsup/stable-supfile
# ee /root/stable-supfile

編輯 stable-supfile 更改下列部分

FreeBSD CVSup 安裝與應用

我這裡就不詳加介紹如何安裝 FreeBSD 了
網路上的相關文件已經夠多了
或者你可以參考 OHaHa’s 學習心得 的教學

CVSup 是在 FreeBSD 系統中相當重要的程式
功用在於更新最新的 port tree 以及 source
可以讓你使用 ports 安裝程式時 能夠裝上最新的程式
也可以借此更新 source 來升級系統

CVSup 的安裝其實非常簡單
只要在安裝 FreeBSD 時 有選擇安裝 ports 且已經正確連上網路
便可輕鬆由下列方式安裝:

更改 fonera 無線訊號強度

更改 fonera 無線訊號強度
change the wifi tx-power of the fonera (plus)

Recently I read in the FON-Forums, that some people are using huge antennas with their Foneras. Some of them now seem to be concerned about not meeting legal regulations concerning tx power anymore… Well… even though I personally don’t know anyone who’d really care, you can of course cut down the tx power to a level that suits your needs! So let’s check what’s standard:

root@OpenWrt:~# iwconfig ath0 | grep Tx-Power
Bit Rate:0 kb/s Tx-Power=18 dBm Sensitivity=0/3

更改 Fonera Plus 流量限制

更改 Fonera Plus 上傳下載流量限制
how to change the fonera plus upload / download limit

root@OpenWrt:~# uci set qos.wan.upload=640
root@OpenWrt:~# uci set qos.wan.download=8192
root@OpenWrt:~# uci commit

關閉流量限制
disable the flow limits

root@OpenWrt:~# uci set qos.wan.enabled=0
root@OpenWrt:~# uci commit

XAMPP 使用者網頁設定

xampplite\apache\conf\httpd.conf 去掉前面註解
# LoadModule userdir_module modules/mod_userdir.so

xampplite\apache\conf\extra\httpd-userdir.conf 新增下面幾行:

UserDir "D:/xampplite/user/*/public_html"

Options Indexes FollowSymLinks Includes ExecCGI
.......
.......

使用者資料夾在 /xampplite/user/*/public_html
位址:http://www.example.com/~*/
自由創建新資料夾即可,不用再做其他設定。