2012年11月12日月曜日

Windows8 スタートメニュー

Windows8からメトロスタイルというUI(ユーザーインターフェース)になりタブレットを意識したものになっています。

家庭で使用する個人ユーザーならいいかもしれないが、業務向きではない気がします。デスクトップ左下にいつもあったスタートメニューボタンがなくなり非常に使いにくい感があります。

メモ帳、電卓、ペイントなど予め用意されているアプリケーションはどうやって開けば?困ります。



そんな不満を解消してくれるフリーツールClassic Shellを使ってしました。無償で使うことができますが、当然サポートを受けることはできません。

インストールするだけで従来のようにスタートメニューが使えるようになります。オリジナルは英語版だが日本語用にカスタマイズしたものもあるのでそちらを使います。


まずこちらの下の方にあるClassic Shell 3.6.2J(2012.11.09ビルド)ダウンロードします。
アドレス:http://dnki.sakura.ne.jp/download/ClassicShell-J.exe
2012/11/12現在



ダブルクリックで自己解凍して現れたフォルダの中のClassicShellSetup.exeを実行します。

インストールは英語表記ですが、簡単です。そのまま「Next」


ライセンスに同意して「Next」
「I accept the terms in the License Agreemwnt」チェックON

規定値のままで良いでしょう。そのまま「Next」

そのまま「Install」


セキュリティ警告では「はい」


そのまま「Finish」

メニュー設定が表示されます。
※スタート>1 Classic スタートメニュー設定からも開けます。


Windows9x/2000系・XP・Vista/7スタイルから選択できます。
フル設定にするともっと細かく設定することができますが、まずは基本設定にして必要に応じてフル設定するのがよいでしょう。

左下の貝のようなアイコンが追加されます。これがスタートメニュー(プログラムメニュー)となります。スタートメニューがあると何だかホッとしますね。
WindowsVista/Windows7スタイル
メトロスクリーンにはClassic Shell関連も


■基本設定
特に変更しなくても困ることはないと思います。
個人的にはShow Log Offにチェックをいれた程度です。

下の方にある「メトロスクリーンをスキップ」はWindowsにログオン後、いきなりデスクトップが表示されるようにするものです。※これはありがたい

「バックアップ」では設定をファイルとして保存しておくことができるようです。もちろん復元も可能です。


スタートメニューが使えるようになるだけでWindows8を使ってみようかなぁなんて気持ちになります。

開発者:Ivo Beltchev氏、日本語版作成者:電机本舗様ありがとうございます。
 







2012年10月24日水曜日

FortiGateステータスランプ

とあるお客様のところでセキュリティ機器FortigateのSTATUSランプが赤色(通常は緑)に!もちろん機能していませんのでネットもダウン!

赤色ということはハード的にトラブルがあるということです。

お客様は会計事務所で業務の多くにインターネットが使われており仕事になりません。早く復旧させてあげなくては・・・

サポート契約中ということもあり代理店に連絡(販売は私!)、すぐに交換品を送って頂きバックアップしていた設定ファイルで復元

トラブルの原因を代理店にお聞きするとACアダプターの故障だったそうで、本体に問題なかった。
アダプターの故障だけなのに、本体が新品に!

ライセンス移管も無事完了!
 

2012年9月18日火曜日

Redmine2.1インストールしてみた

先日リリースされたRedmine2.1新規インストールしてみた。ついでにDBも先日リリースされたPostgreSQL9.2です。尚、OSはCentOS6.3(x86)です。

以前CentOS6にRedmine2.0+PostgreSQL9.1を構築した手順と全く同じ要領で問題ありませんでした。

こちらを参考にして頂けると幸いです。
http://stdman.blogspot.jp/2012/05/centos6redmine20.html

PostgreSQL9.2ではcreateuserの仕様が若干変わったようで、オプションでロールを割り当てるようです。

ちなみにredmine用ユーザ作成時に、-dでDB作成可、-Pでパスワード作成


$ createuser redmine -d -P
Enter password for new role: ********
Enter it again: ********

オプションはこんな感じです。

$ createuser --help
createuser creates a new PostgreSQL role.

Usage:
  createuser [OPTION]... [ROLENAME]

Options:
  -c, --connection-limit=N  connection limit for role (default: no limit)
  -d, --createdb            role can create new databases
  -D, --no-createdb         role cannot create databases (default)
  -e, --echo                show the commands being sent to the server
  -E, --encrypted           encrypt stored password
  -i, --inherit             role inherits privileges of roles it is a
                            member of (default)
  -I, --no-inherit          role does not inherit privileges
  -l, --login               role can login (default)
  -L, --no-login            role cannot login
  -N, --unencrypted         do not encrypt stored password
  -P, --pwprompt            assign a password to new role
  -r, --createrole          role can create new roles
  -R, --no-createrole       role cannot create roles (default)
  -s, --superuser           role will be superuser
  -S, --no-superuser        role will not be superuser (default)
  -V, --version             output version information, then exit
  --interactive             prompt for missing role name and attributes rather
                            than using defaults
  --replication             role can initiate replication
  --no-replication          role cannot initiate replication
  -?, --help                show this help, then exit

Connection options:
  -h, --host=HOSTNAME       database server host or socket directory
  -p, --port=PORT           database server port
  -U, --username=USERNAME   user name to connect as (not the one to create)
  -w, --no-password         never prompt for password
  -W, --password            force password prompt
 
 
Redmine 2.1よりチケットやWikiに添付ファイルのサムネイル画像が表示できるようになった。
Redmine_ROOT/tmp/thumbails 書込み権限が必要ですので注意
 

ESXi5にCentOS 6.3

vmxnet_init_ring alloc_page failed

ESXi5にてVMwareToolsをインストールするとNicがエラーを起こす場合の対処方法

環境:Dell PowerEdgeR410、Broadcom NetXtremeⅡ BCM5716

1.CentOSをシャットダウン
2.仮想マシンの設定で既存のネットワークアダプタを削除
3.イーサーネットアダプタを追加するがアダプタタイプをVMXNET 3を選択
4.CentOSを起動

以上

2012年8月31日金曜日

Redmine 2.0 でチケット情報をCSVインポート

チケットをCSVからまとめて登録するにはredmine_importerというプラグインをよく使うが、ググってもRedmine 1.x対応ばかり・・・・ですが見つけました!Redmine2.0対応

提供者のksauzzさん?ありがとうございます。
有難く使わさせて頂きます。

とりあえずそのプラグインをインストールしてみました(自己責任です)。
※/RedmineROOT/pluginsのパーミッションに注意

●プラグインファイルの取得
ソースはGithubで公開されています。

ブラウザで以下のアドレスへアクセスするとダウンロードできます。
https://github.com/ksauzz/redmine_importer/tarball/redmine2.x

ダウンロードファイル(2012/08/31現在)
ksauzz-redmine_importer-36d5af5.tar.gz

解凍してフォルダ名をredmine_importerにリネーム

●アップロード
redmine_importerフォルダごと/RedmineROOT/pluginsへ

●fastercsvのインストール
fastercsv 1.4~1.5.3までは動作テストされているらしいので、とりあえず1.5.3を指定

# gem install fastercsv -v=1.5.3
Fetching: fastercsv-1.5.3.gem (100%)
Successfully installed fastercsv-1.5.3
1 gem installed
Installing ri documentation for fastercsv-1.5.3...
Installing RDoc documentation for fastercsv-1.5.3...


