顯示具有 opensource 標籤的文章。 顯示所有文章
顯示具有 opensource 標籤的文章。 顯示所有文章

2016/11/26

STOMP/MQTT 通訊協定的測試心得(client/server)

STOMP 通訊協定的測試心得(client/server)

STOMP 是啥東西? 
STOMP 是 Simple (or Streaming) Text Oriented Message Protocol 的縮寫
主要提供一個可以操作的通訊界面,可以支援不同平台的的客戶端交換文字訊息。它屬於一個訊息導向的中介軟體。這個服務類似 HTTP ,並且架構於 TCP 上面。
ref: https://segmentfault.com/a/1190000004906137 功能示意圖


用來搭建 IM (即時通訊服務) 是很簡單好用的中介工具
https://segmentfault.com/a/1190000004906137 

這裡有目前常見的訊息中介軟體的比較介紹 amqp mqtt or stomp
http://blogs.vmware.com/vfabric/2013/02/choosing-your-messaging-protocol-amqp-mqtt-or-stomp.html

建議和 html5 websocket 一起看,比較容易理解它到底再做啥? P66 頁開始。
http://www.slideshare.net/peterlubbers/html5-real-time-and-websocket/94-Learn_More_HTML5_User_Groups

這裡有 function 功能規格說明
https://mq.java.net/4.4-content/stomp-funcspec.html

這個大概就是目前的官方網站了
https://github.com/stomp-php/stomp-php/wiki

這個服務主要構過 broker 來提供服務,目前 broker 的軟體有很多種可以提供。

broker -- STOMP Servers
broker -- STOMP Servers 的列表,常用的。
https://stomp.github.io/implementations.html
我裡以 apache apollo 這套 activemq 的子專案,來做說明。

Apollo 1.7.1 版本,下載我是以 Linux 版來說明
http://activemq.apache.org/apollo/download.html

提供有 4 種存取的方式
WS  --  TCP + Websocket
WSS -- TCP + TLS + Websocket
HTTP -- TCP + HTTP
HTTPS -- TCP + TLS + HTTP
ref: http://www.slideshare.net/peterlubbers/html5-real-time-and-websocket/78-ws_and_wss_schemes_78


// 安裝說明文件
http://activemq.apache.org/apollo/documentation/getting-started.html

解開檔案後,我把它放在 /opt 上面 , 並使用這個程式建立一個 broker 名稱為 jangmtbroker 放在 /var/lib/ 上面
# /opt/apache-apollo-1.7.1/bin/apollo create jangmtbroker
Creating apollo instance at: jangmtbroker
Generating ssl keystore...

You can now start the broker by executing:

   "/var/lib/jangmtbroker/bin/apollo-broker" run

Or you can setup the broker as system service and run it in the background:

   sudo ln -s "/var/lib/jangmtbroker/bin/apollo-broker-service" /etc/init.d/
   /etc/init.d/apollo-broker-service start
 
* 設定為啟動的服務
# sudo ln -s "/var/lib/jangmtbroker/bin/apollo-broker-service" /etc/init.d/
* 接下來,就可以透過底下指令啟動它
# /etc/init.d/apollo-broker-service start


* 啟動後會有一個管理界面 Web Administration 預設只開放 127.0.0.1 可以改的
* 如果要修改可以參考 etc 下面的 xml 設定檔。
http://127.0.0.1:61680/ or https://127.0.0.1:61681/
* 預設帳密 admin and password.

# 在系統會看到 appolo 的 port
# netstat -antlp | grep apollo
tcp6       0      0 :::61613                :::*                    LISTEN      11471/apollo      
tcp6       0      0 :::61614                :::*                    LISTEN      11471/apollo      
tcp6       0      0 127.0.0.1:61680         :::*                    LISTEN      11471/apollo      
tcp6       0      0 127.0.0.1:61681         :::*                    LISTEN      11471/apollo      
tcp6       0      0 :::61623                :::*                    LISTEN      11471/apollo      
tcp6       0      0 :::61624                :::*                    LISTEN      11471/apollo      
tcp6       0      0 :::32777                :::*                    LISTEN      11471/apollo      
tcp6       0      0 127.0.0.1:61680         127.0.0.1:53532         ESTABLISHED 11471/apollo      
tcp6       0      0 127.0.0.1:61680         127.0.0.1:53536         ESTABLISHED 11471/apollo

* 防火牆記得要開這幾個 port


* 當然,預設密碼很危險,可以參考下列文件修改預設帳密
https://activemq.apache.org/apollo/documentation/user-manual.html#Using_Custom_Login_Modules

* apollo.xml 為系統主要設定檔, 可以針對 access_rule 設定權限
ex: 允許群組 admins 可以操作所有的動作
access_rule action="*" allow="admins"ex: 允許群組 monotors  可以操作連線及觀看系統狀態的功能
access_rule action="connect monitor" allow="monitors"
ex: 允許群組 appusers 可以操作連線、建立、送出、接收訊息
access_rule action="connect create send receive consume" allow="appusers"
ex: 允許群組 appusers 可以操作連線、建立、接收訊息
access_rule action="connect create  receive consume" allow="users"
透過這樣的區隔,可以仔細的分別設定不同的權限群組。

# 設定個別使用者的密碼,也可以用加密 ENC 方式設定
[root@dev etc]# grep -v '#' users.properties
# 帳號=密碼
mtchang=密碼
demo=密碼
app1=密碼

# 將使用者,分配到不同的群組,一個群組如果需要很多人可以使用 | 符號連接。
[root@dev etc]# grep -v '#' groups.properties
admins=mtchang
monitors=admin
users=demo
appusers=app1


# 以上,這樣 server 端就好了。
// --------------------------------------------------

* 客戶端工具有很多選擇, 我找了一個 STOMP Over WebSocket 的專案,使用 browser 就可以用了。
http://jmesnil.net/stomp-websocket/doc/
這個有說明如何使用 websocket api 來操作


* 主要我想要做一個線上即時聊天的界面,從 github 上找到 jmesnil 的 source code
https://github.com/jmesnil/stomp-websocket/tree/master/example
然後,小小修改一下。

我的個人小小聊天室,就出現了。你只要開兩個 browser 就可以自己和自己聊天了。

http://jangmt.com/stompchat/chat/  (純接收訊息)
http://jangmt.com/stompchat/chat/send.php  (送出訊息測試)


