Slicehostに乗り換えるにあたり,このblogもリストア.
先にプラグインを全部インストールし,
エクスポートしていた記事xmlをインポート.
# Kill WPTexturizeのダウンロードリンクが死んでるんだが…
80件程度で300kBになるんだね.
その後,iNove周りの細かいリストア.
Notice欄にfortuneを表示させる改造も移植.
ついでにArchivesに各月投稿件数を表示するようにしたり.
パーマリンクも日付と投稿タイトルを使うように再設定.
# Ubuntu 8.10にaptitudeでApache2入れたときの000-defaultは
AllowOverride Noneだったりする.
SEOとか全然気にしてないんだけどね.
今月に入ってHDDトラブル4度目…
手元にHDDを置くこと自体が嫌になったので,VPSを探した.
リアル引越しを予定していることもちょっと関係してる.
結局,ランニングコストでSlicehost.
Ubuntu 8.10が選べたので旧サーバと限りなく近い環境が作れそう.
# 割り当て領域が10GBしかないプランなので,ちょっと節約していかんと…
二日でSubversion + Redmine,
FreshReader,Muninまで移行完了.
zsh_historyをはじめにコピーしたのがスピードの決め手になったな.
gnome-themes-extrasに入っているDarklooksはHumanより落ち着いていて目に優しい感じがするので気に入っている.
ところが,設定後にXが再起動されると色合いがリセットされてしまう.
理由がわからず放置していたんだけど,cappuccinoを起動したときのエラーメッセージで原因がわかった.
This bug is still present in Intrepid. About 50% of apps (including Firefox) revert to a basic GTK1 theme as a fallback because of errors in the gtkrc file for the Darklooks theme.
After comparing the Darklooks theme with the original Clearlooks theme on which it is based, the error is in the first line that defines the colour variables:
gtk_color_scheme = “fg_color:#E6E6E6\nbg_color:#555753\nbase_color:#2E3436\ntext_color:#D3D7CF\nselected_bg_color:#3F403D\nselected_fg_color:#7AA3CC\ntooltips_bg_color:#EDDE5C\ntooltips_fg_color:#000000″
There are TWO spelling errors in this line compared to the original Clearlooks which uses the singular tooltip_bg_color and tooltip_fg_color.
Removing the two Ss from tips fixes the problem, and given that Clearlooks is the reference design for Darklooks I suggest changing the top line to remain consistent across the family
via: Bug #215472 – Comment #23
いわゆるスペルミス…
/usr/share/themes/Darklooks/gtk-2.0/gtkrcを修正して直った.
cmecab — Mecab-Pyhton高速バインディング
標準のmecab-pythonバインディングでは一語ずつPython側に返すので、大量のテキスト(数十Gレベル)を処理する際に、なかなか処理時間がかかります。
これを一語ずつと言わず、パースしたものすべてをC言語側でまとめて一度でPython側に返すようにすることで高速化をはかります。
via: TekTekBLOG: cmecab — Mecab-Pyhton高速バインディング
ベンチマーク結果
1.5kb程度の同一の短いテキストを10000回形態素解析した結果を取得するのに、従来のmecab-pythonでは22.7[s]かかるところ、cmecab版では14.1[s]で処理できます。
via: cmecab — Mecab-Pyhton高速バインディング
約2倍速いですか!!
使うしかないでしょう.
# 地味にmecab-pythonをインストールしなくて良くなるのも便利.
何カ所か戸惑った.
まずはRedmineのインストールを参考に,Redmine 0.8をダウンロードして展開.
database.ymlを見てみると,MySQL向けの記述だったから,さっき頑張ってsqlite3-rubyをインストールしたのも忘れてMySQLで運用することにした.
Migrateするまえに
production:
adapter: mysql
database: redmine
host: localhost
username: hoge
password: piyo
encoding: utf8
socket: /var/run/mysqld/mysqld.sock
と書き換えて,redmineという名のデータベースを作っておく.
# ソケットファイル名がわからないときは”mysqladmin -u root -p variable | grep socket”で.
db:migrateもload_default_dataも順調に完了.
この時点でWEBrickからアクセスできることを確認.
次,Apache上でRedmineを動かすを参考に,”gem install passenger”.
問題なし.
# Synapticでもlibapache2-mod-passengerってのがあるからインストールできそうなんだけど,
mpm-workerだと依存関係を解決できないらしいので,gemから入れた.
問題は”passenger-install-apache2-module”が見つからないこと.
しかし,これもfindしたらすぐ解決.
PATHが通ってなかっただけなので,”/var/lib/gems/1.8/bin/passenger-install-apache2-module”と直接指定.
apache2-devが足りないと怒られたので,今度はSynapticからインストール.
再度実行して,無事にインストール完了.
/etc/apache2/httpd.confに以下を記述後,Apache再起動で…
キタ━━━( ゚∀゚ )━(∀゚ )━(゚ )━( )━( ゚)━( ゚∀)━( ゚∀゚ )━━━!!!!
LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-2.0.6/ext/apache2/mod_passenger.so
PassengerRoot /var/lib/gems/1.8/gems/passenger-2.0.6
PassengerRuby /usr/bin/ruby1.8
<VirtualHost *:80>
ServerName bellonieta.net
DocumentRoot /var/www
</VirtualHost>
<VirtualHost *:80>
ServerName redmine.bellonieta.net
DocumentRoot /var/www/redmine/public
</VirtualHost>