Setting up Linux PC

I am setting up a new ubuntu PC.

I will write down some notes on what I found particularly useful when setting up ubuntu 13.04.

1) apt.conf proxy setting

Almost all setup processes of ubuntu depend on the apt command, and it does not work in my network environment because of the university’s proxy server. So, I first need to do a proxy setting of apt. This was done by writing the /etc/apt/apt.conf file as below.

Acquire
{
 http
 {
   Proxy "http://nameofproxyserver:port";
 };
};

2) Japanese language support

To install Japanese language supports (e.g. Japanese input methods), I have to add Japanese ubuntu servers to the repository list, and update all packages. I just followed the instructions provided by ubuntu Japanese team.

$wget -q https://www.ubuntulinux.jp/ubuntu-ja-archive-keyring.gpg -O- | sudo apt-key add -
$wget -q https://www.ubuntulinux.jp/ubuntu-jp-ppa-keyring.gpg -O- | sudo apt-key add -

$sudo wget https://www.ubuntulinux.jp/sources.list.d/raring.list -O /etc/apt/sources.list.d/ubuntu-ja.list

$sudo apt-get update
$sudo apt-get upgrade

The first 2 lines do downloading key files for Japanese ubuntu repositories, and the 3rd line adds the list of repositories to source lists. Running apt-get update and upgrade install Japanese language supports.

3) ssh settings

I often use ssh connections to faster workstations to do computationally intensive analyses. The basic ssh command to connect to a server with a key file is,

ssh -i keyfile -p port username@host

The key file must not be read/modified by other users. Change its permission by chmod command before connecting.

chmod 600 keyfile

The ssh command above can be shortcut by writing a setting file ~/.ssh/config.

Host host

   HostName xxx.yyy.xxx.yyy

   Port xxxx

   IdentityFile path/keyfile

   User username

Now, you can connect to the server just by typing the alias.

ssh host
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s