2009-07-08 COOLSCAN IV on WinXP on VirtualBox on OpenSolaris
フィルムスキャン環境
とうとう、VirtualBox上のWindowsXPからCOOLSCAN IVが使えた。
というか、普通に使えた。
マシンにCOOLSCANつないで、電源を入れるだけでVirtualBoxからは「Nikon LS-40 ED」として認識され、
WindowsXPなゲストOSに接続してやったら普通に認識。
何の問題も無くNikon SCANをセットアップしてスキャン。
これは便利。
あとはCaptureNX2さえあれば完璧になるのだが。
購入: 1人 クリック: 25回
2009-07-02 DELL mini9 のサーバ化
mini9の使い道がなくなってきたので、超静音サーバにすることにした。
mini9のスペック
Atom N270 2GBメモリ 4GBSSD 有線&無線LAN
ATOM N270は64bit使えないので。
準備
mini9には光学ドライブが内蔵されておらず、かつUSBな光学ドライブも持っていないので、
用意するもの
- USBメモリ
- 容量は128MB以上なら余裕
- ddが使えるマシン
- Windowsの場合はDDforWindows - Silicon Linux Wikiを使えばOK
- Linux/UnixマシンがあればそれでもOK
今回はOpenSolarisマシンでの例
1.USBメモリをPCに刺す
2.確認
$ df -h /dev/dsk/c11t0d0p0 12M 8.3M 3.6M 70% /media/USB Flash Disk
$ wget wget ftp://ftp.riken.jp/Linux/centos/5.3/os/i386/images/diskboot.img .... 02:32:35 (1.57 MB/s) - `diskboot.img' を保存しました [12582912]
# dd if=diskboot.img of=/dev/dsk/c11t0d0p0 24576+0 records in 24576+0 records out
5.完成
2009-05-17
redmineのインストール
mysqlの設定
まずmysqlを起動
# /etc/rc.d/init.d/mysqld start Starting MySQL: [ OK ]
つぎに接続
$ mysql -u root -p
mysql> create database redmine character set utf8; Query OK, 1 row affected (0.04 sec)
確認
mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | redmine | | test | +--------------------+ 4 rows in set (0.00 sec)
mysql> GRANT ALL ON redmine.* TO 'redmineuser'@'localhost' IDENTIFIED BY 'redminepass'; Query OK, 0 rows affected (0.00 sec)
mysqlの設定はこれでおしまい
mysql> quit Bye
redmineのインストール
RubyForge: Redmine: Project Filelistからredmineをダウンロード
今回は0.8.3を使用
$ wget http://rubyforge.org/frs/download.php/54503/redmine-0.8.3.tar.gz
展開&名前変更
$ tar -zxvf redmine-0.8.3.tar.gz $ mv redmine-0.8.3 redmine
次にmysql接続情報の設定
$ cd redmine $ cp config/database.yml.example config/database.yml $ vi config/database.yml
config/database.yml中の下記の部分を設定
production: adapter: mysql database: redmine host: localhost username: redmineuser password: redminepass encoding: utf8
データの準備
テーブル作成
$ rake db:migrate RAILS_ENV="production"
デフォルトのデータ作成
$ rake redmine:load_default_data RAILS_ENV="production" (in /redmine) Select language: bg, ca, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, lt, nl, no, pl, pt, pt-br, ro, ru, sk, sr, sv, th, tr, uk, vn, zh, zh-tw [en] ja ==================================== Default configuration data loaded.
以上で設定は完了
動作確認
redmineを起動
$ ruby script/server -e production => Booting WEBrick... => Rails 2.1.2 application started on http://0.0.0.0:3000 => Ctrl-C to shutdown server; call with --help for options
http://[ipaddress]:3000/にアクセスすれば、
こんな画面が出るはず
右上のログインからadmin/adminでログインすればOK
ログイン直後はadminのユーザが英語設定になっているので、
「My Account」−「Language」−「Japanese(日本語)」−「Save」で日本語環境に変更できる
では、良いredmineライフを。
2009-05-14 我が家の環境
環境構築(暫定)完了
引っ越してしばらくはバタバタしていたが、なんとか我が家のPC環境が形になった。
PCはノートが2台、デスクトップ2台(1台は休眠)、サーバ2台、NAS1台。
ネット回線はフレッツ光プレミアム。
2DKだが、フレッツのCTUとサーバ室が線を通しづらい間取り。
ネットワークは無線LANルータ「WZR2-G300N」と無線LAN子機「WLI-TX4-AG300N」を使って、接続。
WLI-TX4-AG300Nが在庫切れの為に1ヶ月も待たされた。
ESXiの方はOpteron1210、メモリ6GB、ハードディスク80GB
FreeNASの方はAthlon64 3500+、メモリ2.5GB、ハードディスク320GB,160GB,80GB*2
という構成。
CentOS5.3にredmineをインストール
プロジェクト管理ツールを探していて見つけたのがredmineだ。
RubyonRails製。
CVSやSubversionのバージョン管理システムとの連携もOK
ということで、早速CentOS5.3をESXiにインストールして導入してみる。
今回使うのはCentOS5.3x64です。
たぶんx86でも変わらないはず。
CentOSのアップデート
# yum update -y
CentOS5.2までは
# yum install yum-fastestmirror
でプラグインを入れる作業が最初にあったが、5.3からはデフォで入っているみたい。
今日(2009/05/14)現在で78パッケージのアップデート。
Complete!
と出れば完了。
次に「ruby」とredmineではmysqlでデータを保存するために「mysql」をインストール。
# yum install -y ruby ruby-devel rdoc mysql mysql-server mysql-devel
サクッと完了。
Complete!
gemのインストール。
gemとはrubyパッケージ管理ソフトであり、railsはgemを使ってインストールするために必要。
これはソースからインストール。
Ruby on Rails: Downloadから「RubyGems」−「downloads」を探す。
今回は「rubygems-1.3.3.tgz」を使うことに。
$ wget http://rubyforge.org/frs/download.php/56227/rubygems-1.3.3.tgz $ tar zxvf rubygem-1.3.3.tgz $ cd rubygem-1.3.3 $ ruby setup.rb config $ ruby setup.rb setup # ruby setup.rb install
ここらへんはもうrubyでやってしまうのね。
railsのインストール
# gem install rails --include-dependencies
ruby mysqlコネクタのインストール
# gem install mysql
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... yes
checking for mysql_query() in -lmysqlclient... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
〜中略〜
--with-mysqlclientlib
--without-mysqlclientlib
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/mysql-2.7 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/mysql-2.7/gem_make.out
うむ。エラーでダメだった。
調べてみたら解決策発見。
[ruby] gem install mysql でエラー - Memorandum
オプション「-- --with-mysql-config」を追加すればいいみたい。
# gem install mysql -- --with-mysql-config Building native extensions. This could take a while... Successfully installed mysql-2.7 1 gem installed Installing ri documentation for mysql-2.7... Installing RDoc documentation for mysql-2.7...
成功。
確認
ここまで完了すればRuby on Railsな環境ができた。
動作確認
$ mkdir hoge $ rails ./hoge $ cd hoge $ ruby script/server => Booting WEBrick => Rails 2.3.2 application starting on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server [2009-05-14 21:40:13] INFO WEBrick 1.3.1 [2009-05-14 21:40:13] INFO ruby 1.8.5 (2006-08-25) [i386-linux] [2009-05-14 21:40:13] INFO WEBrick::HTTPServer#start: pid=4250 port=3000
http://[ipaddress]:3000/
が表示されるはず。
続きはまた明日。




