Zhixian's Tech Blog

2015-11-02

Minix3 Basic Post Installation Setup

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

Summary

  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

image

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.

image

In my case, my country Singapore is located in Asia

image

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

image

This will take effect when I log in again.

 

Set hostname

The default hostname can be rather non-descriptive.

image

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

image

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:

image

Reference

http://wiki.minix3.org/doku.php?id=usersguide:postinstallation

Advertisements

2015-10-30

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.

GRUB_GFXMODE=1152x864x32

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

Reference

http://askubuntu.com/questions/456527/maximum-terminal-resolution-in-ubuntu-server-virtual-box-guest

hellorails

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 0.0.0.0. This can be done by running:

$ rails server -b 0.0.0.0

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

Reference

http://guides.rubyonrails.org/initialization.html

Installing Ruby

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

Installation

$ 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

Reference

https://help.ubuntu.com/community/RubyOnRails

Installing FTP server

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

Installation

$ sudo apt-get install vsftpd

Configuration

Edit the configuration file /etc/vsftpd.conf

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

write_enable=YES

Uncomment this line to limited to their home directories:

chroot_local_user=YES

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

allow_writeable_chroot=YES

Restart server

$ sudo restart vsftpd

Reference

https://help.ubuntu.com/lts/serverguide/ftp-server.html

https://www.benscobie.com/fixing-500-oops-vsftpd-refusing-to-run-with-writable-root-inside-chroot/#comment-2051

Installing Git

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

Installation

$ sudo apt-get install git

Basic Setup

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

Reference(s)

https://help.ubuntu.com/lts/serverguide/git.html

2013-06-16

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.

Sample-screen

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.

Navigation-bar

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

    https://skydrive.live.com/p.mvc#!/cid-xxxxxxxxxxxxxxxx/GroupOptions/DeleteGroup

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

image

  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.

image

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

image

2011-06-13

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.

2010-07-03

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:
/var/www

The default installation directory is:
/etc/apache2

The main Apache server configuration file is located at:
/etc/apache2/apache2.conf

Create a free website or blog at WordPress.com.