2012年8月25日星期六

我的见证



什么是基督徒?是不是嘴边挂着"我是基督徒"就等于是!你或者是个“礼拜徒”或者是抱着宁可信其有的态度,而从来没有思考过有没有过着真正基督徒该有的生活。真正的基督徒要活着要有基督的影子,死了方可进入基督的国度。真正的基督徒可以不畏惧死亡,因为他们知道死后必能进入神的国度,而死亡不是结束,乃是新的开始。
以前底的我觉得只要承认自己是个基督徒,就能得救,得到祝福。所以常常给自己很多理由远离了教会,甚至一年才去一次教堂,那就是农历新年随着家人去崇拜,可是我错了!过去的我生活过的并不开心。即使这样上帝并没有因为这样远离我,当我非常疲惫、沮丧的时侯我向上帝祈求,他给了我很明确的指示,为什么说"明确"的指示呢?这要从我在新加坡工作了八年后说起。
一年前,我下定决心辞掉工作回来诗巫找工,看是否能找到一份工作让我可以养家糊口,心想如果诗巫没找到就去外地如民都鲁,美里,甚至西马,澳洲,甚至再回到新加坡。但是上帝已经听见了我的祈祷,祂早已按排了一份工作给我,据我现在的同事说我这个职位以经招聘了一个多月既然都没有适合的人选,而我去应征不久就收到受聘通知,似乎在等我回来去应征,很明确的上帝为我留了一份工作。而我进工司不久就遇到一位不同部门的高层在一个非常偶然而且崎岖”的情况下对我传福音,为什么"崎岖"?那是因为在一次我乘坐他的车前往油棕园在凹凸不平的油棕院路上对我传福音。这又是一次上帝明确的按排了他的仆人向我招手。经过他的邀请和我一翻的内心挣扎,终于参加了英文查经班。对!我连中文的圣经都看不懂既然要参加英文的查经班。在这次的查经中我读了这一生中读的第一本英文的宣教书——Trust God ! Even life hurts 书的内容就和书名一样,通过这本书的话告诉我们无论在什么情况下都要信靠主——“坚信”。这本书也影响和陪伴我度过了我之后的一段刻骨铭心的日子,那就是我小孩的生日,我老婆的受难日。
记得当天我老婆生产当天经历了一天的痛苦后仍然无法诞下宝宝,唯有动手术取出宝宝,经过一整天的折腾以为黎明终于来临,谁知道等待我们的竟然是一次又一次的考验,在手术后,老婆出现麻醉剂过敏,全身颤抖,呕吐的现象。而就在我极力的安抚和照顾的时候,儿科医生突然要求见我,告诉我宝宝呼吸急促,须要转送诗巫中央医院治疗,不然就有生命危险。生平坐过两次救伤车,一次是自己车祸,第二次是陪伴这女儿转送到中央医院。这时明白无论你是家财万贯还是高官达贵,当你面临灾难或病痛时你和别人没两样,都要面对生老病死,而且都是无助的。正当我彷徨无助的时间,我想起了我的信仰,我再次的祈求神给我希望,求神医治我的太太和女儿,甚至传简讯给我的朋友,要求他们为我的两位至亲的人祷告,因为这时的我已经分身乏术,一个在中央医院,另一个在诗巫专课医疗中心,而这时我太太跟本不知道女儿以经出事,或者说她麻醉药清醒过后,发现我和女儿都不在身边却不懂发生什么事一样会心乱如麻。而我在中央医院像热锅上的蚂蚁一样,着急的等待医生的急救,直到医生告诉我怀疑宝宝肺部受到细菌感染发炎,减称肺炎,已经输入抗生素,虽然情况还不稳定,但已无生命危险,我才离开医院回到我太太身边,再将宝宝的病情告诉她,这一切都在这几小时里发生心脏稍有问题的可能会晕倒。
之后我又回到中央医院,等待X光报告,等待的当时只能望着女儿躺在病床上,嘴巴插着氧气管,呼吸还是一样的急促,旁边的仪器不时就发出警惕音,心里的痛更是无法形容,直到临晨报告终于出了,证实和医生预测的一样肺部收到细菌感染,我才离开回到太太身边,这时的我以经身心力揭,开车时几度都不知不觉闭上了眼睛,睁开眼时都险象环生,回想当时如果不是有上帝的保佑,可能我也要去医院住几天了。回到诗巫专科医疗中心时,就在那沙发上咪了一下,因为又担心女儿就又回到中央医院看她,接下来的两天不是在太太身边照顾她就是到女儿身边和她说话,唱歌给她听,鼓励她,希望她能战胜病菌,快点康复。就这样来来回回医院过了两天,看到女儿时不懂哭过多少遍。
我记得当天是214情人节,我的太太终于可以出院了,她忍着伤口的痛回家,目的可想而知就是想见一见那从出世后两天都没见过的女儿,回到家安顿了后我们就出发到医院去,她忍着伤口的痛走到女儿身边,接下来的就是母女相遇感人热泪的画面,女儿是乎也感觉到母亲来了,张大了口要哭可是因为插管哭不出声音,这时我们的心都碎了。这个情人节是我过得最悲惨的一次,我最心爱的两个人都在受哭,而我却无能为力,而唯一能做的就是向上帝祈求给她们平安,健康。
女儿在深切治疗部待了五天,一下子说黄了,一下子说病情会越来越重,我们就这样被医生吓了五天,终于!医生说她可以转到普通病房观察。我的心好想从黑暗中看到了曙光,感谢上帝!转去普通病房的第一个星期天,我去教堂崇拜,又一次明确的提醒我,祂与我们同在,为什么呢?因为当天是“主日学崇拜”,而我从医院赶到教堂时已经迟到了,主日学的小朋友正在台上唱歌,正巧的是,当我踏进教堂当儿,他们正在唱这我过去几天唱给我女儿听的歌,祂又一次明确的告诉我祂有在听我们的祷告,我在幻想有一天我的女儿也会在台上唱着这首歌给我听。当时的我非常感动,泪也不知不觉的流下,我们的相信的神是何等伟大啊!
接下来的日子,女儿和太太仍然在医院,我每天都无时无刻的为他们祷告,无论是吃饭,睡前,休息时都祷告恳求上帝也能保佑我太太,女儿能够有足够的营养快高长大,有足够的抵抗力抵抗细菌,赐给她们健康、快乐,就这样一日复一日,在医院里又待了两个星期多,加上女儿在深切治疗部的五天总共是三个星期多,终于他们可以出院了!虽然回到家中都还是继续用氧气辅助她呼吸,一切都是步步为营,小心亦亦的照顾着她。女儿之后又被症断出有其它问题,当然解决的方法就是一链串的药物治疗和不人道的检查,宝宝在受尽了苦之后。
终于在宝宝4个月大后,上帝给了我们奖励,宝宝的报告诊断已没什么大碍,只须每年检查一次就好了,而且医生告诉我们宝宝的肺有慢慢好转,相信宝宝坚强的熬过了一切的苦难,等待着她就是曙光。“天之降大任于斯也,必劳其胫骨,伤其脾肺”我靠着这句名言和“坚信”这两个字度过一切的难关,而我相信祂会陪伴我们度过一切的苦难,而祂也从来没让我失望。
回想这一切如果发生在新加坡,医药费将会是过万新币!而不是137零吉!要不是回到诗巫,更没亲戚朋友的帮忙和鼓励,要不是上帝安排了他的仆人向我招手,我应该会不知所措,更可能是到处求神问佛,后果更是不堪设想。祂是世界的主宰、权柄、荣耀、道路、真理、生命、唯有信祂方能到父那里去。