// 發送訊息到指定的 STOMP broker
// ----
$user = "app1";
$password = "密碼";
$host = "主機.jangmt.com";
$port = 61613;
$destination  = '/topic/chat.general.demo';
$message_body1 = '5秒消失_'.date(DATE_RFC2822);
$message_body2 = 'sticky:黏住桌面'.date(DATE_RFC2822);
try {
  $url = 'tcp://'.$host.":".$port;
  $stomp = new Stomp($url, $user, $password);
  $stomp->send($destination, $message_body1);
  $stomp->send($destination, $message_body2);
  //$stomp->send($destination, "SHUTDOWN");
} catch(StompException $e) {
  echo $e->getMessage();
}
?>





這個中介軟體 Apache  Apollo 伺服器端的界面長成這樣,可以看到線上使用者的資源使用狀況。





// --------------------------------------------------
// 如果你的需求是在 php 上面,要撈一些 data 訊息,可以參考下面的資訊
// PHP 官方網站都有說明了
http://php.net/manual/en/book.stomp.php

// 在 PHP 上面執行,可以參考 wiki 上面的說明
http://nrodwiki.rockshore.net/index.php/PHP_Examples

// client 端 , 也可以用 php 記得裝 stomp 套件。
# yum install php71-php-pecl-stomp
// 驗證
# php71 -i | grep stomp
/etc/opt/remi/php71/php.d/40-stomp.ini,
stomp.default_broker => tcp://localhost:61613 => tcp://localhost:61613
stomp.default_connection_timeout_sec => 2 => 2
stomp.default_connection_timeout_usec => 0 => 0
stomp.default_password => no value => no value
stomp.default_read_timeout_sec => 2 => 2
stomp.default_read_timeout_usec => 0 => 0
stomp.default_username => no value => no value

以上經驗分享,打完收工。使用比較有經驗後再來分享使用心得。
該繼續寫程式了。....XDXD

2014/10/25

Linux Mint – LAMP 的安裝 (1)



* Apache的管理與設定更是成了初學 Linux 的使用者必須一定要學會的技術。本文說明的主要環境以 Linux Mint,配合 Apache2 Server 網頁服務、PHP 程式語言、MySQL資料庫(更改為 MariaDB) 及 PHPMyAdmin資料庫管理工具,架設出完整的LAMP服務的架設流程。


