Zhixian's Tech Blog


Minix3 Basic Post Installation Setup

Filed under: Uncategorized — Zhixian @ 17:00:11 pm


  1. Set password for root account
  2. Set timezone
  3. Set hostname


Set Password for root account

By default, there is no password assigned for the root account.
You can set a password for root account using the following command:

# passwd


Set timezone

Before you can set the timezone, you need to identify it using the computer standards.
Look at a file /usr/share/zoneinfo for a list of timezone.


In my case, my country Singapore is located in Asia


So my timezone is determined to be Asia/Singapore.
To set the timezone, enter the follow command:

# echo export TZ=Asia/Singapore > /etc/rc.timezone


This will take effect when I log in again.


Set hostname

The default hostname can be rather non-descriptive.


So you might want to change that.
So for example, I chose the hostname of rocket, I would enter the following command to set it:

# hostname rocket


Zhixian’s note: This change does not seem to persist after a reboot. Sad smile
Still exploring how to do this correctly.
The best solution I saw so far is from http://osdir.com/ml/minix3/2011-12/msg00072.html
It suggests putting your IP and host name into /etc/hosts file.
Here’s the excerpt pertaining to problem and suggested solution:image

In case you are wondering, here’s what my /etc/hosts file look like:






Installing Alpine

Filed under: Uncategorized — Zhixian @ 23:08:10 pm

I do not find the default “mail” program in Linux is not user-friendly.

Hence, I would suggest another console e-mail application.
Two applications come to mind, pine and elm.
I’m picking pine as I have slightly more familiarity with it and I think it is more user-friendly than elm.

Pine is a proprietary application owned by University of Washington. So I am picking to install the open-source version of this application call Alpine. To install Alpine type the following command:

$ sudo apt-get install alpine

After the installation has complete, type the following command to run it:

$ alpine

Changing Screen Resolution of Ubuntu on VirtualBox

Filed under: Uncategorized — Zhixian @ 23:08:10 pm

Identify the resolution that your VirtualBox environment supports.

Reboot the system and hit ‘c’ when the grub windows appears appears to access grub console. In grub console, enter the following command to see a list of resolutions (eg, 1024x768x32):

grub> vbeinfo

Edit the grub configuration file
/etc/default/grub. Uncomment the following line in the file.


Replace the resolution with the one appropriate for your environment.

Save the file. Then update your grub configuration by running:

$ update-grub

Restart your virtual machine again




Filed under: Uncategorized — Zhixian @ 23:06:10 pm

This blog is about creating a first Rails web application.
Before proceeding, you need to install sqlite.

Summary of Steps

  1. Install sqlite
  2. Install nodejs
  3. Create hellorails
  4. Running hellorails

Install sqlite

To install sqlite, run the follow commands:

$ sudo apt-get install sqlite3
$ sudo apt-get install libsqlite3-dev

Note: We have to install libsqlite3-dev because we want to use add sqlite support to Rails via gem.

After sqlite is installed, we can add sqlite support to Rails by running the following command.

$ sudo gem install sqlite3 -v '1.3.11'

Install nodejs

Rails do not a built-in web server. It relies on other infrastructure to run. Here, I decide to install nodejs as I am intending to do some other nodejs development later on as well.

$ sudo apt-get install nodejs
$ sudo apt-get install npm

Creating hellorails

After all the setup is done, we can start to create our hellorails application by running the following command:

sudo rails new ./hellorails

Running hellorails

After the application is created, navigate into the directory.
You can run the application by running the following command:

$ rails server

Note: This command will start a web server listening on localhost on port 3000. What this means, is that you can only access the web application on your local machine. To allow other machines to access the web application on port 3000, you need to make the web server listen to the IP address of This can be done by running:

$ rails server -b

An alternative to adding the parameter is edit boot.rb file in the config folder.



Installing Ruby

Filed under: Uncategorized — Zhixian @ 23:06:10 pm


$ sudo apt-get install ruby-full

This will install Ruby 1.9.3 as of this writing.

I want to do Ruby on Rails, I need to install Rails.
Rails however require “make” which is not installed out of the box.
So we need to install that first.

$ sudo apt-get install make

Apparently, it also require zlib development libraries.
You need to install it by running the following command:

$ sudo apt-get install zlib1g-dev

Before installing Rails, you may want to install the “rdoc” package.
If not, you may encounter the error message “file ‘lib’ not found”.

$ sudo gem install rdoc

After installation of “rdoc” package, you can install Rails using:

$ sudo gem install -V rails

Note: The “-V” parameter in the above command makes the installation process more verbose and may be omitted. If omitted, it may appear as if the process is hanged as there is not visible feedback on the installation process. The download and installation process itself takes quite a while.

Alternatively, you may want to run the following command to install Rails instead. This command will not install documentation for Rails which can take some time to generate (and hence misled you to think that the process has hanged).

$ gem install rails --no-ri --no-rdoc



Installing FTP server

Filed under: Uncategorized — Zhixian @ 23:05:10 pm


$ sudo apt-get install vsftpd


Edit the configuration file /etc/vsftpd.conf

Uncomment this line to allow users to be able to upload files:


Uncomment this line to limited to their home directories:


Add the following line to counter the message:
500 OOPS: vsftpd: refusing to run with writable root inside chroot()


Restart server

$ sudo restart vsftpd




Installing Git

Filed under: Uncategorized — Zhixian @ 23:00:10 pm


$ sudo apt-get install git

Basic Setup

$ git config --global user.email "you@example.com"
$ git config --global user.name "Your Name"




Removing a group in Skydrive

Filed under: Uncategorized — Tags: , , , — Zhixian @ 20:08:06 pm

One of the things that bugs me when using my Skydrive account is the inability to remove invalid groups. For example, see the below sample screen. Under the groups header there are 2 entries for the group “NCS”. The second entry is a valid entry. The first entry leads to a “This item might not exist or is no longer available” page.


I suspect the reason the invalid group cannot be removed is because of I have another entry with identical name. To remove such invalid groups, we need to navigate to the group options page of the invalid group.

  1. Click on the invalid entry to navigate to the “This item might not exist or is no longer available” page.
  2. On the url navigation bar, note the value for the “cid” query parameter. I will refer to this value xxxxxxxxxxxxxxxx henceforth.


  1. Navigate to the delete group options page with following url, replacing the xxxxxxxxxxxxxxxx with the cid noted in step 2.


  2. You should see a screen like the below. Click on the “Delete group” button to delete the invalid group entry.


  1. After you clicked on the “Delete group” button, you will get a confirmation prompt. Click on the “Yes” button to confirm deletion of the invalid group entry.


After the group is deleted, you should only see one entry under the groups header.



Hello world!

Filed under: Uncategorized — Zhixian @ 14:14:06 pm

Welcome to WordPress.com. After you read this, you should delete and write your own post, with a new title above. Or hit Add New on the left (of the admin dashboard) to start a fresh post.

Here are some suggestions for your first post.

  1. You can find new ideas for what to blog about by reading the Daily Post.
  2. Add PressThis to your browser. It creates a new blog post for you about any interesting  page you read on the web.
  3. Make some changes to this page, and then hit preview on the right. You can alway preview any post or edit you before you share it to the world.


Notes on Apache server

Filed under: computing, Uncategorized — Tags: , , — Zhixian @ 01:20:07 am

A few things to note for Apache server:

The default document root directory is:

The default installation directory is:

The main Apache server configuration file is located at:

Create a free website or blog at WordPress.com.