2012年8月6日星期一

PHP Virtualbox


This guide explains how you can run virtual machines with VirtualBox 4.1 on a headless Ubuntu 12.04 server. Normally you use the VirtualBox GUI to manage your virtual machines, but a server does not have a desktop environment. Fortunately, VirtualBox comes with a tool called VBoxHeadless that allows you to connect to the virtual machines over a remote desktop connection, so there's no need for the VirtualBox GUI.

I do not issue any guarantee that this will work for you!

1 Preliminary Note
I have tested this on an Ubuntu 12.04 server (host system) with the IP address 192.168.0.100 where I'm logged in as a normal user (user name administrator in this example) instead of as root.

2 Installing VirtualBox
To install VirtualBox 4.1 on our Ubuntu 12.04 server, we open /etc/apt/sources.list...

sudo vi /etc/apt/sources.list

... and add the following line to it:

[...]
deb http://download.virtualbox.org/virtualbox/debian precise contrib

Then we download the VirtualBox public key...

wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -

... and update our package database:

sudo apt-get update

Afterwards, we install VirtualBox 4.1 as follows:

sudo apt-get install linux-headers-$(uname -r) build-essential virtualbox-4.1 dkms

(The dkms package ensures that the VirtualBox host kernel modules are properly updated if the Linux kernel version changes.)

