2012年1月30日月曜日

CentOS5.7でChiliProject


◆環境
CentOS5.7
最小パッケージ

◆RPMパッケージ
◆◆wget
◆◆git
rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
yum install git
◆◆ruby
・ruby本体
ruby-1.8.7.249-1.x86_64.rpm
・ruby-devel
ruby-devel-1.8.7.249-1.x86_64.rpm
・rubygemsインストール
ruby-irb-1.8.7.249-1.x86_64.rpm
ruby-libs-1.8.7.249-1.x86_64.rpm
ruby-rdoc-1.8.7.249-1.x86_64.rpm
rubygems-1.3.7-1.noarch.rpm
◆◆make
◆◆gcc
◆◆ImageMagick関連
yum install -y {libwmf,lcms,ghostscript,ImageMagick}{,-devel}
◆◆sqlite関連
yum install sqlite{,-devel}
◆◆rmagick用Microsoftコアフォント
# wget http://quattorsrv.lal.in2p3.fr/packages/lemon/sl-i386/msttcorefonts-2.0-1.noarch.rpm# rpm -ivh msttcorefonts-2.0-1.noarch.rpm # ln -s /usr/X11R6/lib/X11/fonts/truetype /usr/share/fonts/default/TrueType

◆mercurial
hgコマンドでプラグインを取得するため
yum install mercurial
◆gemパッケージ
gem install bundler


◆アプリ実行構成
CP2.7.0

◆ChiliProjectのダウンロード
git clone git://github.com/chiliproject/chiliproject.git cd chiliproject git checkout -b my-stable origin/stable  
◆ChiliProjectの導入設定
・gem環境構成
CPルートで
 bundle install --without test development
→CentOS5.7は最新のrmagickのgem構築に失敗するのでGemfileを編集
これはGemfile内に記載あり
→mysqlとpgのgem構築に失敗するのでGemfileをコメントアウト
 vi Gemfile
# diff Gemfile.bak Gemfile
30c30
< gem "rmagick", ">= 1.15.17"
---
> #gem "rmagick", ">= 1.15.17"
44c44
< #gem "rmagick", "< 2.0.0"
---
> gem "rmagick", "< 2.0.0"
55c55
< gem "mysql2", "~> 0.2.7"
---
> #gem "mysql2", "~> 0.2.7"
59c59
< gem "pg", "~> 0.9.0"
---
> #gem "pg", "~> 0.9.0"
66c66
< gem "mysql"
---
> #gem "mysql"
85c85
< gem "activerecord-jdbcmysql-adapter"
---
> #gem "activerecord-jdbcmysql-adapter"

・空のデータベースを作成する。(sqliteなので不要)
・config/database.yml
config/database.yml.exampleを参考にconfig/database.ymlを作成する
cp -p config/database.yml.example config/database.yml
vi config/database.yml
SQLiteの場合
production: adapter: sqlite3 database: db/chiliproject.db
・config/configuration.yml
config/configuration.yml.exampleを参考にconfig/configuration.ymlを作成する
cp -p config/configuration.yml.example config/configuration.yml
→とりあえずそのまま
・Generate a session store secret
bundle exec rake generate_session_store
・データベース基本構造を作成する
RAILS_ENV=production bundle exec rake db:migrate
・デフォルト設定データをデータベースに作成する
RAILS_ENV=production bundle exec rake redmine:load_default_data
・パーミッションを設定する
→Windowsでは不要
mkdir -p tmp public/plugin_assets sudo chown -R chiliproject:chiliproject files log tmp public/plugin_assets sudo chmod -R 755 files log tmp public/plugin_assets
・起動してみる
bundle exec script/server -e production -p 3300
◆Pluginインストール時の操作
・コピーする
・ディレクトリ名を適切にする
・DBを更新する
bundle exec rake db:migrate:plugins RAILS_ENV=production


◆Plugins
・パーキングロットチャート
git clone git://github.com/daipresents/redmine_parking_lot_chart.git
・redmine_absolute_dates
Redmineの作成日、更新日などの相対表現表示を絶対表現になおすプラグイン
git://github.com/suer/redmine_absolute_dates.git
・redmine_attachments_size
貼りつけているファイルの総サイズを表示するプラグイン
git://github.com/suer/redmine_attachments_size.git

Wikiでテンプレートを選択できるようにする
git://github.com/generaldesoftware/RedMine-plantillas-plugin.git

タグ付けできるようににする
git://github.com/friflaj/redmine_tagging.git
・Wikiの機能拡張
hg clone https://bitbucket.org/haru_iida/redmine_wiki_extensions

チケットをGETで書ける
hg clone https://code.google.com/p/redmine-post-link-plugin/

チケットからグラフ作成
git://github.com/tsukano/redmine_arrangeable_graph_maker.git
config/config.yml の中の「graph_font_path」の値として、日本語フォントまでのパスを指定。
・知識データベース
git://github.com/alexbevi/redmine_knowledgebase.git
・ミーティング管理
git://github.com/amartel/redmine_meetings.git
・ガントチャート改良
git://github.com/kulesa/redmine_better_gantt_chart.git
.リポジトリサーチ
redmine_reposearch
git://github.com/Surgo/redmine_reposearch
・設計変更を記録する
redmine_arch_decisions
git://github.com/bigokro/redmine_arch_decisions.git
・用語集
http://sourceforge.jp/projects/rp-glossary/downloads/53770/rp-glossary-0.6.1.zip/
・マイページ編集プラグイン
git://github.com/vividtone/redmine_vividtone_my_page_blocks.git

◆参考
https://www.chiliproject.org/projects/chiliproject/wiki/Download
https://www.chiliproject.org/projects/chiliproject/wiki/Installation

◆プラグインインストールメモ
・知識データベースredmine_knowledgebase
以下をインストールする必要あり
rubygemのacts-as-taggable-on
プラグインの
acts_as_taggable_on_steroids (http://github.com/jviney/acts_as_taggable_on_steroids)
git://github.com/jviney/acts_as_taggable_on_steroids.git

2012年1月21日土曜日

node.js試行1


node.jsのワンライナーWebサーバに衝撃を受けてnode.jsを始めてみる。
nave + npm + node.jsの構成でやってみる。
ついでにcoffeescriptも

【環境】
Lubuntu11.10

【準備】
以下のパッケージは入れておくこと
・git
・curl
・libssl-dev
・g++

!naveをインストール
naveの最新版をGithubからclone
$ cd ~/mytools
$ git clone http://github.com/isaacs/nave.git

!node.js
!!インストール
$ cd ~/mytools/nave
$ ./nave.sh install latest

!!使用するための設定(パスを通す)
$ ./nave.sh use latest

!npmインストール
→特に不要。npmコマンドがすぐに使えるはず。

!coffeescriptインストール
$ npm install -g coffee-script

!バージョン確認
$ node -v
v0.7.0

$ npm -v
1.1.0-2

$ coffee -v
CoffeeScript version 1.2.0