Wednesday, October 31, 2007

VPS Hosting

I gave up Budget Dedicated at the end, I emailed them last Friday but I didn't get their reply until this Tuesday.   Apparently they don't work over the weekend.    I was considering a tiny plan of 64MB RAM and 1GB storage for euro 12.04/month.    Also PayPal was the only payment method that I don't like.

Today I also sent off enquiry to KnownHost.    Review on them is quite good and price wise they are also attractive but too bad they came back few hours later saying that CentOS is the only choice I have.

Next one down the line is VPSlink which I also sent off an email to.    Let's see how they come back.

Blogged with Flock

Tuesday, October 30, 2007

Leopard upgrade

I did the upgrade not a clean install. I was hoping to try the out of beta BootCamp so I tried it last night.

I tell people to read manual first for everything they do but I don't follow my own instruction. I should have read the manual first.

I tried that with my genuine OEM version of XP Pro which isn't SP2. BootCamp doesn't allow that but I went ahead regardless. It wasn't OK.

That forced me to reinstall OSX which I found to be better. After the upgrade the startup screen changed, the Apple logo has gone and for some reasons the boot up took longer (I didn't time it with stop watch).

The Apple logo returns during boot up after the clean install with the revolving wheel which I prefer. A clean install also has the new Safari.

I may try installing XP again but I think it'll be hard to buy XP Pro with SP2 now from shops!

PS: the fastest Vista notebook ever is a Mac

Friday, October 26, 2007

Day 5 - Slicehost reservation

I think I'm nearly ready to run my own show so I checked my position in the slicehost queue.    Sadly it showed 3 weeks after 3 weeks of waiting, how disappointing. Even worse after reading comments to this entry in their blog.

Today I got email reminder from Budget Dedicated that I should be making up my mind soon.   I currently is playing with a 64Mb memory 1G slice there perhaps I'll pay for a month.

Other choices are VPSlink and xenEurope.

Thursday, October 25, 2007

Securing Apache

Apache is perhaps difficult and complicated to tweak so first of all I'll learn how to secure it.

In ubuntu I'll have to tweak the file /etc/apache2/sites-enabled/000-default/. To disable display or disallow browsing of folders if I don't have a index.html file there I need Options -indexes. However Habari requires that FollowSymLinks is allowed while WP doesn't need this, don't know why.

If I don't allow access to files other than those saved in the site folders then I need below between [Directory /] and [/Directory]

Order Deny,Allow
Deny from all
Options None
AllowOverride None

I have used XAMPP for years on PC there are things that I got to learn now when apache is running in a server.

Once new settings are entered I could check syntax by apache2ctl configtest before restarting apache by apache2ctl graceful

Day 4

Now I got

Starting "Shorewall firewall": done.

Bingo, it's working although I have yet to understand exactly what each setting I entered was about. The last problem was probably due to a typo.


I did a tracert in Windows to slicehost here is what I found about the route it has taken

Internal routers of office network
ISP in Hong Kong
Hong Kong IX, I think but not sure
Net Jersey, Morristown
Florida, Lake Mary
Maryland, Silver Spring
Massachusetts, Boston
Illinois, Chicago
Missouri, St Louis

Pinging the site I got 287-310 ms. Pinging BudgetDedicated I got 379-398 ms.

Surprisingly although BudgetDedicated is in Europe the trip goes first to the same location after leaving Hong Kong at then it traveled to other places like

Los Angeles
San Jose
New York

All the nodes are managed by Level3 by the way.

Do I want round the world trip every time I log into my server?

Wednesday, October 24, 2007

Day 3

Got error when starting by /etc/init.d/shorewall start

The error is not done (check /var/log/shorewall-init.log) so I went in to have a look. The part that was causing trouble

validating policy file ... ERROR: Undefined zone LAST

Hmm.....I'll look that up tomorrow.


My friend Tinyau recommends Shorewall or shoreline firewall, this would be a good start for me.

This is a tutorial at Debianhelp on the installation and setting of it. A more relevant tutorial is here and there for those who are running a Xen VPS.

I have yet to check which OS version I'm running by uname -a

Day 2

Pretty comfortable at command line now but still a lot to learn. I could type pretty fast that is helping.

Yesterday I wrongly checked out the 'trunk' folder in the folder I want set up for WP. This checkout command here isn't quite correct. So I learnt how to remove the entire wrong folder with content in it. I used rm -rf to get rid of the entire folder with subfolders and content.

Last night I have phpmyadmin working as well then I created a database for my trial Habari install. The checkout command from Habari wiki is a lot better the 'dot' at the end makes the difference.

I haven't done one fresh install for months so it was nice to see improvement at it. The Ajax thing stopped me and I had to amend the apache2 conf file to make it work.

BTW, the chmod g+w suggested in wiki didn't work I have to make it '777' to complete the install.

Monday, October 22, 2007

Day 1

I got my 7 days trial from Budget Dedicated, here is what I did today

Login to root using ssh then change password by passwd root.

Update the ubuntu pre-installed apt-get update.

Install php5

apt-get install php5-cgi php5-mysql php5-xcache


apt-get install php5 libapache2-mod-php5

Tried installing nginx but failed

Install mysql server

apt-get install mysql-server mysql-client php5-mysql

Install Apache 2 apt-get install apache2, enabled mod_rewrite by a2enmod rewrite then force-reload apache by /etc/init.d/apache2 force-reload

Install subversion by apt-get install subversion

Install phpmyadmin apt-get install phpmyadmin

Install nano apt-get install nano

Do this

df -h to see disk usage got

size used avail used%
1010M 587M 373M 62%

Add this line Include /etc/phpmyadmin/apache.conf to file /etc/apache2/apache2.conf using nano then restart apache /etc/init.d/apache2 restart

Oops! Couldn't run phpmyadmin in broswer? OK used alternatives by mysql command line. Entered below to create a database for my trial WP install.

CREATE DATABASE databasename;
GRANT ALL PRIVILEGES ON databasename.* TO "wordpressusername"@"hostname" IDENTIFIED BY "password";

Currently I don't have a domain name ready for this so I used just ip for "hostname".

Created mkdir wp under /var/www/ checked out svn copy of WordPress by entering svn co . To get files into the right place it is important that I have cd to that new folder before checking out the files.

After that I changed root folder to /var/www/wp/ such that I could run install at http://my.trial.ip.address/wp-admin/install. I have my WP running at last.

Next I'll try securing my server.

PS: I'm waiting for my slice from SliceHost which is a 256slice plan with 256M RAM, 10G storage and 100G traffic for $20. For nearly the same (except 200G traffic) I'll have to spend Euro 40.01 per month.

Sunday, October 21, 2007

Old fashion school

One school we went last week has stood out from the rest we have seen so far. Their way of organizing interview was traditional, old fashion and unbelievable in 21st century.

We waited in the hall which was OK then a group of 3 were taken to a room where the kids could spend 10 minutes playing with some toys. Then kid was taken to the headmaster's room just next door with parents outside.

My boy didn't perform, he nearly fell a sleep on the sofa. My boy was asked to sing a song and to tell what words he could write! Lucky that he refused to perform!

While waiting I noticed in that waiting room there were some computing equipment stored. Those things were like museum collections. A Compaq notebook of nearly 4 inches thick! Perhaps they use those for a class about history of computing.

Among all others that we are bidding for this one demands for lowest tuition fee, no wonder!

Friday, October 19, 2007


Engine x or nginx is written by Igor Sysoev.    So instead of LAMP you could replace the 'A' with this 'E'.

nginx is light weight so you could run this in a cheap VPS with as little as 48Mb of RAM such as x|encon server.

This is a good Howto for installing a LEMP.

Thursday, October 18, 2007


In addition to C.R.T. that I mentioned earlier one other term I use almost everyday is D.A.M.N.

D - Stands for Design. Depending on what you do this could be a brief from your client, a description of your goal which you have developed into fine details, a menu with recipes for the big dinner that you have to cook for a big party tonight. What you have to know is understanding the goal and develop it into fine details that you will follow to achieve your goal. This 'D' comes first because you normally start from here. If you are leading a team this is where you start such that your team-mates know what to do, where to help and how to act.

A - is Access. Normally you'll have to gain access to the venue where you'll perform your duties or deliver your performance. This is easily understood if you are building something. If you a pianist you'll have to know how to get to the concert hall and if you'll be given permission to rehearse there, for example. Gaining access may involve contractual issues in many cases.

M - stands for material. This is what you need to put your goods together, e.g. something that you have to acquire apart from your own skills. If you are a chef you have to know where to buy good food for the dinner that you are delivering. If 'D' is done properly you'll know what to buy.

N - notification is very often ignored. In most cases we are not achieving goals alone. We have partners, colleagues, external helpers, vendors etc to collaborate with to get something done. These people/organizations around us have to be suitably coordinated and notified to get things going smoothly.

I do engineering projects so I call up D.A.M.N. every time I want to think about what are missing from my plans to get something done. Even for very experienced manager minor things could skip our minds or fell off the lorry, this little D.A.M.N. thing could come to rescue.

Wednesday, October 17, 2007

Netscape is back

Just downloaded latest version 9 for Mac, it's GUI is very Firefox alike so it's very easy to use.    It runs at fast as FF and probably faster than Safari.

The great thing is that FF's extensions are all good for Nevigator.    This post is sent from ScribeFire extension.

I'll certainly try this on Windows and Linux platform later.

Tuesday, October 16, 2007

Desktop for ??nix

My first experience was GNOME because this comes as default in ubuntu.

Just learnt that there are in fact a lot more for me to try such as Fluxbox, Xfce and KDE.

My PC failed

My DIY PC running Vista failed last week. This PC is only few months old using ASUS P5B motherboard running genuine Vista Ultimate. I picked an optional update for the Attansic onboard Gigabit ethernet driver upon restarting it failed to work. I tried everything I know such as roll back driver, safe mode, restore to last known good configuration etc....

I had to reinstall Vista and ended up using an old Realtek ethernet card to get back to work.

As usual to protect my installation I blindly went through downloading and installing all critical updates for Vista and my Office 2003.

One of the upgrade I did which I regretted now is SP3 of Office 2003.   This upgrade contains a new feature called Information Rights Management or IRM.   The idea is good in that forwarded emails are restricted unless recipient is authorized to view or forward it.    You could even set expiry date of forwarded email.

The trouble is unless our exchange server is running 2003 version and senders are also using this feature this is completely useless.    I'm now unable to read forwarded emails unless I roll back to SP2, dumb isn't it.

There is a fix here, i.e. get an add-on for your IE to read IRMed document, dumb.

Monday, October 15, 2007

2 more to go

Last Saturday we went to 2 interviews in one morning. We had a little breathing space in between them so we went to the beach just down the road from the school. We saw a few kids fully prepared to spend time at the beach right after the interview. I envy those who could spend their childhood in a spacious school. You'll get a lot more fun with classmates since kids are not confined to just 4 concrete walls. Today a spacious school is certainly a luxury here.

Tomorrow there'll be another interview then one more to go it'll be all done. A few of them will have second round, which is mainly for the parents, if we are lucky enough.

Thursday, October 11, 2007

ezCount Plugin

One of the component of this plugin doesn't work at this 2.4 svn revision. The error is no such database table wp_categories. It's very simple like this

$s = "SELECT COUNT(*) FROM $wpdb->categories";
return $wpdb->get_var($s);

This works for many other things such as comments and pingback etc, don't know why I get database prefix 'wp_' added to 'categories' table. Also I don't see anything new from Codex here for this.

As of now that function of this plugin has been taken away, search goes on!

Wednesday, October 10, 2007

One down five to go

Just received confirmation from one of the schools that my boy has been accepted. I'll have to pay to reserve the place before end of the month.

There are few more interviews for us to go during the next week or so. This is quite tiring but I don't have a choice just hoping that these lessons are good for my boy.

Tuesday, October 9, 2007

Tag Cloud

Now that I'm not using the great UTW I still want a tag cloud.

This is done by [?php wp_tag_cloud(); ?] for this version of WP. The reference in codex is here. I have yet to find out how to set up things like font size and colors etc. Apparently setting your desired font size is OK but not colors yet.

What about showing tags at end of each post? Just add this line

echo (get_the_tag_list('Tagged as: ',', ','.'));

or simply

the_tags('Tags:', ', ', '[br /]');

between php tags. The reference is here.

Saturday, October 6, 2007

Upload file at command line

This can be done using SCP of SSH, example is like

scp -2 /path/of_your/filename.txt

See how to use other switches here.

You'll be prompted to enter password of course as switch '-2' is for secured protocol.

Thursday, October 4, 2007

GNOME’s new desktop

Saw the new 2.2 desktop or GDM here, why am I not having this update yet?

I think it must be good looking but I'll first have to fix my display card in order to enjoy it in my 19" widescreen.

Wednesday, October 3, 2007

Hold my slice

I can't learn without taking risks. Today I clicked the 'hold my slice' button of Slicehost. I probably will have to wait for 4 weeks in the mean time I'll have sufficient time to read their tutorials and learn how to tweak my own server. If it doesn't work I'll have no support to shout at it'll be all down to me.

Installing Ubuntu is sort of preparatory learning, a first taste of linux, before I enter the world of command line without GUI.

I'm quite comfortable now using ubuntu desktop at home. I plan to get a cheap video card to suit my 19" widescreen at home. When I have my slice it'll be convenient that I see tutorial on my MacBook and SSH my server to do setup.

Tuesday, October 2, 2007

Primary School allocation

This is commonly known here as lottery.

You have to be very lucky to get a place if you are not 'connected' to the school you want to send your kids. This system is perhaps unique in the World.

I dropped the form in the system this morning and I'll be looking forward to the lottery result from this school in late November.

Monday, October 1, 2007

Add users to SMB

Adding users to SMB is like

smbpasswd -a newusername

then you'll see prompt of

New SMB password:
Retype new SMB password:

Oops, you'll probably get Failed to modify password entry for user newusername It's not that simple. What I have to do is adding users to ubuntu first by going to system>administration>users and groups. Adding user there then you'll be able to set user and password to SMB server at command line. When you see Added user newusername then you are done.

Now SMB has to sync password with that set in Linux then you'll have to uncomment that line unix password sync = yes and encrypt passwords = true by removing the semi-colon at the start of those lines.

It's a safe bet that you restart SMB server by

/etc/init.d/samba restart

It's all OK sharing folders to my MacBook I still couldn't login shared folder from my Toshiba R100, investigation goes on. is now OK.

Secure Shell server

I need SSH to enable access from a remote PC. I need to install SSH from command line.

apt-get install ssh

The suggested package is openssh-server ssh

Then I tried logging into root from my MacBook by typing this at terminal


It was all OK and I found my way into the habari and wordpress folders of the LAMP server without any problems.

Sharing folders across network

Next I need to learn is to share folders in ubuntu such that I could copy/edit files from other PC over intranet. I tested this from my MacBook at home.

When I clicked sharing folders I have a choice of UNIX or Windows file system I picked Windows naturally. Samba, SMB, was installed automatically. I couldn't access shared folder from MacBook because I was asked to enter password which I wasn't asked to set when I shared the folder!?

Since SMB (which stands for Server Messsage Block) is a server for Linux therefore it has its own user and password system. The easiest way would be to edit smb.conf file under /etc/samba/. At around line 91 change 'security = user' to 'security = share'. Don't forget to remove ; (semi-colon) at the start of the line.

Of course it's better to have access control when sharing folders more reading to do here.

Last tender and first interview

Last week I submitted last tender to this school for my boy. I submitted total of 6.

Last Saturday was also the first interview that my boy went to. It was a nice warm up and good experience for parents as well. We arrived there an hour too early but we were greeted into school where we found lots of kids were there playing in the playground.

We have a guided tour in the school, attended a talk by the headmaster, and eventually we were served lunch there. The school is one of the very few in town that is equipped with its own kitchen. My boy didn't even want to leave as he was having fun.