Manually installing JDK to ubuntu

sudo apt-get install fakeroot
sudo apt-get install java-packages

chmod +x {downloaded_file_name}.bin

fakeroot make-jpkg {downloaded_file_name}.bin

sudo dpkg -i {file_created_from above}.deb

sudo update-alternatives --config java

check the version:
java -version


#upgrading

  • install the newer version
  • remove the directory which the older version is stored
  • use update-alternatives to change the version to be used

Ubuntuデスクトップで英語環境利用時に日本語フォントをきれいに表示する

Ubuntu 8.04の日本語ローカライズド版をインストールしつつ、デスクトップ環境は英語を利用。単にsystem->preferences->appearanceのfontで設定するだけではうまく行かないのでとても困ってました。

fontconfig-voodoo -cと入力すると、'No config'というような返事が返ってきたので:

sudo fontconfig-voodoo -s ja_JP

と入力して再起動したら、appearanceで設定したとおりになりました。

http://forum.ubuntulinux.jp/viewtopic.php?pid=14288#p14288
(honeSONGさんありがとうございました)

apache2 virtual hostの設定方法

手順概要:
1. /etc/apache2/sites-available へファイルを追加
2. /etc/apache2/sites-enabled にsymlinkを追加
3. /etc/hosts に新サイトに関する情報を追加
4. apacheの再起動


1. /etc/apache2/sites-available へファイルを追加

このディレクトリに行き、新しくファイルを作る。ファイル名は新しいサイトのもの

sudo vi test.lh


ServerAdmin me@localhost
ServerAlias example.lh
DocumentRoot /usr/local/drupal5
#we want specific log file for this server
CustomLog /var/log/apache2/example.lh.log combined


Options FollowSymLinks
AllowOverride None


#enable symlink
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place

2. /etc/apache2/sites-enabled にsymlinkを追加

cd /etc/apache2/sites-enabled
sudo ln -s /etc/apache2/sites-available/example.lh

3. /etc/hosts に新サイトに関する情報を追加

127.0.0.1 localhost.localdomain localhost example.lh

4. apacheの再起動

sudo /etc/init.d/apache2 restart

SSH用の鍵生成、PuttyGenでの変換

ssh-keygen -t dsa
(パスワードあり・なし、どちらでも。。)
(default name)

これで.sshフォルダ内に公開鍵・秘密鍵の二つができた。

cd .ssh/

cp id_dsa.pub authorized_keys

これでid_dsaを使ってログインできる
(id_dsaはSFTPとかでローカルにダウンロード後、暗号化しておいたほうが良い)


PuttyGenでの変換:
1. PuttyGenを開く
2. Conversions -> Import key
3. id_dsaを選択してOK
4. 最下の'parameters'から 'SSH2-DSA'を選択
5. Save private keyボタン押下

Teaching Thinking by Edward de Bono

メモ:

  • 一般の教育では、「自分が正しい、故に他は間違いである」という不毛な競争を生みやすい
  • 自分が正しいことを主張するだけで、実際には誰も正解者が居ないことがある(ディベート
  • 考えるにあたり必要なのは、情報よりも状況を認知することである場合が多い
  • 与えられた題に関連する事柄を認知し、それが解にどのような影響を与えるかを探索する
  • 理論的に正しいからといって、その理論が導き出した解が正しいとは限らない。論理的に正しいものでも、その論理の土台になるもの自体が間違っていては文字通り台無しである