* 需求套件:再進行LAMP服務的安裝時,我們需要以下開放原始碼的程式。他的官方網站如下:

  • Apache(http://httpd.apache.org/)
  • PHP(http://www.php.net/)
  • MySQL(http://www.mysql.com/) --> 轉 https://mariadb.org/
  • PHPMyAdmin(http://www.phpmyadmin.net)

這些程式是他的官方網站資料,在 Linux Mint OS 中已經有提供LAMP已經編譯好的套件程式,只需要透過 apt-get 的軟體安裝即可方便的安裝完成。

安裝之前
1. 設定好你的網路及網路名稱
sudo /etc/init.d/networking restart  可以重新啟動你的網卡
ifconfig  可以查詢你的網卡資訊
mtchang@machine ~ $ sudo nano /etc/hosts
127.0.0.1 localhost
127.0.0.1 mtchang-virtual-machine
127.0.0.1 mini.jangmt.com
192.168.189.129 mint.jangmt.com

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

* 查詢網卡資訊 ifconfig
mtchang@machine ~ $ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0c:29:a4:23:2d  
          inet addr:192.168.189.129  Bcast:192.168.189.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fea4:232d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:990 errors:0 dropped:0 overruns:0 frame:0
          TX packets:936 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:93782 (93.7 KB)  TX bytes:122551 (122.5 KB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:207 errors:0 dropped:0 overruns:0 frame:0
          TX packets:207 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:29195 (29.1 KB)  TX bytes:29195 (29.1 KB)

* 啟動 apache 的服務
mtchang@machine ~ $ sudo /etc/init.d/apache2 restart
 * Restarting web server apache2                            [ OK ] 
* 接下來用瀏覽器測試
http://localhost/index.php 應該會有 linux 的測試畫面出現。(localhost 只能在本機用,如果試用別機器測試請輸入他的 ip )


* 再 建立 php 的測試檔案, /var/www/html 目錄為 apache2 的家目錄
mtchang@machine /var/www/html $ sudo nano /var/www/html/index.php
<?php 
echo "hello linux";
phpinfo(); 
?>

到這裡 apache2 及 php 可算是可以工作了。

2014/03/28

將Windows 8 安裝傳統選單工具列(Classic Shell)

名稱:Classic Shell

用途:可以讓 windows 8 及 windows 8.1 擁有傳統的選單

下載:http://www.classicshell.net/downloads/

心得:他有 opensource 並放在 sf.net 所以我才推薦。且用起來還不錯,品質可以接受。

Classic Start



2012/04/29

CentOS 6 預設沒有 php-mcrypt 的問題(phpmyadmin 要用啦!!)


CentOS 6 預設沒有 php-mcrypt 的問題(phpmyadmin 要用啦!!)
哪就用 EPEL 的好了...

rpm -ivh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-5.noarch.rpm
yum install php-mcrypt
/etc/init.d/httpd restart
另外 phpmyadmin 的 pma 進階功能安裝 ,說明如下(就是大家都不翻譯中文)
http://xxx.xxx.xxx.tw/pma/Documentation.html#linked-tables
他就一直告訴你,你有個功能沒有裝,沒裝很可惜一直提醒....真是可惡...
開啟的方式很簡單
(1)建立一個MySQL使用者隨便取名字, ex: 帳號:pma 密碼:pmapass
(2)在 ./examplescreate_tables.sql 有建立表格的資訊,使用上面的帳號登入並把它擷取貼到 phpmyadmin 內的 sql 欄位並執行。
(3)修改系統的底下這段,把註解打開並改一下正確的帳號及密碼


/*
 * phpMyAdmin configuration storage settings.
 */
/* User used to manipulate with storage */
$cfg['Servers'][$i]['controlhost'] = 'localhost';
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = 'pmapass';
/* Storage database and tables */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
$cfg['Servers'][$i]['relation'] = 'pma_relation';
$cfg['Servers'][$i]['table_info'] = 'pma_table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma_column_info';
$cfg['Servers'][$i]['history'] = 'pma_history';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma_table_uiprefs';
$cfg['Servers'][$i]['tracking'] = 'pma_tracking';
$cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';
$cfg['Servers'][$i]['userconfig'] = 'pma_userconfig';
$cfg['Servers'][$i]['recent'] = 'pma_recent';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma_table_uiprefs';
/* Contrib / Swekey authentication */
// $cfg['Servers'][$i]['auth_swekey_config'] = '/etc/swekey-pma.conf';



2010/11/12

RedHat正式釋出RHEL6,並且改變認證考試RHCT成為RHCSA,RHCE認證將有大變動



Red Hat Enterprise Linux 這幾天也為免變化太大了,都快追不上了.

RedHat正式釋出RHEL6,並且改變認證考試RHCT成為RHCSA,RHCE認證將有大變動

引用自 RELEASE-NOTES-zh-TW.html


比較大的改變:

檔案系統​​​預​​​設​​​值​​​變更為 ext4 檔​​​案​​​系​​​統。

Red Hat Enterprise Linux 6 提​​​供​​​了​​​ Intelligent Input Bus(IBus)為​​​預​​​設​​​的​​​亞​​​洲​​​語​​​言​​​輸​​​入​​​法​​​框​​​架​​​。​​​

Red Hat Enterprise Linux 6 已​​​支​​​援​​​作​​​為​​​ x86 與​​​ AMD 64 以​​​及​​​ Intel 64 架​​​構​​​的​​​ Xen 客​​​座​​​端​​​。​
Red Hat Enterprise Linux 6 不​​​支​​​援​​​作​​​為​​​ Xen 主​​​機​​​。​​​


xen不支援那該怎麼辦?

還好有新工具 virt-v2v
Red Hat Enterprise Linux 6 包​​​含​​​了​​​新​​​的​​​ virt-v2v 工​​​具​​​,並​​​能​​​讓​​​系​​​統​​​管​​​理​​​員​​​轉​​​換​​​和​​​匯​​​入​​​他​​​們​​​在​​​其​​​它​​​系​​​統​​​(例​​​如​​​ Xen 和​​​ VMware ESX)上​​​所​​​建​​​立​​​的​​​虛​​​擬​​​機​​​器​​​。​​​virt-v2v 為​​​ Red Hat Enterprise Linux 5 hypervisor 上​​​執​​​行​​​的​​​ Xen 客​​​座​​​端​​​提​​​供​​​了​​​遷​​​移​​​路​​​徑​​​。​​​



Red Hat Certified System Administrator (RHCSA)


RHCT 認證更動為 RHCSA(原文) RHCE考試又要大變動。

關於 RHCSA 的經常問題回答

RHCSA Exam Objectives 考試目標

2010年11月,紅帽RHCE認證的升級版RHEL 6正式出現預計2011.3開始教授新的認證課程。2011.3月,舊版RHEL 5.4的認證課程將全面退出培訓。新版的RHCT認證將更名為 RHCSA(Redhat Certified System Administrator),考試代號為EX200。

新版的RHCE,必須先通過RHCSA認證,才可以參加RHCE考試(EX300)證書有效期變為三年。

這就是說,新版RHCE的難度將大幅度加大,考試的次數將變為二次,考試的時間將由現在半天,延長為一天(又改一天...XD),上午考RHCSA,下午考RHCE。

結論是,要考趁三月前快點考,否則剛出來的RHEL 6 認證一定是最難的狀況。

2010/11/03

CentOS/RHEL 安裝 rar 程式

rar 不是GPL的程式,所以沒有被打包在套件包中。
但是很多人就是喜歡用他,遇到 .rar 的壓縮檔在 linux 中出現也很麻煩。

rar for linux 下載 http://www.rarsoft.com/download.htm


* 32bit 的 rar安裝流程,請依你的需求安裝(載點在上面的 link )
[root@cicsrv ~]# wget http://www.rarsoft.com/rar/rarlinux-3.9.3.tar.gz
[root@cicsrv ~]# tar zxvf rarlinux-3.9.3.tar.gz
[root@cicsrv ~]# cd rar
[root@cicsrv rar]# make install
mkdir -p /usr/local/bin
mkdir -p /usr/local/lib
cp rar unrar /usr/local/bin
cp rarfiles.lst /etc
cp default.sfx /usr/local/lib


我推薦有GPL授權,且具有 rar 壓縮比的壓縮工具 7zip or bzip 這兩支工具程式
7zip
http://www.7-zip.org/download.html
現在在 windows 底下我都用這套,連寫 windows 的備份程式 dos script 也用這個做壓縮的動作,簡單有好用

bzip 通常 linux 預設就會安裝,但是在 windows 底下使用比較麻煩
http://gnuwin32.sourceforge.net/packages/bzip2.htm
尤其是使用 command mode 的時候,因為他很多的 lib 所以不適合做 portable 的壓縮 script
但是壓縮比來說,是很不錯的。

2010/11/01

Fail2ban 杜絕很煩人的 bot-net 攻擊

fail2ban 是一個針對 log 檔案中密碼輸入錯誤的紀錄,然後更新防火牆規則
進行 ban ip 動作的服務,可以有效的對付 bot-net 的惡意掃瞄程式

在 rhel/centos 的版本中如果要安裝需要安裝 EPEL 的套件

下載:
http://www.fail2ban.org/wiki/index.php/Downloads

EPEL 是針對 fedora 中沒有被收錄在 rhel 的套件,做打包彙整。提供給 rhel 使用的套件。
如果要安裝 EPEL 套件來源方法很簡單,請在系統的 /etc/yum.repos.d/ 目錄建立一個檔案 epel.repo
並且放入底下的內容,皆下來安裝軟體的時候就會更新了。底下是以 5 版 x86_64 為安裝來源
如果你的版本比較新,請觀看官方網站找比較新的安裝來源。
http://fedoraproject.org/wiki/EPEL
[root@lab yum.repos.d]# nano epel.repo
[epel5]
enabled = 1
name = epel 5
baseurl = http://mirror01.idc.hinet.net/EPEL/5/x86_64/
gpgcheck = 0

[epel5Server]
enabled = 1
name = epel 5Server
baseurl = http://mirror01.idc.hinet.net/EPEL/5Server/x86_64/
gpgcheck = 0

[epel5Client]
enabled = 1
name = epel 5Client
baseurl = http://mirror01.idc.hinet.net/EPEL/5Client/x86_64/
gpgcheck = 0

* 安裝好後,就可以透過 yum 安裝 fail2ban 軟體
# 安莊 fail2ban
[root@lab ~]# yum install fail2ban
# 因為他是各服務,需要重新啟動
[root@lab ~]# /etc/init.d/fail2ban restart

* 驗證看有沒有在跑 ps -auxww
root 11384 0.0 0.7 175836 4920 ? Sl 14:49 0:00
/usr/bin/python /usr/bin/fail2ban-server -b -s /var/run/fail2ban/fail2ban.sock -x

系統服務設定檔 /etc/fail2ban/fail2ban.conf

服務監控的設定檔 /etc/fail2ban/jail.conf 格式類似底下這樣,需要啟動的服務把 enabled 設定為 true 即可
[ssh-iptables]

enabled = true
filter = sshd
action = iptables[name=SSH, port=ssh, protocol=tcp]
sendmail-whois[name=SSH, dest=root, sender=fail2ban@mail.com]
logpath = /var/log/secure
maxretry = 5

2010/10/25

php list 的 url cache 及 footer 問題

php list 中可以插入遠端的 URL 當作郵件內容,但是內容只要輸入後會被 cache 在 mysql 資料庫中
資料表示 url_cache 如果想立即生效可以從 sql 中刪除被 cache 的 web url 文件
,但是 url cache refetch time 是可以設定的,預設是 3600 秒,只要修改
phplist 目錄中 config/config.php 檔案中的這一段就可以達成
# send a webpage. You can send the contents of a webpage, by adding
# [URL:http://website/file.html] as the content of a message. This can also be personalised
# for users by using eg
# [URL:http://website/file.html?email=[email]]
# the timeout for refetching a URL can be defined here. When the last time a URL has been
# fetched exceeds this time, the URL will be refetched. This is in seconds, 3600 is an hour
# this only affects sending within the same "process queue". If a new process queue is started
# the URL will be fetched the first time anyway. Therefore this is only useful is processing
# your queue takes longer than the time identified here.
define('REMOTE_URL_REFETCH_TIMEOUT',300);

另外在系統中,會自動增加 phplist 的廣告及 footer 訂閱的連結,如果想拿掉可以
修改 admin/sendemaillis.php 其中程式碼為

$url = getConfig("subscribeurl");$sep = ereg('\?',$url)?'&':'?';
$html["subscribe"] = sprintf('<a href="%s">%s</a>',$url,$strThisLink);
$text["subscribe"] = sprintf('%s',$url);
$html["subscribeurl"] = sprintf('%s',$url);
$text["subscribeurl"] = sprintf('%s',$url);
#?mid=1&id=1&uid=a9f35f130593a3d6b89cfe5cfb32a0d8&p=forward&email=michiel%40tincan.co.uk&
$url = getConfig("forwardurl");$sep = ereg('\?',$url)?'&':'?';
$html["forward"] = sprintf('<a href="%s%suid=%s&mid=%d">%s</a>',$url,$sep,$hash,$messageid,$strThisLink);
$text["forward"] = sprintf('%s%suid=%s&mid=%d',$url,$sep,$hash,$messageid);
$html["forwardurl"] = sprintf('%s%suid=%s&mid=%d',$url,$sep,$hash,$messageid);
$text["forwardurl"] = $text["forward"];
$url = getConfig("forwardurl");
# make sure there are no newlines, otherwise they get turned into <br/>s
$html["forwardform"] = sprintf('<form method="get" action="%s" name="forwardform" class="forwardform"><input type=hidden name="uid" value="%s" /><input type=hidden name="mid" value="%d" /><input type=hidden name="p" value="forward" /><input type=text name="email" value="" class="forwardinput" /><input name="Send" type="submit" value="%s" class="forwardsubmit"/></form>',$url,$hash,$messageid,$GLOBALS['strForward']);
// $text["signature"] = "\n\n--\nPowered by PHPlist, www.phplist.com --\n\n";
// skip by mtchang 2010.7.14
$text["signature"] = 'mtchang';



/* skip by mtchang 2010.7.14
if (!EMAILTEXTCREDITS) {
$html["signature"] = $PoweredByImage;#'
<div align="center" id="signature">
<a href="http://www.phplist.com/"><img alt="Powered by PHPlist" border="0" height="31" src="powerphplist.png" title="Powered by PHPlist" width="88" /></a></div>
';
# oops, accidentally became spyware, never intended that, so take it out again :-)
$html["signature"] = preg_replace('/src=".*power-phplist.png"/','src="powerphplist.png"',$html["signature"]);
} else {
$html["signature"] = $PoweredByText;
}
*/
$html["signature"] = '';



在 footer 產生訂閱連結的部分,可以修改

$text["footer"] = eregi_replace("\[SUBSCRIBE\]",$text["subscribe"],$text['footer']);
$html["footer"] = eregi_replace("\[SUBSCRIBE\]",$html["subscribe"],$html['footer']);
$text["footer"] = eregi_replace("\[PREFERENCES\]",$text["preferences"],$text["footer"]);
$html["footer"] = eregi_replace("\[PREFERENCES\]",$html["preferences"],$html["footer"]);
$text["footer"] = eregi_replace("\[FORWARD\]",$text["forward"],$text["footer"]);
$html["footer"] = eregi_replace("\[FORWARD\]",$html["forward"],$html["footer"]);
$html["footer"] = eregi_replace("\[FORWARDFORM\]",$html["forwardform"],$html["footer"]);
$text["footer"] = eregi_replace("\[BLACKLIST\]",$text["blacklist"],$text['footer']);
$html["footer"] = eregi_replace("\[BLACKLIST\]",$html["blacklist"],$html['footer']);
if (sizeof($forwardedby) && isset($forwardedby['email'])) {
$htmlmessage = eregi_replace("\[FORWARDEDBY]",$forwardedby["email"],$htmlmessage);
$textmessage = eregi_replace("\[FORWARDEDBY]",$forwardedby["email"],$textmessage);
$html["footer"] = eregi_replace("\[FORWARDEDBY]",$forwardedby["email"],$html["footer"]);
$text["footer"] = eregi_replace("\[FORWARDEDBY]",$forwardedby["email"],$text["footer"]);
$text["footer"] = eregi_replace("\[UNSUBSCRIBE\]",$text["blacklist"],$text['footer']);
$html["footer"] = eregi_replace("\[UNSUBSCRIBE\]",$html["blacklist"],$html['footer']);
} else {
$text["footer"] = eregi_replace("\[UNSUBSCRIBE\]",$text["unsubscribe"],$text['footer']);
$html["footer"] = eregi_replace("\[UNSUBSCRIBE\]",$html["unsubscribe"],$html['footer']);
}

$html["footer"] = '<div class="emailfooter">'.nl2br($html["footer"]).'</div>';
// skip footer by mtchang 2010.10.25
$html["footer"] = '';

2010/09/28

PHPLIST 使用及設定 - 發信設定

phplist 是一套功能很強大的發信工具,但他的製報功能不是很強.....
http://www.phplist.com/

這是他的特色(官方網站說明)
  • phplist is a one-way email announcement delivery system. It is great for newsletters, publicity lists, notifications, and many other uses. (It is different from group mailing list systems like mailman.)
  • The Web Interface lets you write and send messages, and manage phplist over the internet.
  • phplist keeps sending messages from your web server, even after you shut down your computer.
  • 100 000 + subscribers. phplist is designed to manage mailing lists with hundreds of thousands of subscribers. phplist is excellent with smaller lists too!
  • No duplicate messages. No 'forgotten' messages. phplist manages message delivery with a message queue, ensuring that every subscriber gets the email message, and that no subscribers receive two copies, even if they're subscribed to more than one list!
  • Open/View Tracking tells you how many users opened your email message. This provides a minimum statistic, as many email clients with privacy or security policies block images (gmail, thunderbird, and others).
  • Click Tracking tracks links and URLs. Statistics can be viewed by message, URL or subscriber.
  • Multiple Subscribe Pages allow you to choose many different combinations of templates, languages, user attributes and lists.
  • Templates are completely customizable, and make site integration a breeze.
  • Multiple Templates on different subscribe pages can integrate phplist with several different web sites.
  • Subscriber Attributes like 'name', 'country', and other personal information, are completely customizable. You can specify what information you need to get from users when they subscribe.
  • User Specific Content. You can use Subscriber Attributes in message content to make each and every email message personalized with the subscribers name, country, or any other attribute.
  • HTML email messages. Subscribers can be given the choice between text or html email messages. You decide whether subscribers can choose, what the default choice is, and what format a message is sent in: text only, html only, or both!
  • The HTML Editor allows you to edit html messages from phplist using FCKeditor. TinyMCE is also available.
  • Internationalization. phplist is available in English, French, German, Spanish, Portuguese, Traditional Chinese, Dutch, Vietname and Japanese and translation work is in progress for other languages.
  • Easy Install via Fantastico, FTP upload, or SSH.
  • Multiple List Administrators. The super-admin can assign lists to List Managers, who can manage their users and lists. The super-admin user can 'prepare' messages that can be sent by list managers to their lists.
  • Subscriber Preferences. Every email message contains personalized URLs for subscribers to update their preferences or unsubscribe. Subscribers can update their own information and keep your database up to date. Unlike most other mailing list managers, in phplist subscribers can change their email address.
  • The User Management tools are excellent to manage and maintain large databases of subscribers.
  • Bounce Processing keeps your database clean of unused and non-existent email addresses.
  • Advanced Bounce handling let's you teach phplist to distinguish between permanent and temporary message-delivery errors. You can define automated actions on receipt of bounce messages according to matches with your regular expressions.
  • CSV Import and Export. Use CSV and tab delimited files to import your existing list of users or to export the users on the phplist system for use in your in-house database. phplist's database has a 'foreign key' to help keep multiple copies of databases synchronized without duplicating users.
  • Attachments can be uploaded and included in messages for download.
  • Send a Web page. Tell phplist the URL of a web page you want to send to your users, and phplist will fetch it and send it. You can even put subscriber-specific parameters in the URL.
  • RSS feeds can be automatically sent to a mailing list weekly, daily, or monthly.
  • PDF messages can be automatically created and sent as attachments to ensure that your message is seen the way it was designed by all your subscribers, regardless of their email message reader.
  • Batch Processing is useful in shared hosting environments. Set the maximum number of sent messages in a given time period.
  • Throttling can limit the load on your server so it doesn't overload.
  • Domain Throttling limits the number of emails to specific domains to keep on the friendly side of their system administrators.
  • Scheduled Sending let's you tell phplist when the message is to be sent.
  • Repetition. A message can be repeated automatically to send updated dynamic content and attachments.
  • Text from HTML. Text email messages are managed fluently in phplist. phplist will automatically create a text version of an html message. Optionally the message composer can create it manually.
  • PGP signing and encrypting (soon).
    Send your message digitally signed or encrypted, or both.
  • Email to Fax (soon).
    Configure the details of your favourite email 2 fax gateway and phplist will send the HTML version of the message as a PDF attachment to your fax gateway. The fax will include the images in the HTML.
  • Integration with other tools. Several systems exist on the internet that integrate phplist with your favourite CMS or blogging tool. Check out the Documentation for a list.

連台大的的電子發報平台都是用它改寫的
http://epaper.ntu.edu.tw/


他的安裝請參考官方網站的說明,中文有空我在來寫
http://docs.phplist.com/PhplistInstallation

我要備註的是這一段,關於 README.commandline 的設定方式
官方的文件是這樣寫的
Running PHPlist from the commandline

Commandline processing requires PHP 4.3.0 or higher

A few pages in the PHPlist system can now, as of version 2.7.0 be run with
a simple command from the commandline.

the script to use is called "phplist" in the "bin" directory. You will have to edit
this script to fit your system

The normal PHPlist access restrictions are bypassed, but the Unix users who are
allowed to run the script should be mentioned in the "commandline_users" config
variable. The identity of a user is determined by the USER environment variable, which
may not always match your system.

The "p" parameter is the page that needs to be run.
Currently you can use "send", "processqueue" and "processbounces"

phplist -psend

This will require some more arguments:

-l list
-s subject
[-f from]

and you need to "pipe" the message into the script.

The -l parameter can have two types of values, the name of the list or the number of the list.
You can added multiple lists or multiple -l parameters
The subject can have spaces
The from is optional. It will default to the system administrator as set up in your config.

So the full "send" command line would be:

phplist -psend -s This is the subject -l test 1 2 3 -f me@server.com < messagefile




* 於是我在我的命令列下這樣的指令 /bin/phplist -p processqueue (處理電子報queue 的信件),它執行了一段時間,因為我設定發 300 封信後,需要休息 300 秒才可以繼續在工作,免得被當成廣告信件。如果這個動作在網頁上執行,它就會把該網頁綁住,然後一直的用 javascript 跑一個執行寄信的畫面,並且鎖住 browser 避免你關掉。但是如果可以把這一段寫成 cron(排成) 放在系統中讓他自己跑就會方便許多了。
epaper@www:~$ /home/epaper/bin/phplist -p processqueue
PHPlist version 2.10.12 (c) 2000-2010 Tincan Ltd, http://www.phplist.com
Started
Sending in batches of 300 emails
Script stage: 6
Finished, Nothing to do
Finished, All done
epaper@www:~$ /home/epaper/bin/phplist -p processqueue
PHPlist version 2.10.12 (c) 2000-2010 Tincan Ltd, http://www.phplist.com
Started
Sending in batches of 300 emails
Processing has started, 1 message(s) to process.
Processing message 66
Looking for users
Found them: 778 to process
batch limit reached: 300 (300)
Script stage: 5
300 messages sent in 335.89 seconds (3215 msgs/hr)
1 invalid emails
Finished this run
Reload required
You have mail in /var/mail/epaper

* 但是有想到另外一個問題,就是當一個發信的工作跑了很久可能需超過 24 hr 以上的時間發信,系統的處理是等待.....,所以這樣就不會有搶工作佇列的問題。
epaper@www:~$ /home/epaper/bin/phplist -p processqueue
PHPlist version 2.10.12 (c) 2000-2010 Tincan Ltd, http://www.phplist.com
A process for this page is already running and it was still alive 1 seconds ago
Running commandline, quitting. We'll find out what to do in the next run.

* 所以如果第二次發信的時候,phplist 會把剛剛發過得扣除,然後在發一次然後在等待 300 秒才會結束程式。所以看起來如果要自動跑的話寫 5min 跑一次,看起來是可以接受的。
epaper@www:~$ /home/epaper/bin/phplist -p processqueue
PHPlist version 2.10.12 (c) 2000-2010 Tincan Ltd, http://www.phplist.com
Started
Sending in batches of 300 emails
Processing has started, 1 message(s) to process.
Processing message 66
Looking for users
Found them: 477 to process

* 如果你有設定好的話,它應該會發一封信到你的信箱去,告訴你大概做了什事....
To: epaper@epaper.cm.nsysu.edu.tw
Subject: PHPlist Maillist Processing info
Recieved:
From: EpaperWebmaster
X-MessageID: systemmessage
X-ListMember: epaper@epaper.jangmt.com
X-UID: 4790


Started
Sending in batches of 300 emails
Processing has started, 1 message(s) to process.
Processing message 66
Looking for users
Found them: 778 to process
batch limit reached: 300 (300)
Script stage: 5
300 messages sent in 335.89 seconds (3215 msgs/hr)
1 invalid emails


* 但是你知道發信總是有人的 email 會是錯誤的,所以要定時的收取退件清單。這些清單會被收進系統的資料庫內,並且予以紀錄。只要修正這些原始的資料,就可以排除了
epaper@www:~$ /home/epaper/bin/phplist -p processbounces
PHPlist version 2.10.12 (c) 2000-2010 Tincan Ltd, http://www.phplist.com
110 bounces to fetch from the mailbox
Please do not interrupt this process
25 done
50 done
75 done
100 done
Closing mailbox, and purging messages
Identifying consecutive bounces
Identifying consecutive bounces
0 of 355 users processed
Identifying consecutive bounces
10 of 355 users processed
Identifying consecutive bounces

* 於是乎加上了排成,我寫成這樣的方式,使用這 epaper 使用 crontab -e 編輯 crontab ,每 20 min 收一次退信,每 5 min 處理信件佇列。
# m h dom mon dow command
*/5 * * * * /home/epaper/bin/phplist -p processbounces
*/20 * * * * /home/epaper/bin/phplist -p processqueue

* BUT 人生就是因為有那麼多的 but 才顯得有趣,系統會告訴你某個變數沒有定義,不讓你跑....錯誤訊息如下
Error: USER environment variable is not defined, cannot do access check. Please make sure USER is defined.
PHPlist version 2.10.12 (c) 2000-2010 Tincan Ltd, http://www.phplist.com

* 那怎麼辦勒,只好自己手工產生變數了...於是我修改了 cron 並自己改寫了一個 shell script
epaper@www:~$ vim epaper_cron.sh
#!/bin/bash
# 手工把變數輸出,應該只是要 USER 這個變數而已...
SHELL=/bin/bash
USER=epaper
MAIL=/var/mail/epaper
PATH=/home/epaper/bin:/usr/local/bin:/usr/bin:/bin:/usr/games
PWD=/home/epaper
LANG=zh_TW.UTF-8
HOME=/home/epaper
LANGUAGE=zh_TW:zh
LOGNAME=epaper
export SHELL
export USER
export MAIL
export PATH
export PWD
export LANG
export HOME
export LANGUAGE
export LOGNAME
/home/epaper/bin/phplist -p processbounces
/home/epaper/bin/phplist -p processqueue

* 排成改了變成這樣
epaper@www:~$ crontab -e
m h dom mon dow command
*/5 * * * * /home/epaper/epaper_cron.sh >> /home/epaper/epaper_cron.log
* 然後就一切正常了, 可以到 /home/epaper/epaper_cron.log 看系統產生的 log


* 另外系統為了避免你一直 try 錯誤的信箱,於是有個文件 README.bounces 可以設定當遇到多少次退信後就不再嘗試寄信了。
In the admin pages, you can now load the bounces in the PHPlist database. Some bounces are not
always really bounces, but they can be "Message delayed" or "Out of Office" messages. Therefore
PHPlist will not immediately unsubscribe a user when a message has bounces, but it will determine
a treshold of messages which will identify a bounce.

You set the threshold with the variable

$bounce_unsubscribe_treshold = 3;

This variable will be used to returns of normal messages. If "systemmessages" return, a user will
be unsubscribed immediately. Unsubscribed means that their email will be marked unconfirmed, which
will cause the system to stop sending emails to this user.

In the future it will become possible to "probe" the unconfirmed emails with a renewed request for
confirmation, which will be dealt with seperately, most likely by simply deleting the user.

If a message to a user bounces, the threshold will be used to determine the previous number of
message that have bounced. A user will only be marked unconfirmed once a row of consecutive messages
as many as your threshold have occurred.

If you run in TEST mode, the emails in the bounce system will not be deleted from the mailbox. If you
have set TEST to 0, it will delete the emails it has dealt with, according to the settings

$bounce_mailbox_purge = 1;
and
$bounce_mailbox_purge_unprocessed = 1;

$bounce_mailbox_purge can be 1 or 0, and 1 means that messages that have been processed and identified
will be delete from the mailbox. $bounce_mailbox_purge_unprocessed can be 1 or 0 as well, and
1 means that also unprocessed messages, which are messages that could not be matched with a user in
the system, will be deleted. This is fairly safe, because you can still look at the messages
in PHPlist.
.

* 關於 bounces 的處理,需要建立一個帳號,來收取信件處理。設定檔一樣在 config.php 內
=========================================================================

Settings for handling bounces

=========================================================================

*/

# Message envelope. This is the email that system messages come from
# it is useful to make this one where you can process the bounces on
# you will probably get a X-Authentication-Warning in your message
# when using this with sendmail
# NOTE: this is *very* different from the From: line in a message
# to use this feature, uncomment the following line, and change the email address
# to some existing account on your system
# requires PHP version > "4.0.5" and "4.3.1+" without safe_mode
$message_envelope = 'listbounces@epaper.jangmt.com';

# Handling bounces. Check README.bounces for more info
# This can be 'pop' or 'mbox'
$bounce_protocol = 'pop';

# set this to 0, if you set up a cron to download bounces regularly by using the
# commandline option. If this is 0, users cannot run the page from the web
# frontend. Read README.commandline to find out how to set it up on the
# commandline
define ("MANUALLY_PROCESS_BOUNCES",1);

# when the protocol is pop, specify these three
$bounce_mailbox_host = 'epaper.jangmt.com';
$bounce_mailbox_user = 'listbounces';
$bounce_mailbox_password = '1234567890xxxxxx';

# the "port" is the remote port of the connection to retrieve the emails
# the default should be fine but if it doesn't work, you can try the second
# one. To do that, add a # before the first line and take off the one before the
# second line

$bounce_mailbox_port = "110/pop3/notls";
#$bounce_mailbox_port = "110/pop3";

# when the protocol is mbox specify this one
# it needs to be a local file in mbox format, accessible to your webserver user
$bounce_mailbox = '/var/spool/mail/listbounces';

# set this to 0 if you want to keep your messages in the mailbox. this is potentially
# a problem, because bounces will be counted multiple times, so only do this if you are
# testing things.
$bounce_mailbox_purge = 1;

# set this to 0 if you want to keep unprocessed messages in the mailbox. Unprocessed
# messages are messages that could not be matched with a user in the system
# messages are still downloaded into PHPlist, so it is safe to delete them from
# the mailbox and view them in PHPlist
$bounce_mailbox_purge_unprocessed = 1;

# how many bounces in a row need to have occurred for a user to be marked unconfirmed
$bounce_unsubscribe_threshold = 5;

* 關於批次處理信件的設定,在設定檔 epaper@www:~/public_html/lists/config$ vim config.php ,可以避免你發信太快被人一直退信或當成垃圾。
# batch processing
# if you are on a shared host, it will probably be appreciated if you don't send
# out loads of emails in one go. To do this, you can configure batch processing.
# Please note, the following two values can be overridden by your ISP by using
# a server wide configuration. So if you notice these values to be different
# in reality, that may be the case

# define the amount of emails you want to send per period. If 0, batch processing
# is disabled and messages are sent out as fast as possible
# define("MAILQUEUE_BATCH_SIZE",0);
define("MAILQUEUE_BATCH_SIZE",300);

# define the length of one batch processing period, in seconds (3600 is an hour)
# define("MAILQUEUE_BATCH_PERIOD",3600);
define("MAILQUEUE_BATCH_PERIOD",300);

2010/03/01

[網摘]-網管軟體

只討論 opensource 及免費的網管軟體,要錢的很多..但沒錢買....

php寫的網管軟體
http://www.jffnms.org/index.php

JFFNMS is a Network Management and Monitoring System designed to monitor a IP SNMP / Syslog / Tacacs+ Network. It can be used to monitor any standards compilant SNMP device, Server, Router, TCP port or anything you want, if you write a custom poller, we also provide some Cisco focused features.


企業等級的網管軟體
http://www.opennms.org
OpenNMS is the world's first enterprise grade network management platform developed under the open source model. It consists of a community supported open-source project as well as a commercial services, training, and support organization.
You should have read access to all content on this wiki, but you will need to register to add or edit pages, or upload files or images. OpenNMS is community supported, so you are welcome and encouraged to add content to this website. Your registration information will not be used outside of this wiki.


免費的 dude
http://www.mikrotik.com/thedude.php
The Dude network monitor is a new application by MikroTik which can dramatically improve the way you manage your network environment. It will automatically scan all devices within specified subnets, draw and layout a map of your networks, monitor services of your devices and alert you in case some service has problems.
The Dude demo system: Our RouterOS demo routers are viewable from within the Dude, install The Dude and connect to our Demo dude system with the Dude Secure connection to 159.148.147.209

Also available is the web version of the Dude interface

先這樣,有空再寫使用心得報告

2009/12/24

國碼及名稱的問題(ISO 3116)

引用自
http://www.csie.ntu.edu.tw/~piaip/pr138672.html



其實這個國碼的問題以存在很久了,從之前反應很激烈的Redhat Linux


taiwan 掛五星旗是比較激烈抗爭的一次,但現在也沒有好很多一樣放 ISO 3116


的名稱說明.


外國人一直搞不清楚 taiwan =\\= china


但是,425+1常常用iso_3166這份iso文件來欺騙國際社會.


對於這問題freebsd提出一份國際化的原則


http://www.freebsd.org/internal/i18n.html
這有參考 ibm 的文件
http://www-01.ibm.com/software/globalization/topics/writing/references.jsp
基本上台灣、香港、澳門等國家需要應應實際的狀況來
對於iso 3166 的規範做解釋。

其實是 iso 3166  是聯合國訂定的,但是訂定的時候根本沒有加入聯合國
一切都是 425+1 說了算,現在連入聯的申請都自我放棄了,那只能說投降輸一半嗎?
http://www.libertytimes.com.tw/2009/new/aug/17/today-t1.htm

如果政府在這樣下去,會一直越來越嚴重的。現在看國外的網頁,
幾乎都已經把 taiwan == china 劃上等號. 但國外大多數的時,並不清處
taiwna 和 china 之間的歷史關係及定位。目前政府不自救,只能靠民間
的力量在各社群及組織自救。

還好台灣的 IT 產業人才算多且還算有點規模,才不至於一直被吃豆腐,

還沒有反應。但吃就了就會被強姦了!!!  到時  震怒也沒用了!!





2009/12/22

原碼3路 - Unix Like 的歷史,沒想到動新聞的作法也可以這樣用!!!!

剛剛從這裡看到的,自由軟體的簡史(也是unix的發展史),太棒了!用看得比用讀得有趣多了....
動新聞的方法作成的故事....哈哈..!!
一共有六個影片,但是排得很亂,和unix的版本一樣亂......
http://popblog.tvbs.com.tw/blog/os3ways/


序:灰燼中的珍珠-UNIX



影響世界深遠的UNIX作業系統,從失敗的Multics計畫意外誕生
Multics最後不了了之,但是在這灰燼之中
竟然還埋藏著一顆璀璨的珍珠...UNIX

mtchang:我想Multics應該是K & R 電動沒有打爽,所以才沒寫出來。這兩個可說是IT界的第一對宅男



原碼3路_2/5 : 點石成金的柏克萊-BSD (1/2)







這裡出現第2個Unix電腦界的宅男,Bill Joy 由於他的功力實在太強大了,所以
BSD 的第一版就是他寫出來的。他同時也是 TCP/IPviNFSC shell 的開發者
這篇應該是崇拜文巴!! http://www.ctuaa-sc.com/articles/art022.htm
後來他被邀請加入創立了 Sun 公司,股票上市後,賣掉股票買了法拉利.....

原碼3路_2/5 : 點石成金的柏克萊-BSD (2/2)


在那個硬體值錢,軟體不值錢的年代,UNIX得以在UC Berkeley渡過了一段歡樂時光
校園內與校園外,UNIX的原始碼到處流傳,吸引了當時許多學生與教授對『資訊』
這項『前衛』的新知識的探索與開發,在1984年之前,
在Green法官宣判AT&T再次分割之前那真的是段屬於UNIX的最美好時光...


原碼3路_3/5 : 用革命存活社群-GNU (1/2)





原碼3路_3/5 : 用革命存活社群-GNU (2/2)


除了UC Berkeley之外,MIT也自行開築了一條通往自由軟體的道路。

為了延續MIT社群開發軟體的傳統,Richard Stallman決定掀起一場軟體使用方式的革命
革命- 以『自由軟體宣言』為最高理想,重新設計一套免費的作業系統為初期目標
以自由軟體基金會(FSF)為革命基地,過程中以Copyleft對抗Copyright
以GPL對抗一切授權條約,直到遇見Linux 初期目標總算達成



Richard Stallman 真的花了很大的心力來完成這GNU的計畫
http://zh.wikipedia.org/zh-tw/理查德·斯托曼
沒有他,就沒有Linux,他如果沒有走這條路應該很早就是大富翁了!!!


原碼3路_4/5 : 最後的聖杯-Linux


經過了6年的努力,GNU計畫在北歐的芬蘭找到了最後的聖杯...Linux
在i386上普遍使用UNIX架構作業系統的夢,Richard Stallman與Linus Torvalds共同完成了...


Linus Torvalds 單純的只是因為好玩所以才寫了一個核心,只是就真的時間運氣好
搭上網際網路的順風車,及PC的發展,才得以發揚光大....
http://en.wikipedia.org/wiki/Linus_Torvalds 這也是另一個強大的宅男,
動畫配音配的更是貼切呀!!

看完之後終於了解,為何在我大學時代玩BSD的人口比Linux多,
但是後來BSD就漸漸消失了....

最後就是進入 GNU/Linux 百家爭鳴的時代了......

Linux 選擇器....很好玩的

http://www.zegeniestudios.net/ldc/

2009/12/14

微軟的仿冒行為,plurk 提出嚴重的聲明, 那麼有錢的公司還抄的那麼明顯

今天的消息...
http://blog.plurk.com/2009/12/14/microsoft-rips-plurk/

基本上425+1的MSN聚酷 ,在開通的時候就被台灣這邊發現他門是抄襲的
http://club.msn.cn/
但是通常以為只是界面上的抄襲而已,但是經過 plurk 專業的開發人員比對程式碼後,
發現他門根本是豪不遮掩的抄襲,連變數名稱及函數名稱都沒有更動
他說是台灣plurk的網友去通風報信的,是的沒錯....基本上台灣和 425+1  還是敵對的狀態
所以通風報信也是理所當然。

基於 M$ 這麼有錢的公司,還做出這樣的行為果然真的有在地化!!!!(山寨化)
底下是節錄此聲明的部份圖片....我想不懂程式的人也應該看得懂巴!!!










其實,他也不是第一幹這檔事了...最近還有 Windows 7 USB/DVD Download Tool (WUDT) 引用 Opensource code GPL授權,但是微軟並沒有講,直到被抓包了才趕快下架。


好了!!不能再說了......

2009/12/12

GCompris 應用的真實案例--我的2.5歲女兒

來自於 wekey 的介紹
http://wekey.westart.tw/Wekey-wiki
GCompris簡介
GCompris是一套用於年齡介於2 -10的兒童的學習啟蒙軟體,
該軟體是以在遊戲中學習的思路開發,由許多針對不同目的而設計的小遊戲所組成,
是專為兒童所設計的教育自由軟體。這個軟體化分不同的類別(如電腦,數學,遊戲),
其功能從算數到邏輯非常廣泛。其中有很多不同的任務。兒童在這些任務的過程中能夠拓寬他的知識面,
而這軟體有許多任務都有實際用途,例如在一個雜貨店裡何如花錢等等。 該軟體界面友好,
有很多卡通的圖標,非常適合這一目標年齡階層使用。雖然這套軟件還處於發展階段,
但它目前已經包含約80個練習。
http://gcompris.net/

但是說了那麼多,都沒有人真的用在小孩上面。我就拿我的女兒作測試,我女兒剛好 2歲半
英文字看得懂滑鼠剛會用,點滑鼠的功能也才剛剛學會。透過這軟體我開啟了字母練習,
基本上第一關字母掉下來的時候
只要加漲在旁邊稍加指導,他就可以很快的找到鍵盤的位置,並且按下他。
另外一個是移動滑鼠把畫面上的霧面去除,大概連了幾十張圖片後就學會了滑鼠的移動
最後,我乾脆讓他玩滑鼠移動及點選滑鼠右鍵的連連看遊戲,沒想到....
還就真的很順利的在玩了...而且玩得比一般的老人家學電腦的程度還來的好。