CentOS 5 に RMagick をインストールした
Redmine でガントチャートを PNG 出力できるように、RMagic をインストールした。
<pre class="prettyprint"># yum install ImageMagick
# yum install ImageMagick-devel
# Windows から verdana.ttf, arialbd.ttf, arialbi.ttf, arial.ttf を /usr/share/fonts/default/TrueType にコピー。
# yum install rmagick -v 1.15.14
</pre>
<p>RMagick の最新版は RMagick 2 だが、ImageMagick-6.3.0 以上を要求する。yum で入るのが 6.2.8 だったので、RMagic 1 にバージョンを落とした。1.15.14 が 1.x 系の最新らしい。</p>
<ul><li>ruby-devel がインストールされていないときのエラー。
<pre class="prettyprint">/usr/bin/ruby extconf.rb install rmagick
can’t find header files for ruby.
</pre></li>
<li>フォントが足りないときのエラー。
<pre class="prettyprint">/usr/lib/ruby/gems/1.8/gems/rmagick-1.15.14/./lib/rvg/misc.rb:321:in get_type_metrics': unable to read font /usr/share/fonts/default/TrueType/verdana.ttf’ (Magick::ImageMagickError)
</pre></li>
<li>ImageMagick-devel をインストールしていないときのエラー。
<pre class="prettyprint">Can’t install RMagick 2.9.1. Can’t find Magick-config in /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
</pre></li>
</ul>
Tomcat5 で SSL を有効にする
- server.xml で以下の設定がコメントアウトされているので、有効にする。
<Connector port="8443" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" /> - とりあえずここで tomcat をリスタートしてみると catalina.out に例外が。
SEVERE: Catalina.start:
LifecycleException: service.getName(): "Catalina"; Protocol handler start failed: java.io.FileNotFoundException: /usr/share/tomcat5/.keystore (No such file or directory)
at org.apache.catalina.connector.Connector.start(Connector.java:1097)
at org.apache.catalina.core.StandardService.start(StandardService.java:457)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Dec 8, 2008 7:22:42 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 306 ms - キーストアが無い、と怒られたのでつくる。
# /usr/java/jdk1.6.0_06/bin/keytool -genkey -alias tomcat -keyalg RSA
Enter keystore password: ← "changeit" といれておく。
Re-enter new password: ← "changeit" といれておく。
What is your first and last name?
[Unknown]: xxx
What is the name of your organizational unit?
[Unknown]: xxx
What is the name of your organization?
[Unknown]: xxx
What is the name of your City or Locality?
[Unknown]: xxx
What is the name of your State or Province?
[Unknown]: Tokyo
What is the two-letter country code for this unit?
[Unknown]: JP
Is CN=xxx, OU=xxx, O=xxx, L=xxx, ST=Tokyo, C=JP correct?
[no]: yes
Enter key password for
(RETURN if same as keystore password): ←リターンを押す
</pre>changeit 以外のパスワードでもよいが、設定の追加が必要になる。
</li>- root で作ると root のホームディレクトリに .keystore ディレクトリが作成される。これは tomcat5
が期待する /usr/share/tomcat5/.keystore とは異なるので、移動しておく。# mv .keystore /usr/share/tomcat5
- port 8443 で動くようになった。
# netstat -antp | grep java
tcp 0 0 127.0.0.1:8005 0.0.0.0:* LISTEN 24638/java
tcp 0 0 0.0.0.0:8009 0.0.0.0:* LISTEN 24638/java
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 24638/java
tcp 0 0 0.0.0.0:8443 0.0.0.0:* LISTEN 24638/java
</ol>参考
- root で作ると root のホームディレクトリに .keystore ディレクトリが作成される。これは tomcat5
Amazon EC2 で init: Id "x" respawning too fast: disabled for 5 minutes
Amazon EC2 で動かしている CentOS5 がエラーを出し続けるので、
<pre class="prettyprint">Feb 1 04:04:08 domU-xx-xx-xx-xx-xx-xx /sbin/mingetty[2628]: tty6: No such file or directory
Feb 1 04:04:10 domU-xx-xx-xx-xx-xx-xx /sbin/mingetty[2629]: tty2: No such file or directory
Feb 1 04:04:11 domU-xx-xx-xx-xx-xx-xx /sbin/mingetty[2630]: tty3: No such file or directory
Feb 1 04:04:15 domU-xx-xx-xx-xx-xx-xx /sbin/mingetty[2631]: tty6: No such file or directory
Feb 1 04:04:18 domU-xx-xx-xx-xx-xx-xx /sbin/mingetty[2633]: tty3: No such file or directory
Feb 1 04:04:18 domU-xx-xx-xx-xx-xx-xx /sbin/mingetty[2632]: tty2: No such file or directory
Feb 1 04:04:22 domU-xx-xx-xx-xx-xx-xx /sbin/mingetty[2634]: tty6: No such file or directory
Feb 1 04:04:26 domU-xx-xx-xx-xx-xx-xx /sbin/mingetty[2635]: tty2: No such file or directory
Feb 1 04:04:26 domU-xx-xx-xx-xx-xx-xx /sbin/mingetty[2636]: tty3: No such file or directory
Feb 1 04:04:29 domU-xx-xx-xx-xx-xx-xx /sbin/mingetty[2637]: tty6: No such file or directory
Feb 1 04:04:33 domU-xx-xx-xx-xx-xx-xx /sbin/mingetty[2639]: tty3: No such file or directory
Feb 1 04:04:48 domU-xx-xx-xx-xx-xx-xx init: Id “6” respawning too fast: disabled for 5 minutes
Feb 1 04:04:48 domU-xx-xx-xx-xx-xx-xx /sbin/mingetty[2645]: tty2: No such file or directory
Feb 1 04:04:49 domU-xx-xx-xx-xx-xx-xx /sbin/mingetty[2644]: tty3: No such file or directory
Feb 1 04:04:53 domU-xx-xx-xx-xx-xx-xx init: Id “2” respawning too fast: disabled for 5 minutes
Feb 1 04:04:54 domU-xx-xx-xx-xx-xx-xx init: Id “3” respawning too fast: disabled for 5 minutes
Feb 1 04:06:48 domU-xx-xx-xx-xx-xx-xx /sbin/mingetty[2655]: tty5: No such file or directory
Feb 1 04:06:53 domU-xx-xx-xx-xx-xx-xx init: Id “5” respawning too fast: disabled for 5 minutes
Feb 1 04:07:50 domU-xx-xx-xx-xx-xx-xx /sbin/mingetty[2656]: tty4: No such file or directory
Feb 1 04:07:56 domU-xx-xx-xx-xx-xx-xx /sbin/mingetty[2657]: tty4: No such file or directory
Feb 1 04:08:42 domU-xx-xx-xx-xx-xx-xx /sbin/mingetty[2664]: tty4: No such file or directory
Feb 1 04:08:49 domU-xx-xx-xx-xx-xx-xx /sbin/mingetty[2665]: tty4: No such file or directory
Feb 1 04:08:54 domU-xx-xx-xx-xx-xx-xx init: Id “4” respawning too fast: disabled for 5 minutes
Feb 1 04:09:50 domU-xx-xx-xx-xx-xx-xx /sbin/mingetty[2666]: tty6: No such file or directory
</pre>
/etc/inittab からコメントアウトして kill -HUP 1 したら静かになった。
<pre class="prettyprint"># Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
#2:2345:respawn:/sbin/mingetty tty2
#3:2345:respawn:/sbin/mingetty tty3
#4:2345:respawn:/sbin/mingetty tty4
#5:2345:respawn:/sbin/mingetty tty5
#6:2345:respawn:/sbin/mingetty tty6
</pre>
たしかに、/dev の下には tty1 しかない。その代わり ttya0 とかがいっぱいあるけど。これは何に使われるのだろう?
組織のなかの3種類の人たち
組織のなかには3種類の人がいる。
- スペシャリスト
- ジェネラリスト
- 特色を出さないよう心がけている人
<p>スペシャリストは、ある分野における自分の市場価値をもって居場所を確保する。この人たちは、自分の分野はここ、と決めているので、組織全体からみると融通がきかない。その仕事はいいから、こっちをやって、と言われても、自分の分野からは、なかなか離れられない。</p>
<p>ジェネラリストは、組織のなかをうまく立ち回ることで居場所を確保する。この人たちは、組織のなかで生き延びる能力に長ける。自分の分野はもたないので、なんでもやる。上司からみると、とても使いやすい。もちろん、ジェネラリストのスペシャリスト、みたいな人たちがいてもいい。アメリカでは一般的な、CEOとして会社を渡り歩く人は、この部類に入る。経営、組織運営のスペシャリスト。</p>
<p>ジェネラリストがスペシャリストたちをうまくつなげることができれば、うまく回る。</p>
EeePC901 を手放す
外出先でPCを使いたい、コンセント無しでも使いたい、ということでバッテリーが公称9時間近く持つEeePC901 を買った。
<p>重さ1.1キロで、サイズも小さい。初めて店で触ったときは、こんなキーボード打てるかっ! と思ったが、しばらく触っていると慣れてしまって、問題ないスピードで入力できるようになった。</p>
<p>しかし、ワナはやはり存在した。PCは7時間くらいは持つのだが、人間の方が持たなかった。 </p>
<p>右手に痛みを感じるようになってしまった。腱鞘炎だと思う。丸一日PCに向かうようになってから10年以上経つが、こんなことは今まで無かった。</p>
<p>平日夜に2-3時間、休日は4-6時間程度使う生活を一ヶ月も続けないうちに、使用をあきらめた。職業柄、これ以上手は傷めたくない。</p>
<p>EeePC 901 は、里子に出した。さようなら。ありがとう。</p>
<p>代わりに、ThinkPad の大容量バッテリを買った。ずっしり。でも手がすごく楽。やっぱり ThinkPad のキーボードはいいなぁ。手放して一か月以上経つが、手の痛みは再発していない。</p>
<table>
<tr>
<td>
<iframe src="http://rcm-jp.amazon.co.jp/e/cm?t=x03c-22&o=9&p=8&l=as1&asins=B001IWN5EC&md=1X69VDGQCMF7Z30FM082&fc1=000000&IS2=1<1=_blank&m=amazon&lc1=0000FF&bc1=FFFFFF&bg1=FFFFFF&f=ifr&npa=1" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
<td>
<iframe src="http://rcm-jp.amazon.co.jp/e/cm?t=x03c-22&o=9&p=8&l=as1&asins=B001E7BTYE&md=1X69VDGQCMF7Z30FM082&fc1=000000&IS2=1<1=_blank&m=amazon&lc1=0000FF&bc1=FFFFFF&bg1=FFFFFF&f=ifr&npa=1" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
</td>
</tr>
</table>