●マイグレーションの実行
redmine2.xでは若干違うので注意(詳しくはこちら

# cd /RedmineROOT/
# rake redmine:plugins:migrate RAILS_ENV=production
Migrating redmine_importer (Issue Importer)...
==  CreateImportInProgresses: migrating =======================================
-- create_table(:import_in_progresses)
NOTICE:  CREATE TABLE will create implicit sequence "import_in_progresses_id_seq" for serial column "import_in_progresses.id"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "import_in_progresses_pkey" for table "import_in_progresses"
   -> 0.0284s
==  CreateImportInProgresses: migrated (0.0284s) ==============================

ちなみにプラグインのアンインストール方法
# rake redmine:plugins:migrate NAME=redmine_importer VERSION=0 RAILS_ENV=production
Migrating redmine_importer (Issue Importer)...
==  CreateImportInProgresses: reverting =======================================
-- drop_table(:import_in_progresses)
   -> 0.0841s
==  CreateImportInProgresses: reverted (0.0841s) ==============================
プラグインディレクトリを削除すればアンインストール完了


あとはRedmineを再起動(Webサーバ)

●使い方
プロジェクト>設定>モジュール>Importer チェックONで使用することができる。
またプロジェクト作成時デフォルトで有効にするためには、管理>設定>プロジェクトでImporter にチェックを入れておく





テスト用のCSVファイルが含まれているので試してみたところCSVをアップロードして読み込みは成功したが、確認ボタンでいざ取り込もうとすると結果表示でエラーになってしまう。
少し研究してみよう。

成功した方がいらっしゃいましたら情報お待ちしております。

-----

早速、情報を頂きました!コメントに記載されている通りソースの一部を書き換えることでインポートが成功します。katanaさんありがとうございます。

# cd /RedmineROOT/
# vi ./plugins/redmine_importer/app/controllers/importer_controller.rb
250行目付近
fixed_version_name = row[attrs_map["fixed_version"]]

fixed_version_name = row[attrs_map["fixed_version"]] || ""


# rake redmine:plugins:migrate RAILS_ENV=production
Migrating redmine_importer (Issue Importer)...


Redmine再起動




 
 

2012年8月18日土曜日

ESXi5.0 パッチ適用(ゲストOS自動起動修正済)

esxi5.0 update01以降、ゲストOS(仮想マシン)の自動起動が効かなくなったが、ESXi500-201207001で修正されたようです。なのでupdate01以降のパッチを適用してみました。

既にESXi500-201109001、ESXi500-201111001、ESXi500-201112001は適用済(構築はこちら

今回はupdatre01、ESXi500-201204001、ESXi500-201205001、ESXi500-201206001、ESXi500-201207001までのパッチを適用します。
ファイルを予めホストに直接アップロードまたはNFSを利用して参照できるようにしておきます。
※ホスト直接を利用した場合はこちらの「Patchの適用」、NFSを利用した方法はこちらを参考にしてください。

作業手順

  1. ゲストOSのシャットダウン
  2. ホストをメンテナンスモードにする
  3. update01の適用⇒再起動
  4. ESXi500-201204001の適用
  5. ESXi500-201205001の適用⇒再起動
  6. ESXi500-201206001の適用⇒再起動
  7. ESXi500-201207001の適用⇒再起動



実行する際は、ESXiホストをメンテナンスモードに切り替えておき、SSHクライアント(Poderosa)を利用してに接続します。(ホスト側でSSHを有効にしておく)認証方法は必ずKeyboard Interactiveにする必要があります。


接続に成功するとパスワードを要求されるので入力します。

ログイン成功!

では最初に5.0_updatre01からです。尚、update01はゲストOSをシャットダウンしておきます。
esxcliコマンドを使用してupdate-from-esxi5.0-5.0_update01.zipを指定して実行します。。
※私はNFSを利用してファイルを配置させています。

# esxcli software vib install -d /vmfs/volumes/softsv_vm/esxi5.0/patch/update-from-esxi5.0-5.0_update01.zip

Installation Result
   Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
   Reboot Required: true
   VIBs Installed: VMware_bootbank_ehci-ehci-hcd_1.0-3vmw.500.1.11.623860, VMware_bootbank_esx-base_5.0.0-1.11.623860,
VMware_bootbank_misc-drivers_5.0.0-1.11.623860,
VMware_bootbank_net-e1000e_1.1.2-3vmw.500.1.11.623860,
VMware_bootbank_net-nx-nic_4.0.557-3vmw.500.1.11.623860,
VMware_bootbank_sata-ahci_3.0-6vmw.500.1.11.623860,
VMware_bootbank_sata-ata-piix_2.12-4vmw.500.1.11.623860,
VMware_bootbank_scsi-aacraid_1.1.5.1-9vmw.500.1.11.623860,
VMware_bootbank_scsi-megaraid-sas_5.34-1vmw.500.1.11.623860,
VMware_bootbank_scsi-mpt2sas_06.00.00.00-6vmw.500.1.11.623860,
VMware_bootbank_scsi-rste_2.0.2.0088-1vmw.500.1.11.623860,
VMware_locker_tools-light_5.0.0-1.11.623860
   VIBs Removed: VMware_bootbank_ehci-ehci-hcd_1.0-3vmw.500.0.0.469512,
VMware_bootbank_esx-base_5.0.0-0.7.515841,
VMware_bootbank_misc-drivers_5.0.0-0.7.515841,
VMware_bootbank_net-e1000e_1.1.2-3vmw.500.0.7.515841,
VMware_bootbank_net-nx-nic_4.0.557-3vmw.500.0.0.469512,
VMware_bootbank_sata-ahci_3.0-6vmw.500.0.0.469512,
VMware_bootbank_sata-ata-piix_2.12-4vmw.500.0.0.469512,
VMware_bootbank_scsi-aacraid_1.1.5.1-9vmw.500.0.0.469512,
VMware_bootbank_scsi-megaraid-sas_4.32-1vmw.500.0.0.469512,
VMware_bootbank_scsi-mpt2sas_06.00.00.00-5vmw.500.0.0.469512,
VMware_locker_tools-light_5.0.0-0.7.515841
   VIBs Skipped: VMware_bootbank_ata-pata-amd_0.3.10-3vmw.500.0.0.469512,
VMware_bootbank_ata-pata-atiixp_0.4.6-3vmw.500.0.0.469512,
VMware_bootbank_ata-pata-cmd64x_0.2.5-3vmw.500.0.0.469512,
VMware_bootbank_ata-pata-hpt3x2n_0.3.4-3vmw.500.0.0.469512,
VMware_bootbank_ata-pata-pdc2027x_1.0-3vmw.500.0.0.469512,
VMware_bootbank_ata-pata-serverworks_0.4.3-3vmw.500.0.0.469512,
VMware_bootbank_ata-pata-sil680_0.4.8-3vmw.500.0.0.469512,
VMware_bootbank_ata-pata-via_0.3.3-2vmw.500.0.0.469512,
VMware_bootbank_block-cciss_3.6.14-10vmw.500.0.0.469512,
VMware_bootbank_esx-tboot_5.0.0-0.0.469512,
VMware_bootbank_ima-qla4xxx_2.01.07-1vmw.500.0.0.469512,
VMware_bootbank_ipmi-ipmi-devintf_39.1-4vmw.500.0.0.469512,
VMware_bootbank_ipmi-ipmi-msghandler_39.1-4vmw.500.0.0.469512,
VMware_bootbank_ipmi-ipmi-si-drv_39.1-4vmw.500.0.0.469512,
VMware_bootbank_misc-cnic-register_1.1-1vmw.500.0.0.469512,
VMware_bootbank_net-be2net_4.0.88.0-1vmw.500.0.7.515841,
VMware_bootbank_net-bnx2_2.0.15g.v50.11-5vmw.500.0.0.469512,
VMware_bootbank_net-bnx2x_1.61.15.v50.1-1vmw.500.0.0.469512,
VMware_bootbank_net-cnic_1.10.2j.v50.7-2vmw.500.0.0.469512,
VMware_bootbank_net-e1000_8.0.3.1-2vmw.500.0.7.515841,
VMware_bootbank_net-enic_1.4.2.15a-1vmw.500.0.0.469512,
VMware_bootbank_net-forcedeth_0.61-2vmw.500.0.0.469512,
VMware_bootbank_net-igb_2.1.11.1-3vmw.500.0.0.469512,
VMware_bootbank_net-ixgbe_2.0.84.8.2-10vmw.500.0.0.469512,
VMware_bootbank_net-r8168_8.013.00-3vmw.500.0.0.469512,
VMware_bootbank_net-r8169_6.011.00-2vmw.500.0.0.469512,
VMware_bootbank_net-s2io_2.1.4.13427-3vmw.500.0.0.469512,
VMware_bootbank_net-sky2_1.20-2vmw.500.0.0.469512,
VMware_bootbank_net-tg3_3.110h.v50.4-4vmw.500.0.0.469512,
VMware_bootbank_ohci-usb-ohci_1.0-3vmw.500.0.0.469512,
VMware_bootbank_sata-sata-nv_3.5-3vmw.500.0.0.469512,
VMware_bootbank_sata-sata-promise_2.12-3vmw.500.0.0.469512,
VMware_bootbank_sata-sata-sil_2.3-3vmw.500.0.0.469512,
VMware_bootbank_sata-sata-svw_2.3-3vmw.500.0.0.469512,
VMware_bootbank_scsi-adp94xx_1.0.8.12-6vmw.500.0.0.469512,
VMware_bootbank_scsi-aic79xx_3.1-5vmw.500.0.0.469512,
VMware_bootbank_scsi-bnx2i_1.9.1d.v50.1-3vmw.500.0.0.469512,
VMware_bootbank_scsi-fnic_1.5.0.3-1vmw.500.0.0.469512,
VMware_bootbank_scsi-hpsa_5.0.0-17vmw.500.0.0.469512,
VMware_bootbank_scsi-ips_7.12.05-4vmw.500.0.0.469512,
VMware_bootbank_scsi-lpfc820_8.2.2.1-18vmw.500.0.0.469512,
VMware_bootbank_scsi-megaraid-mbox_2.20.5.1-6vmw.500.0.0.469512,
VMware_bootbank_scsi-megaraid2_2.00.4-9vmw.500.0.0.469512,
VMware_bootbank_scsi-mptsas_4.23.01.00-5vmw.500.0.0.469512,
VMware_bootbank_scsi-mptspi_4.23.01.00-5vmw.500.0.0.469512,
VMware_bootbank_scsi-qla2xxx_901.k1.1-14vmw.500.0.0.469512,
VMware_bootbank_scsi-qla4xxx_5.01.03.2-3vmw.500.0.0.469512,
VMware_bootbank_uhci-usb-uhci_1.0-3vmw.500.0.0.469512

ホストの再起動が必要になります。そのままコマンドでrebootと入力しましょう。
# reboot


起動後はESXi500-201204001の適用です。要領はupdate01と全く同じですがこのパッチはゲストOSのシャットダウンおよびホストの再起動は必要ありません。でもこの時点ではゲストOSの自動起動は効かないのでゲストOSは起動されていませんが・・・

# esxcli software vib install -d /vmfs/volumes/softsv_vm/esxi5.0/patch/ESXi500-201204001.zip

Installation Result
   Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
   Reboot Required: true
   VIBs Installed: VMware_bootbank_ehci-ehci-hcd_1.0-3vmw.500.1.11.623860,
VMware_bootbank_esx-base_5.0.0-1.11.623860,
VMware_bootbank_misc-drivers_5.0.0-1.11.623860,
VMware_bootbank_net-e1000e_1.1.2-3vmw.500.1.11.623860,
VMware_bootbank_net-nx-nic_4.0.557-3vmw.500.1.11.623860,
VMware_bootbank_sata-ahci_3.0-6vmw.500.1.11.623860,
VMware_bootbank_sata-ata-piix_2.12-4vmw.500.1.11.623860,
VMware_bootbank_scsi-aacraid_1.1.5.1-9vmw.500.1.11.623860,
VMware_bootbank_scsi-megaraid-sas_5.34-1vmw.500.1.11.623860,
VMware_bootbank_scsi-mpt2sas_06.00.00.00-6vmw.500.1.11.623860,
VMware_bootbank_scsi-rste_2.0.2.0088-1vmw.500.1.11.623860, VMware_locker_tools-light_5.0.0-1.12.653509
   VIBs Removed: VMware_bootbank_ehci-ehci-hcd_1.0-3vmw.500.0.0.469512,
VMware_bootbank_esx-base_5.0.0-0.7.515841,
VMware_bootbank_misc-drivers_5.0.0-0.7.515841,
VMware_bootbank_net-e1000e_1.1.2-3vmw.500.0.7.515841,
VMware_bootbank_net-nx-nic_4.0.557-3vmw.500.0.0.469512,
VMware_bootbank_sata-ahci_3.0-6vmw.500.0.0.469512,
VMware_bootbank_sata-ata-piix_2.12-4vmw.500.0.0.469512,
VMware_bootbank_scsi-aacraid_1.1.5.1-9vmw.500.0.0.469512,
VMware_bootbank_scsi-megaraid-sas_4.32-1vmw.500.0.0.469512,
VMware_bootbank_scsi-mpt2sas_06.00.00.00-5vmw.500.0.0.469512,
VMware_locker_tools-light_5.0.0-1.11.623860
   VIBs Skipped: VMware_bootbank_ata-pata-amd_0.3.10-3vmw.500.0.0.469512,
VMware_bootbank_ata-pata-atiixp_0.4.6-3vmw.500.0.0.469512,
VMware_bootbank_ata-pata-cmd64x_0.2.5-3vmw.500.0.0.469512,
VMware_bootbank_ata-pata-hpt3x2n_0.3.4-3vmw.500.0.0.469512,
VMware_bootbank_ata-pata-pdc2027x_1.0-3vmw.500.0.0.469512,
VMware_bootbank_ata-pata-serverworks_0.4.3-3vmw.500.0.0.469512,
VMware_bootbank_ata-pata-sil680_0.4.8-3vmw.500.0.0.469512,
VMware_bootbank_ata-pata-via_0.3.3-2vmw.500.0.0.469512,
VMware_bootbank_block-cciss_3.6.14-10vmw.500.0.0.469512,
VMware_bootbank_esx-tboot_5.0.0-0.0.469512,
VMware_bootbank_ima-qla4xxx_2.01.07-1vmw.500.0.0.469512,
VMware_bootbank_ipmi-ipmi-devintf_39.1-4vmw.500.0.0.469512,
VMware_bootbank_ipmi-ipmi-msghandler_39.1-4vmw.500.0.0.469512,
VMware_bootbank_ipmi-ipmi-si-drv_39.1-4vmw.500.0.0.469512,
VMware_bootbank_misc-cnic-register_1.1-1vmw.500.0.0.469512,
VMware_bootbank_net-be2net_4.0.88.0-1vmw.500.0.7.515841,
VMware_bootbank_net-bnx2_2.0.15g.v50.11-5vmw.500.0.0.469512,
VMware_bootbank_net-bnx2x_1.61.15.v50.1-1vmw.500.0.0.469512,
VMware_bootbank_net-cnic_1.10.2j.v50.7-2vmw.500.0.0.469512,
VMware_bootbank_net-e1000_8.0.3.1-2vmw.500.0.7.515841,
VMware_bootbank_net-enic_1.4.2.15a-1vmw.500.0.0.469512,
VMware_bootbank_net-forcedeth_0.61-2vmw.500.0.0.469512,
VMware_bootbank_net-igb_2.1.11.1-3vmw.500.0.0.469512,
VMware_bootbank_net-ixgbe_2.0.84.8.2-10vmw.500.0.0.469512,
VMware_bootbank_net-r8168_8.013.00-3vmw.500.0.0.469512,
VMware_bootbank_net-r8169_6.011.00-2vmw.500.0.0.469512,
VMware_bootbank_net-s2io_2.1.4.13427-3vmw.500.0.0.469512,
VMware_bootbank_net-sky2_1.20-2vmw.500.0.0.469512,
VMware_bootbank_net-tg3_3.110h.v50.4-4vmw.500.0.0.469512,
VMware_bootbank_ohci-usb-ohci_1.0-3vmw.500.0.0.469512,
VMware_bootbank_sata-sata-nv_3.5-3vmw.500.0.0.469512,
VMware_bootbank_sata-sata-promise_2.12-3vmw.500.0.0.469512,
VMware_bootbank_sata-sata-sil_2.3-3vmw.500.0.0.469512,
VMware_bootbank_sata-sata-svw_2.3-3vmw.500.0.0.469512,
VMware_bootbank_scsi-adp94xx_1.0.8.12-6vmw.500.0.0.469512,
VMware_bootbank_scsi-aic79xx_3.1-5vmw.500.0.0.469512,
VMware_bootbank_scsi-bnx2i_1.9.1d.v50.1-3vmw.500.0.0.469512,
VMware_bootbank_scsi-fnic_1.5.0.3-1vmw.500.0.0.469512,
VMware_bootbank_scsi-hpsa_5.0.0-17vmw.500.0.0.469512,
VMware_bootbank_scsi-ips_7.12.05-4vmw.500.0.0.469512,
VMware_bootbank_scsi-lpfc820_8.2.2.1-18vmw.500.0.0.469512,
VMware_bootbank_scsi-megaraid-mbox_2.20.5.1-6vmw.500.0.0.469512,
VMware_bootbank_scsi-megaraid2_2.00.4-9vmw.500.0.0.469512,
VMware_bootbank_scsi-mptsas_4.23.01.00-5vmw.500.0.0.469512,
VMware_bootbank_scsi-mptspi_4.23.01.00-5vmw.500.0.0.469512,
VMware_bootbank_scsi-qla2xxx_901.k1.1-14vmw.500.0.0.469512,
VMware_bootbank_scsi-qla4xxx_5.01.03.2-3vmw.500.0.0.469512,
VMware_bootbank_uhci-usb-uhci_1.0-3vmw.500.0.0.469512


ホストの再起動は必要ないのでそのまま ESXi500-201205001を適用します。
ゲストOSはシャットダウンしておきます。

# esxcli software vib install -d /vmfs/volumes/softsv_vm/esxi5.0/patch/ESXi500-201205001.zip

Installation Result
   Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
   Reboot Required: true
   VIBs Installed: VMware_bootbank_esx-base_5.0.0-1.13.702118
   VIBs Removed: VMware_bootbank_esx-base_5.0.0-1.11.623860
   VIBs Skipped: VMware_bootbank_ata-pata-amd_0.3.10-3vmw.500.0.0.469512, VMware_bootbank_ata-pata-atiixp_0.4.6-3vmw.500.0.0.469512,
VMware_bootbank_ata-pata-cmd64x_0.2.5-3vmw.500.0.0.469512,
VMware_bootbank_ata-pata-hpt3x2n_0.3.4-3vmw.500.0.0.469512,
VMware_bootbank_ata-pata-pdc2027x_1.0-3vmw.500.0.0.469512,
VMware_bootbank_ata-pata-serverworks_0.4.3-3vmw.500.0.0.469512,
VMware_bootbank_ata-pata-sil680_0.4.8-3vmw.500.0.0.469512,
VMware_bootbank_ata-pata-via_0.3.3-2vmw.500.0.0.469512,
VMware_bootbank_block-cciss_3.6.14-10vmw.500.0.0.469512,
VMware_bootbank_ehci-ehci-hcd_1.0-3vmw.500.1.11.623860,
VMware_bootbank_esx-tboot_5.0.0-0.0.469512,
VMware_bootbank_ima-qla4xxx_2.01.07-1vmw.500.0.0.469512,
VMware_bootbank_ipmi-ipmi-devintf_39.1-4vmw.500.0.0.469512,
VMware_bootbank_ipmi-ipmi-msghandler_39.1-4vmw.500.0.0.469512,
VMware_bootbank_ipmi-ipmi-si-drv_39.1-4vmw.500.0.0.469512,
VMware_bootbank_misc-cnic-register_1.1-1vmw.500.0.0.469512,
VMware_bootbank_misc-drivers_5.0.0-1.11.623860,
VMware_bootbank_net-be2net_4.0.88.0-1vmw.500.0.7.515841,
VMware_bootbank_net-bnx2_2.0.15g.v50.11-5vmw.500.0.0.469512,
VMware_bootbank_net-bnx2x_1.61.15.v50.1-1vmw.500.0.0.469512,
VMware_bootbank_net-cnic_1.10.2j.v50.7-2vmw.500.0.0.469512,
VMware_bootbank_net-e1000_8.0.3.1-2vmw.500.0.7.515841,
VMware_bootbank_net-e1000e_1.1.2-3vmw.500.1.11.623860,
VMware_bootbank_net-enic_1.4.2.15a-1vmw.500.0.0.469512,
VMware_bootbank_net-forcedeth_0.61-2vmw.500.0.0.469512,
VMware_bootbank_net-igb_2.1.11.1-3vmw.500.0.0.469512,
VMware_bootbank_net-ixgbe_2.0.84.8.2-10vmw.500.0.0.469512,
VMware_bootbank_net-nx-nic_4.0.557-3vmw.500.1.11.623860,
VMware_bootbank_net-r8168_8.013.00-3vmw.500.0.0.469512,
VMware_bootbank_net-r8169_6.011.00-2vmw.500.0.0.469512,
VMware_bootbank_net-s2io_2.1.4.13427-3vmw.500.0.0.469512,
VMware_bootbank_net-sky2_1.20-2vmw.500.0.0.469512,
VMware_bootbank_net-tg3_3.110h.v50.4-4vmw.500.0.0.469512,
VMware_bootbank_ohci-usb-ohci_1.0-3vmw.500.0.0.469512,
VMware_bootbank_sata-ahci_3.0-6vmw.500.1.11.623860,
VMware_bootbank_sata-ata-piix_2.12-4vmw.500.1.11.623860,
VMware_bootbank_sata-sata-nv_3.5-3vmw.500.0.0.469512,
VMware_bootbank_sata-sata-promise_2.12-3vmw.500.0.0.469512,
VMware_bootbank_sata-sata-sil_2.3-3vmw.500.0.0.469512,
VMware_bootbank_sata-sata-svw_2.3-3vmw.500.0.0.469512,
VMware_bootbank_scsi-aacraid_1.1.5.1-9vmw.500.1.11.623860,
VMware_bootbank_scsi-adp94xx_1.0.8.12-6vmw.500.0.0.469512,
VMware_bootbank_scsi-aic79xx_3.1-5vmw.500.0.0.469512,
VMware_bootbank_scsi-bnx2i_1.9.1d.v50.1-3vmw.500.0.0.469512,
VMware_bootbank_scsi-fnic_1.5.0.3-1vmw.500.0.0.469512,
VMware_bootbank_scsi-hpsa_5.0.0-17vmw.500.0.0.469512,
VMware_bootbank_scsi-ips_7.12.05-4vmw.500.0.0.469512,
VMware_bootbank_scsi-lpfc820_8.2.2.1-18vmw.500.0.0.469512,
VMware_bootbank_scsi-megaraid-mbox_2.20.5.1-6vmw.500.0.0.469512,
VMware_bootbank_scsi-megaraid-sas_5.34-1vmw.500.1.11.623860,
VMware_bootbank_scsi-megaraid2_2.00.4-9vmw.500.0.0.469512,
VMware_bootbank_scsi-mpt2sas_06.00.00.00-6vmw.500.1.11.623860,
VMware_bootbank_scsi-mptsas_4.23.01.00-5vmw.500.0.0.469512,
VMware_bootbank_scsi-mptspi_4.23.01.00-5vmw.500.0.0.469512,
VMware_bootbank_scsi-qla2xxx_901.k1.1-14vmw.500.0.0.469512,
VMware_bootbank_scsi-qla4xxx_5.01.03.2-3vmw.500.0.0.469512,
VMware_bootbank_scsi-rste_2.0.2.0088-1vmw.500.1.11.623860,
VMware_bootbank_uhci-usb-uhci_1.0-3vmw.500.0.0.469512,
VMware_locker_tools-light_5.0.0-1.12.653509

再起動です。
# reboot


起動後はESXi500-201206001の適用です。

# esxcli software vib install -d /vmfs/volumes/softsv_vm/esxi5.0/patch/ESXi500-201206001.zip

Installation Result
   Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
   Reboot Required: true
   VIBs Installed: VMware_bootbank_esx-base_5.0.0-1.16.721882
   VIBs Removed: VMware_bootbank_esx-base_5.0.0-1.13.702118
   VIBs Skipped: VMware_bootbank_ata-pata-amd_0.3.10-3vmw.500.0.0.469512, VMware_bootbank_ata-pata-atiixp_0.4.6-3vmw.500.0.0.469512,
VMware_bootbank_ata-pata-cmd64x_0.2.5-3vmw.500.0.0.469512,
VMware_bootbank_ata-pata-hpt3x2n_0.3.4-3vmw.500.0.0.469512,
VMware_bootbank_ata-pata-pdc2027x_1.0-3vmw.500.0.0.469512,
VMware_bootbank_ata-pata-serverworks_0.4.3-3vmw.500.0.0.469512,
VMware_bootbank_ata-pata-sil680_0.4.8-3vmw.500.0.0.469512,
VMware_bootbank_ata-pata-via_0.3.3-2vmw.500.0.0.469512,
VMware_bootbank_block-cciss_3.6.14-10vmw.500.0.0.469512,
VMware_bootbank_ehci-ehci-hcd_1.0-3vmw.500.1.11.623860,
VMware_bootbank_esx-tboot_5.0.0-0.0.469512,
VMware_bootbank_ima-qla4xxx_2.01.07-1vmw.500.0.0.469512,
VMware_bootbank_ipmi-ipmi-devintf_39.1-4vmw.500.0.0.469512,
VMware_bootbank_ipmi-ipmi-msghandler_39.1-4vmw.500.0.0.469512,
VMware_bootbank_ipmi-ipmi-si-drv_39.1-4vmw.500.0.0.469512,
VMware_bootbank_misc-cnic-register_1.1-1vmw.500.0.0.469512,
VMware_bootbank_misc-drivers_5.0.0-1.11.623860,
VMware_bootbank_net-be2net_4.0.88.0-1vmw.500.0.7.515841,
VMware_bootbank_net-bnx2_2.0.15g.v50.11-5vmw.500.0.0.469512,
VMware_bootbank_net-bnx2x_1.61.15.v50.1-1vmw.500.0.0.469512,
VMware_bootbank_net-cnic_1.10.2j.v50.7-2vmw.500.0.0.469512,
VMware_bootbank_net-e1000_8.0.3.1-2vmw.500.0.7.515841,
VMware_bootbank_net-e1000e_1.1.2-3vmw.500.1.11.623860,
VMware_bootbank_net-enic_1.4.2.15a-1vmw.500.0.0.469512,
VMware_bootbank_net-forcedeth_0.61-2vmw.500.0.0.469512,
VMware_bootbank_net-igb_2.1.11.1-3vmw.500.0.0.469512,
VMware_bootbank_net-ixgbe_2.0.84.8.2-10vmw.500.0.0.469512,
VMware_bootbank_net-nx-nic_4.0.557-3vmw.500.1.11.623860,
VMware_bootbank_net-r8168_8.013.00-3vmw.500.0.0.469512,
VMware_bootbank_net-r8169_6.011.00-2vmw.500.0.0.469512,
VMware_bootbank_net-s2io_2.1.4.13427-3vmw.500.0.0.469512,
VMware_bootbank_net-sky2_1.20-2vmw.500.0.0.469512,
VMware_bootbank_net-tg3_3.110h.v50.4-4vmw.500.0.0.469512,
VMware_bootbank_ohci-usb-ohci_1.0-3vmw.500.0.0.469512,
VMware_bootbank_sata-ahci_3.0-6vmw.500.1.11.623860,
VMware_bootbank_sata-ata-piix_2.12-4vmw.500.1.11.623860,
VMware_bootbank_sata-sata-nv_3.5-3vmw.500.0.0.469512,
VMware_bootbank_sata-sata-promise_2.12-3vmw.500.0.0.469512,
VMware_bootbank_sata-sata-sil_2.3-3vmw.500.0.0.469512,
VMware_bootbank_sata-sata-svw_2.3-3vmw.500.0.0.469512,
VMware_bootbank_scsi-aacraid_1.1.5.1-9vmw.500.1.11.623860,
VMware_bootbank_scsi-adp94xx_1.0.8.12-6vmw.500.0.0.469512,
VMware_bootbank_scsi-aic79xx_3.1-5vmw.500.0.0.469512,
VMware_bootbank_scsi-bnx2i_1.9.1d.v50.1-3vmw.500.0.0.469512,
VMware_bootbank_scsi-fnic_1.5.0.3-1vmw.500.0.0.469512,
VMware_bootbank_scsi-hpsa_5.0.0-17vmw.500.0.0.469512,
VMware_bootbank_scsi-ips_7.12.05-4vmw.500.0.0.469512,
VMware_bootbank_scsi-lpfc820_8.2.2.1-18vmw.500.0.0.469512,
VMware_bootbank_scsi-megaraid-mbox_2.20.5.1-6vmw.500.0.0.469512,
VMware_bootbank_scsi-megaraid-sas_5.34-1vmw.500.1.11.623860,
VMware_bootbank_scsi-megaraid2_2.00.4-9vmw.500.0.0.469512,
VMware_bootbank_scsi-mpt2sas_06.00.00.00-6vmw.500.1.11.623860,
VMware_bootbank_scsi-mptsas_4.23.01.00-5vmw.500.0.0.469512,
VMware_bootbank_scsi-mptspi_4.23.01.00-5vmw.500.0.0.469512,
VMware_bootbank_scsi-qla2xxx_901.k1.1-14vmw.500.0.0.469512,
VMware_bootbank_scsi-qla4xxx_5.01.03.2-3vmw.500.0.0.469512,
VMware_bootbank_scsi-rste_2.0.2.0088-1vmw.500.1.11.623860,
VMware_bootbank_uhci-usb-uhci_1.0-3vmw.500.0.0.469512,
VMware_locker_tools-light_5.0.0-1.12.653509

またまた再起動です。
# reboot

最後のパッチESXi500-201207001です。

# esxcli software vib install -d /vmfs/volumes/softsv_vm/esxi5.0/patch/ESXi500-201207001.zip

Installation Result
   Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.
   Reboot Required: true
   VIBs Installed: VMware_bootbank_esx-base_5.0.0-1.18.768111,
VMware_bootbank_misc-drivers_5.0.0-1.18.768111,
VMware_bootbank_net-e1000_8.0.3.1-2vmw.500.1.18.768111,
VMware_bootbank_scsi-mptsas_4.23.01.00-5vmw.500.1.18.768111,
VMware_locker_tools-light_5.0.0-1.18.768111
   VIBs Removed: VMware_bootbank_esx-base_5.0.0-1.16.721882,
VMware_bootbank_misc-drivers_5.0.0-1.11.623860,
VMware_bootbank_net-e1000_8.0.3.1-2vmw.500.0.7.515841,
VMware_bootbank_scsi-mptsas_4.23.01.00-5vmw.500.0.0.469512,
VMware_locker_tools-light_5.0.0-1.12.653509
   VIBs Skipped: VMware_bootbank_ata-pata-amd_0.3.10-3vmw.500.0.0.469512,
VMware_bootbank_ata-pata-atiixp_0.4.6-3vmw.500.0.0.469512,
VMware_bootbank_ata-pata-cmd64x_0.2.5-3vmw.500.0.0.469512,
VMware_bootbank_ata-pata-hpt3x2n_0.3.4-3vmw.500.0.0.469512,
VMware_bootbank_ata-pata-pdc2027x_1.0-3vmw.500.0.0.469512,
VMware_bootbank_ata-pata-serverworks_0.4.3-3vmw.500.0.0.469512,
VMware_bootbank_ata-pata-sil680_0.4.8-3vmw.500.0.0.469512,
VMware_bootbank_ata-pata-via_0.3.3-2vmw.500.0.0.469512,
VMware_bootbank_block-cciss_3.6.14-10vmw.500.0.0.469512,
VMware_bootbank_ehci-ehci-hcd_1.0-3vmw.500.1.11.623860,
VMware_bootbank_esx-tboot_5.0.0-0.0.469512,
VMware_bootbank_ima-qla4xxx_2.01.07-1vmw.500.0.0.469512,
VMware_bootbank_ipmi-ipmi-devintf_39.1-4vmw.500.0.0.469512,
VMware_bootbank_ipmi-ipmi-msghandler_39.1-4vmw.500.0.0.469512,
VMware_bootbank_ipmi-ipmi-si-drv_39.1-4vmw.500.0.0.469512,
VMware_bootbank_misc-cnic-register_1.1-1vmw.500.0.0.469512,
VMware_bootbank_net-be2net_4.0.88.0-1vmw.500.0.7.515841,
VMware_bootbank_net-bnx2_2.0.15g.v50.11-5vmw.500.0.0.469512,
VMware_bootbank_net-bnx2x_1.61.15.v50.1-1vmw.500.0.0.469512,
VMware_bootbank_net-cnic_1.10.2j.v50.7-2vmw.500.0.0.469512,
VMware_bootbank_net-e1000e_1.1.2-3vmw.500.1.11.623860,
VMware_bootbank_net-enic_1.4.2.15a-1vmw.500.0.0.469512,
VMware_bootbank_net-forcedeth_0.61-2vmw.500.0.0.469512,
VMware_bootbank_net-igb_2.1.11.1-3vmw.500.0.0.469512,
VMware_bootbank_net-ixgbe_2.0.84.8.2-10vmw.500.0.0.469512,
VMware_bootbank_net-nx-nic_4.0.557-3vmw.500.1.11.623860,
VMware_bootbank_net-r8168_8.013.00-3vmw.500.0.0.469512,
VMware_bootbank_net-r8169_6.011.00-2vmw.500.0.0.469512,
VMware_bootbank_net-s2io_2.1.4.13427-3vmw.500.0.0.469512,
VMware_bootbank_net-sky2_1.20-2vmw.500.0.0.469512,
VMware_bootbank_net-tg3_3.110h.v50.4-4vmw.500.0.0.469512,
VMware_bootbank_ohci-usb-ohci_1.0-3vmw.500.0.0.469512,
VMware_bootbank_sata-ahci_3.0-6vmw.500.1.11.623860,
VMware_bootbank_sata-ata-piix_2.12-4vmw.500.1.11.623860,
VMware_bootbank_sata-sata-nv_3.5-3vmw.500.0.0.469512,
VMware_bootbank_sata-sata-promise_2.12-3vmw.500.0.0.469512,
VMware_bootbank_sata-sata-sil_2.3-3vmw.500.0.0.469512,
VMware_bootbank_sata-sata-svw_2.3-3vmw.500.0.0.469512,
VMware_bootbank_scsi-aacraid_1.1.5.1-9vmw.500.1.11.623860,
VMware_bootbank_scsi-adp94xx_1.0.8.12-6vmw.500.0.0.469512,
VMware_bootbank_scsi-aic79xx_3.1-5vmw.500.0.0.469512,
VMware_bootbank_scsi-bnx2i_1.9.1d.v50.1-3vmw.500.0.0.469512,
VMware_bootbank_scsi-fnic_1.5.0.3-1vmw.500.0.0.469512,
VMware_bootbank_scsi-hpsa_5.0.0-17vmw.500.0.0.469512,
VMware_bootbank_scsi-ips_7.12.05-4vmw.500.0.0.469512,
VMware_bootbank_scsi-lpfc820_8.2.2.1-18vmw.500.0.0.469512,
VMware_bootbank_scsi-megaraid-mbox_2.20.5.1-6vmw.500.0.0.469512,
VMware_bootbank_scsi-megaraid-sas_5.34-1vmw.500.1.11.623860,
VMware_bootbank_scsi-megaraid2_2.00.4-9vmw.500.0.0.469512,
VMware_bootbank_scsi-mpt2sas_06.00.00.00-6vmw.500.1.11.623860,
VMware_bootbank_scsi-mptspi_4.23.01.00-5vmw.500.0.0.469512,
VMware_bootbank_scsi-qla2xxx_901.k1.1-14vmw.500.0.0.469512,
VMware_bootbank_scsi-qla4xxx_5.01.03.2-3vmw.500.0.0.469512,
VMware_bootbank_scsi-rste_2.0.2.0088-1vmw.500.1.11.623860,
VMware_bootbank_uhci-usb-uhci_1.0-3vmw.500.0.0.469512

最後の再起動です。
# reboot


起動後はメンテナンスモードを終了します。
この時点ではゲストOSの自動起動はされておりません。



自動起動を確認するにはメンテナンスモード終了後にホストを再起動してみましょう。


最後の仕上げに各ゲストのVMware Toolsのアップグレードをして完了です。

 








2012年6月8日金曜日

Redmine2.0.1から2.0.2へアップデート

Ruby on Railsの脆弱性が見つかったようでRedmine2.0.2がリリース

Redmine2.0.1を構築したばかりなのに・・・構築はこちらです
でもまだ運用至っていないので、アップデートしちゃいます。
尚、プラグインや外部テーマは一切使用していない状態です。

環境を簡単に説明すると
CentOS6.2(x86)
Apache 2.2.22+Passenger
PostgreSQL9.1.3
※Apache, PostgreSQLはソースからインストール

http://www.redmine.org/projects/redmine/wiki/RedmineUpgradeを参考にアップデート


●Redmine2.0.1のバックアップ

Redmineソース
# mv /home/redmine/public_html /home/redmine/public_html_2.0.1

データベース(PostgreSQL9.1)
データベース名:redmine
ユーザー名:redmine
# /usr/local/pgsql/bin/pg_dump -U redmine -Fc redmine > /home/redmine/public_html_2.0.1/v201_db_`date +%Y%m%d`.dump

v201_db_今日の日付(db_20120608.dump)というスタイルでバックアップファイルが作成されます。


●Redmine2.0.2の配置

ディレクトリの作成
# mkdir /home/redmine/public_html
# chmod 775 /home/redmine/public_html

RedmineはTarボールを利用
ダウンロード先はhttp://rubyforge.org/frs/?group_id=1850を参照
# cd /usr/local/src
# wget http://rubyforge.org/frs/download.php/76189/redmine-2.0.2.tar.gz
# tar zxvf redmine-2.0.2.tar.gz
# mv ./redmine-2.0.2/* /home/redmine/public_html/

設定ファイル等のコピー(プラグインは考慮していない)
# cp /home/redmine/public_html_2.0.1/config/database.yml /home/redmine/public_html/config/

# cp /home/redmine/public_html_2.0.1/config/configuration.yml /home/redmine/public_html/config/

ログ制御
# cp /home/redmine/public_html_2.0.1/config/additional_environment.rb /home/redmine/public_html/config/

添付ファイル # cp /home/redmine/public_html_2.0.1/files/* /home/redmine/public_html/files/

追加したテーマ
# cp -R /home/redmine/public_html_2.2.0/public/themes/farend_fancy /home/redmine/public_html/public/themes/

passengerで稼働しているためApacheユーザーに権限を与える
# chown -R daemon:daemon /home/redmine/public_html

Gemパッケージ(Railsが3.2.5になります)
# cd /home/redmine/public_html
# bundle install --without development test mysql sqlite →DBがPostgreSQLの場合
# bundle install --without development test postgresql sqlite →DBがMySQLの場合
Using rake (0.9.2.2) 
Using i18n (0.6.0) 
Using multi_json (1.3.6) 
Installing activesupport (3.2.5) 
Using builder (3.0.0) 
Installing activemodel (3.2.5) 
Using erubis (2.7.0) 
Using journey (1.0.3) 
Using rack (1.4.1) 
Using rack-cache (1.2) 
Using rack-test (0.6.1) 
Using hike (1.2.1) 
Using tilt (1.3.3) 
Using sprockets (2.1.3) 
Installing actionpack (3.2.5) 
Using mime-types (1.18) 
Using polyglot (0.3.3) 
Using treetop (1.4.10) 
Using mail (2.4.4) 
Installing actionmailer (3.2.5) 
Using arel (3.0.2) 
Using tzinfo (0.3.33) 
Installing activerecord (3.2.5) 
Installing activeresource (3.2.5) 
Using bundler (1.1.4) 
Using coderay (1.0.6) 
Using json (1.7.3) 
Using net-ldap (0.3.1) 
Using pg (0.13.2) 
Using rack-ssl (1.3.2) 
Using rdoc (3.12) 
Installing thor (0.15.2) 
Installing railties (3.2.5) 
Installing rails (3.2.5) 
Using prototype-rails (3.2.1) 
Using ruby-openid (2.1.8) 
Using rack-openid (1.3.1) 
Using rmagick (2.13.1) 
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

# rake generate_secret_token
# rake db:migrate RAILS_ENV=production 
# rake redmine:plugins:migrate RAILS_ENV=production
# rake tmp:cache:clear
# rake tmp:sessions:clear


passengerで稼働しているためApacheユーザーに権限を与える
# chown -R daemon:daemon /home/redmine/public_html


Apacheの再起動

Redmine 2.0.2 + PostgreSQL

以上で完了

※2.1系、2.2系でも同じ手順で大丈夫と思われます。

<PostgreSQL 参考>
ちなみにバックアップしたデータベースの復元方法です。


データベース名:redmine
ユーザー名:user1
バックアップ名:v202_dbbackup.dump


1.空のデータベースを作成

原則としてrootでは作業できませんので、PostgreSQLを運用しているユーザで行います。(私はpostgresというユーザで運用しています)

# su - postgres

$ createdb redmine --owner=user1 --encoding=UTF8 --template=template0


2.復元

[postgres@localhost]$ pg_restore -d redmine ./v202_dbbackup.dump

これでOKです。
 



2012年5月29日火曜日

CentOS6にRedmine2.0&PostgreSQL9.1

Redmine+PosgtreSQL+Apache+Passenger

  • Redmine:2.0.1
  • OS:  CentOS-6.2(x86) Minimal構成
  • Web: Apache-2.2.22(ソースから) Passenger実行
  • DB:  PostgreSQL-9.1.3(ソースから)
  • Ruby: Ruby1.9.3-p194(ソースから)
  • Rails: 3.2.3(Ruby同梱)
Redmineは/home/redmine/public_html以下に配置します。
※ApacheのUserDirを有効にする
 
2012/06/05 redmine 2.0.2がリリース→2.0.1を2.0.2へのアップデートはこちら
2012/06/19 redmine 2.0.3がリリース(以下と同様の手順でOK)

OSのインストール

ここでは構築手順を割愛させて頂きますが以下で構築したものをベースにしております。
VMwareにテキストモードでインストールしたのもですが多少は参考になるかと思います。
http://stdman.blogspot.jp/2011/12/centos6.html

構成内容
・IPv6:OFF
・パッケージ群:Base,Development Tools
・有効サービス:crond,iptables,network,ntpd,postfix,rsyslog,sshd,cpuspeed,irqbalance
・FireWall:enable → customでSSH,WWW(HTTP)をON,Forward設定なし

●必要パッケージやリポジトリをインストール

Rubyのビルドで必要なEPELリポジトリのインストール
http://ftp.riken.jp/Linux/fedora/epel/6/i386/repoview/epel-release.htmlからRPMのダウンロード先リンクを取得します。
 
# rpm -Uvh http://ftp.riken.jp/Linux/fedora/epel/6/i386/epel-release-6-7.noarch.rpm

Retrieving http://ftp.riken.jp/Linux/fedora/epel/6/i386/epel-release-6-7.noarch.rpm
warning: /var/tmp/rpm-tmp.ZZztWP: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing...                ########################################### [100%]
   1:epel-release           ########################################### [100%]

EPELレポジトリのGPGキーのインポート
# rpm --import http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6
 
EPELレポジトリのGPGキーの確認
# rpm -q 'gpg-pubkey-*' --qf '%{name} -> %{summary}\n'

gpg-pubkey - >  gpg(CentOS-6 Key (CentOS 6 Official Signing Key) )
gpg-pubkey - >  gpg(EPEL (6) )

開発パッケージが必要になりますのでインストールください。
# yum groupinstall "Development Tools"
# yum install openssl-devel readline-devel zlib-devel curl-devel libyaml-devel ImageMagick ImageMagick-devel
※libyamlとlibyaml-develがEPELレポジトリから取得されました
 

●Apacheのインストール

ソースからインストールしています。
詳しくはこちらのインストールを参考にして頂ければと思います。

/usr/local/apacheにインストール、UserDir有効
 

●PostgreSQLのインストール

ソースからインストールしています。
詳しくはこちらのインストールを参考にして頂ければと思います。
/usr/local/pgsqlにインストール、dataはpgsqlの直下
またPL/pgsqlが必要ですが9.0以降はデフォルトでインストールされます。
 
DB名:redmine、ユーザ:redmine、パスワード:redmineを作成しておきます。
 
--------------------------------------------------------
postgresqlのユーザで実行
$ createuser -P redmine
Enter password for new role: 
Enter it again: 
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) y
Shall the new role be allowed to create more new roles? (y/n) n
 
allowed to create more new roles? (y/n) n
 
$ createdb redmine --owner=redmine --encoding=UTF8 --template=template0
--------------------------------------------------------
DB作成が終わったらrootに戻りましょう。
$ exit
 

●Ruby 1.9.3のインストール

# cd /usr/local/src
# wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz
# tar zxvf ./ruby-1.9.3-p194.tar.gz
# cd ./ruby-1.9.3-p194
# ./configure
# make
# make install
# ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]

●Rubygems(Rubyに同梱されています)

# gem -v
1.8.23

●bundlerのインストール

# gem install bundler --no-rdoc --no-ri
Fetching: bundler-1.1.4.gem (100%)
Successfully installed bundler-1.1.4
1 gem installed

●Redmineのインストール


公開ディレクトリ
# useradd redmine ※ユーザを作成するとpublic_htmlが自動的に作成されるようしている
# chmod 755 /home/redmine
# chmod 775 /home/redmine/public_html
 
# cd /usr/local/src
# wget http://rubyforge.org/frs/download.php/76154/redmine-2.0.1.tar.gz
http://rubyforge.org/frs/?group_id=1850で確認してください。

# tar zxvf redmine-2.0.1.tar.gz 
# mv ./redmine-2.0.1/* /home/redmine/public_html/
 
DBへの接続設定
# cp /home/redmine/public_html/config/database.yml.example /home/redmine/public_html/config/database.yml
 
# vi /home/redmine/public_html/config/database.yml
コメント
#production:
#  adapter: mysql
#  database: redmine
#  host: localhost
#  username: root
#  password:
#  encoding: utf8
追記
production:
  adapter: postgresql
  database: redmine #DB名
  host: localhost #接続先
  username: redmine #DBユーザ
  password: "redmine" #ユーザパスワード
 
Mailの設定
# cp /home/redmine/public_html/config/configuration.yml.example /home/redmine/public_html/config/configuration.yml
 
# vi /home/redmine/public_html/config/configuration.yml
 
ここではlocalhost上のSMTPサーバを利用した例です。
詳しくはRedmine.JP様のページを参考にして頂くとわかりやすいと思います。
 
下の方にproduction:だけが記述されている部分があるのでそこへ追記します。(わかりずらい)

# specific configuration options for production environment
# that overrides the default ones

production:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      address: "localhost"
      port: 25
      domain: redmine.example.com

ちなみに自社では自前のメールサーバがありLAN上から参照できます。なのでこんな感じです。
production:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      address: "10.1.1.190"
      port: 25
      domain: 自社ドメイン

●Gem pgのインストール

PostgreSQLはソースからインストールしたのでパスを読み込んでから実行する必要がある。

# export PATH=$PATH:/usr/local/pgsql/bin
# gem install pg -- --with-pg-dir=/usr/local/pgsql/ --with-pg-lib=/usr/local/pgsql/lib/ --with-pg-include=/usr/local/pgsql/include/ --no-rdoc --no-ri
Building native extensions.  This could take a while...
Successfully installed pg-0.13.2
1 gem installed
Installing ri documentation for pg-0.13.2...
Installing RDoc documentation for pg-0.13.2...

redmine 2.0.3ではpg-0.14.0になります。

●その他Gemパッケージのインストール

Redmineで必要なパッケージを一括でインストールします。(Gemfileに記載されている
ここではDBにPostgreSQLを利用するため使わないMySQLやSQLLiteは不要とします。

# bundle install --without development test mysql sqlite
Could not locate Gemfile
 
あれ?Gemfileが見つからない?
 
探してみると・・・
# find / -name Gemfile

/usr/local/lib/ruby/gems/1.9.1/gems/prototype-rails-3.2.1/Gemfile
/usr/local/lib/ruby/gems/1.9.1/gems/rack-cache-1.2/Gemfile
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.1.4/lib/bundler/templates/Gemfile
/usr/local/lib/ruby/gems/1.9.1/gems/multi_json-1.3.6/Gemfile
/usr/local/lib/ruby/gems/1.9.1/gems/mail-2.4.4/Gemfile
/usr/local/lib/ruby/gems/1.9.1/gems/tilt-1.3.3/Gemfile
/usr/local/lib/ruby/gems/1.9.1/gems/arel-3.0.2/Gemfile
/usr/local/lib/ruby/gems/1.9.1/gems/rack-test-0.6.1/Gemfile
/usr/local/lib/ruby/gems/1.9.1/gems/journey-1.0.3/Gemfile
/usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.12/test/stub/rails_apps/3.0/empty/Gemfile
/usr/local/lib/ruby/gems/1.9.1/gems/json-1.7.3/Gemfile
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.3/lib/rails/generators/rails/app/templates/Gemfile
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.3/lib/rails/generators/rails/plugin_new/templates/Gemfile
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.2.3/guides/code/getting_started/Gemfile
/home/redmine/public_html/Gemfile
 
Redmineのルートディレクトリにあった・・・ということでルートディレクトリに移動してもう一度

# cd /home/redmine/public_html/
# bundle install --without development test mysql sqlite
Fetching gem metadata from http://rubygems.org/.......
Using rake (0.9.2.2) 
Using i18n (0.6.0) 
Using multi_json (1.3.6) 
Using activesupport (3.2.3) 
Using builder (3.0.0) 
Using activemodel (3.2.3) 
Using erubis (2.7.0) 
Using journey (1.0.3) 
Using rack (1.4.1) 
Using rack-cache (1.2) 
Using rack-test (0.6.1) 
Using hike (1.2.1) 
Using tilt (1.3.3) 
Using sprockets (2.1.3) 
Using actionpack (3.2.3) 
Using mime-types (1.18) 
Using polyglot (0.3.3) 
Using treetop (1.4.10) 
Using mail (2.4.4) 
Using actionmailer (3.2.3) 
Using arel (3.0.2) 
Using tzinfo (0.3.33) 
Using activerecord (3.2.3) 
Using activeresource (3.2.3) 
Using bundler (1.1.4) 
Using coderay (1.0.6) 
Using json (1.7.3) 
Using net-ldap (0.3.1) 
Using pg (0.13.2) 
Installing rack-ssl (1.3.2) 
Using rdoc (3.12) 
Installing thor (0.14.6) 
Installing railties (3.2.3) 
Installing rails (3.2.3) 
Installing prototype-rails (3.2.1) 
Installing ruby-openid (2.1.8) 
Installing rack-openid (1.3.1) 
Installing rmagick (2.13.1) with native extensions 
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

Post-install message from rdoc:
Depending on your version of ruby, you may need to install ruby rdoc/ri data:
 
<= 1.8.6 : unsupported
 = 1.8.7 : gem install rdoc-data; rdoc-data --install
 = 1.9.1 : gem install rdoc-data; rdoc-data --install
>= 1.9.2 : nothing to do! Yay!

redmine 2.0.2ではrails3.2.5になります。
redmine 2.0.3ではrails3.2.6になります。

●初期設定およびテーブル作成

# cd /home/redmine/public_html/

# rake generate_secret_token
rake db:migrate RAILS_ENV=production

●Passengerのインストール


# gem install passenger --no-rdoc --no-ri
Fetching: fastthread-1.0.7.gem (100%)
Building native extensions.  This could take a while...
Fetching: daemon_controller-1.0.0.gem (100%)
Fetching: passenger-3.0.12.gem (100%)
Successfully installed fastthread-1.0.7
Successfully installed daemon_controller-1.0.0
Successfully installed passenger-3.0.12
3 gems installed

redmine 2.0.3ではrails3.0.15になります。

●PassengerのApache用モジュールのインストール

Apacheはソースからインストールしたのでapxs2、path環境変数を設定する必要がある

# export APXS2=/usr/local/apache/bin/apxs
# export PATH=/usr/local/apache/bin:$PATH

# passenger-install-apache2-module
Welcome to the Phusion Passenger Apache 2 module installer, v3.0.12.
This installer will guide you through the entire installation process. It
shouldn't take more than 3 minutes in total.
 
Here's what you can expect from the installation process:
 
 1. The Apache 2 module will be installed for you.
 2. You'll learn how to configure Apache.
 3. You'll learn how to deploy a Ruby on Rails application.
 
Don't worry if anything goes wrong. This installer will advise you on how to
solve any problems.
 
Press Enter to continue, or Ctrl-C to abort.
 
Enterで進めていく

途中でnot foundが出たら解決して再度実行




Enjoy Phusion Passenger, a product of Phusion (www.phusion.nl) :-)
http://www.modrails.com/
 
Phusion Passenger is a trademark of Hongli Lai & Ninh Bui.

●Apache用設定ファイルの新規作成

設定ファイルの書き出し
# passenger-install-apache2-module --snippet > /usr/local/apache/conf/extra/passnger.conf
 
HTTPヘッダ削除、Passengerチューニングをpassnger.confへ(任意)
# vi /usr/local/apache/conf/extra/passnger.conf

LoadModule passenger_module /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.12/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.12
PassengerRuby /usr/local/bin/ruby

追記 # Passengerが追加するHTTPヘッダを削除
Header always unset "X-Powered-By"
Header always unset "X-Rack-Cache"
Header always unset "X-Content-Digest"
Header always unset "X-Runtime"

追記 # Passengerのチューニング設定
PassengerMaxPoolSize 20
PassengerMaxInstancesPerApp 4
PassengerPoolIdleTime 3600
PassengerUseGlobalQueue on
PassengerHighPerformance on
PassengerStatThrottleRate 10
RailsSpawnMethod smart
RailsAppSpawnerIdleTime 86400
RailsFrameworkSpawnerIdleTime 0
 
編集が終わったらhttpd.confでpassnger.confをIncludeさせるようにします。
# vi /usr/local/apache/conf/httpd.conf
最後にでも追記
Include conf/extra/passnger.conf
 
ついでにDocumentRootをRedmineとする
DocumentRoot "/home" → "/home/redmine/public_html/public"
 
Apacheのユーザが書き込みできるように設定してApacheを再起動
# chown -R daemon:daemon /home/redmine
# /usr/local/apache/bin/apachectl restart
 
これでIPアドレスによる接続はできると思いますので、初期設定のadmin(パスワード:admin)でログインしてみましょう。
※アクセスできない場合・・・ディレクトリパーミッション、selinuxOFF、iptablesで80ポート開放等をチェックしてみましょう。



ログイン後、上記メニューの「Administration」をクリックするとロール、トラッカー、チケットのステータス、ワークフローが設定されていないのでデフォルト設定をロードするよう勧められますので日本語を選択してロードしましょう。



一番下にある「Information」をクリックします。


Ver 2.0.1です。

Ver 2.0.2です。


●ログレベル・ログローテーション

デフォルトではデバックとなるため大量のログが吐き出されるので調整します。またローテーション設定してファイルが肥大化しないようします。
# cp /home/redmine/public_html/config/additional_environment.rb.example /home/redmine/public_html/config/additional_environment.rb

# vi /home/redmine/public_html/config/additional_environment.rb
config.logger = Logger.new(config.log_path, 2, 1000000)
config.logger.level = Logger::INFO
 
Apache再起動
# /usr/local/apache/bin/apachectl restart
 
あれ?ブラウザを見るとメソッドがないと怒られてしまう・・・とりあえずこれは後回しにしてコメントにしておこう
#config.logger = Logger.new(config.log_path, 2, 1000000)

#config.logger.level = Logger::INFO
 
ググってみたらログレベルは以下の記述方法が見つかりました。
config.log_level = :warn

ということでこの1行のみ記述しました。 
ちなみにレベルはunknown、error、fatal、warn、info、debugがあります。

仕方がないログのローテーションはOSのlogrotateを代用することにします。
ここでは1週間ごとにファイルを切り替え12世代(約3ヶ月)履歴を残すようにしています。
※Apacheが/usr/local/apacheにインストールされている場合です。

# vi /etc/logrotate.d/redmine

/home/redmine/public_html/log/*.log {
  rotate 12
  weekly
  missingok
  notifempty
  copytruncate

  postrotate
      /bin/kill -USR1 `cat /usr/local/apache/logs/httpd.pid 2>/dev/null` 2> /dev/null || true
  endscript

}
 

●EPELレポジトリの調整

標準レポジトリのパッケージがEPELレポジトリのパッケージで上書きされないよう基本的に無効化
 
# vi /etc/yum.repos.d/epel.repo
enabled=1のところを=0に変更
 
※yum-plugin-prioritiesをインストールしてEPELレポジトリのプライオリティを下げておくのもよい(以前RPMforgeリポジトリ導入で書いたので参考にして頂ければと思います)


●テーマを追加

Redmine.JP様で公開されている日本語環境でRedmineの画面を見やすくすることを目的としたテーマ「farend fancy」(farend basicの派生テーマ)を使えるようにします。

インストール方法は以下の2パターンからできます。

①gitレポジトリからの場合
# cd /home/redmine/public_html
# git clone git://github.com/farend/redmine_theme_farend_fancy.git public/themes/farend_fancy

Initialized empty Git repository in /home/redmine/public_html/public/themes/farend_fancy/.git/
remote: Counting objects: 195, done.
remote: Compressing objects: 100% (113/113), done.
remote: Total 195 (delta 75), reused 169 (delta 49)
Receiving objects: 100% (195/195), 49.21 KiB, done.
Resolving deltas: 100% (75/75), done.


②アーカイブからの場合
https://github.com/farend/redmine_theme_farend_fancy/downloadsからtar.gzをダウンロードして/usr/local/srcへ配置します。 
# cd /usr/local/src/
# tar zxvf farend-redmine_theme_farend_fancy-a77f7cd.tar.gz
# cp -R ./farend-redmine_theme_farend_fancy-a77f7c  /home/redmine/public_html/public/themes/farend_fancy

Apache再起動
# /usr/local/apache/bin/apachectl restart
 Redmineの管理画面から「管理」>「設定」>「表示」→テーマを Farend fancyに変更します。保存ボタンを押すのを忘れずに!
 

とりあえずこんなもんで構築は終わりでしょう。でも随分と構築が楽になりましたね!
 
<参考サイト>
本家Redmine:http://www.redmine.org/projects/redmine/wiki/RedmineInstall
Redmine.JP:http://blog.redmine.jp/articles/redmine-2_0-installation_centos/

Google検索