Starting with version 4.0, VirtualBox has introduced so called "extension packs" and has outsourced some functionality like remote desktop connection support (VRDP) that was part of VirtualBox packages before version 4.0 into these extension packs. Because we need remote desktop connections to control our virtual machines, we need to install the appropriate extension pack now. Go to http://www.virtualbox.org/wiki/Downloads, and you will find a link to the following extension pack:

VirtualBox 4.1.18 Oracle VM VirtualBox Extension Pack
Support for USB 2.0 devices, VirtualBox RDP and PXE boot for Intel cards.

Download and install the extension pack as follows:

cd /tmp
wget http://download.virtualbox.org/virtualbox/4.1.18/Oracle_VM_VirtualBox_Extension_Pack-4.1.18-78361.vbox-extpack
sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.1.18-78361.vbox-extpack

(Make sure you grab the latest version from the VirtualBox web site.)

(Make sure you run the last command with sudo - sudo VBoxManage extpack install ... - because otherwise you will get an error like this:

administrator@server1:/tmp$ VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-4.1.18-78361.vbox-extpack
0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to install "/tmp/Oracle_VM_VirtualBox_Extension_Pack-4.1.18-78361.vbox-extpack": The installer failed with exit code 127: Error creating textual authentication agent: Error opening current controlling terminal for the process (`/dev/tty'): No such device or address
administrator@server1:/tmp$
)

Now we must add the user that will run VirtualBox (administrator in this example) to the vboxusers group:

sudo adduser administrator vboxusers

VirtualBox is now installed and ready to be used.
Managing A Headless VirtualBox Installation With phpvirtualbox (Ubuntu 12.04)

1 Preliminary Note
I'm assuming that a headless VirtualBox is already installed on the local Ubuntu 12.04 server, e.g. as described in the tutorial VBoxHeadless - Running Virtual Machines With VirtualBox 4.1 On A Headless Ubuntu 12.04 Server.

I'm running all the steps in this tutorial with root privileges, so make sure you're logged in as root:

sudo su
  
2 Installing phpvirtualbox
First create a system user called vbox and add it to the vboxusers group:

useradd -m vbox -G vboxusers

Create a password for the vbox user:

passwd vbox

Create the file /etc/default/virtualbox and put the line VBOXWEB_USER=vbox in it (so that the VirtualBox SOAP API which is called vboxwebsrv runs as the user vbox):

vi /etc/default/virtualbox

VBOXWEB_USER=vbox
Next create the system startup links for vboxwebsrv and start it:

update-rc.d vboxweb-service defaults
/etc/init.d/vboxweb-service start

We need a web server with PHP support to serve phpvirtualbox - I'm using Apache2 here. Install Apache2 and PHP5 as follows:

apt-get install apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common apache2 apache2-doc apache2-suexec libapache2-mod-php5 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libapr1 php5-common php5-mysql php5-suhosin php-pear wget

Restart Apache2:

/etc/init.d/apache2 restart

I want to serve phpvirtualbox from Apache's default virtual host with the document root /var/www (I will install it in /var/www/phpvirtualbox) - if you have a different document root, you must adjust the following steps:

cd /var/www
wget http://phpvirtualbox.googlecode.com/files/phpvirtualbox-4.1-7.zip

Unzip phpvirtualbox and rename the phpvirtualbox-4.1-7 to phpvirtualbox for ease of use:

unzip phpvirtualbox-4.1-7.zip
mv phpvirtualbox-4.1-7 phpvirtualbox

Next go to the /var/www/phpvirtualbox/ directory...

cd /var/www/phpvirtualbox/

... and create the file config.php by copying it from config.php-example:

cp config.php-example config.php

Open config.php and fill in the password you created earlier for the vbox system user:

vi config.php

[...]
/* Username / Password for system user that runs VirtualBox */
var $username = 'vbox';
var $password = 'secret';
[...]

That's it already - you can now open a browser and access phpvirtualbox as follows:

http://www.example.com/phpvirtualbox/

The default username is admin, the password is admin as well:
  
This is how phpvirtualbox looks - much like the native VirtualBox GUI:
  
The first thing you should do is change the admin password. Go to File > Change Password:

Type in the old password and specify a new one:

If you know the native VirtualBox GUI, it's now very easy to use phpvirtualbox. For example, if you want to create a new virtual machine, you have the same wizard as you have in the VirtualBox GUI: