スポンサーサイト

 --------
上記の広告は1ヶ月以上更新のないブログに表示されています。
新しい記事を書く事で広告が消せます。
カテゴリ :スポンサー広告 トラックバック(-) コメント(-)
タグ :

アクセス解析OSSの「snowfinch」をインストール

 2011-06-18
オープンソースのリアルタイムWeb解析/モニタリングツール「Snowfinch」 - SourceForge.JP Magazine : オープンソースの話題満載
がどんなものか確認したいので、使ってみます。

rubyは1.9.2以降が推奨で、mongodbが必要になります。
まずはmongodbをインストールします。

mongodbのインストール


CentOS and Fedora Packages - MongoDB
からレポジトリの追加をして、yumでインストールします。

$ sudo yum install mongo-10gen-server
読み込んだプラグイン:fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
* fedora: ftp.cuhk.edu.hk
* updates: ftp.cuhk.edu.hk
インストール処理の設定をしています
依存性の解決をしています
--> トランザクションの確認を実行しています
---> パッケージ mongo-10gen-server.i686 0:1.8.1-mongodb_1 を更新に設定しました
--> 依存性の処理をしています: mongo-10gen のパッケージ: mongo-10gen-server-1.8.1-mongodb_1.i686
--> トランザクションの確認を実行しています
---> パッケージ mongo-10gen.i686 0:1.8.1-mongodb_1 を更新に設定しました
--> 依存性解決を終了しました

依存性を解決しました

==================================================================================================================
Package Arch Version Repository Size
==================================================================================================================
インストールしています:
mongo-10gen-server i686 1.8.1-mongodb_1 10gen 4.6 M
依存性関連でのインストールをします:
mongo-10gen i686 1.8.1-mongodb_1 10gen 21 M

Transaction Summary
==================================================================================================================
Install 2 Package(s)
Upgrade 0 Package(s)

総ダウンロード容量: 26 M
これでいいですか? [y/N]y
パッケージをダウンロードしています:
(1/2): mongo-10gen-1.8.1-mongodb_1.i686.rpm | 21 MB 00:56
(2/2): mongo-10gen-server-1.8.1-mongodb_1.i686.rpm | 4.6 MB 00:15
------------------------------------------------------------------------------------------------------------------
合計 360 kB/s | 26 MB 01:13
rpm_check_debug を実行しています
トランザクションのテストを実行しています
トランザクションのテストを終了しました
トランザクションのテストを成功しました
トランザクションを実行しています
インストールし : mongo-10gen-1.8.1-mongodb_1.i686 1/2
インストールし : mongo-10gen-server-1.8.1-mongodb_1.i686 2/2

インストールしました:
mongo-10gen-server.i686 0:1.8.1-mongodb_1

依存性関連をインストールしました:
mongo-10gen.i686 0:1.8.1-mongodb_1

完了しました!


次にrubyの1.9.2をインストールします。
まだrpmパッケージがないので、ビルドしてインストールします。

$ ./configure
$ make
$ sudo paco -D make install

pacoを使ってソフトウェアの管理をしています。


$ sudo gem install bundler

$ bundle install
Fetching source index for http://rubygems.org/
Enter your password to install the bundled RubyGems to your system:
Using rake (0.8.7)
Installing ZenTest (4.5.0)
Installing abstract (1.0.0)
Installing activesupport (3.0.7)
Installing builder (2.1.2)
Installing i18n (0.5.0)
Installing activemodel (3.0.7)
Installing erubis (2.6.6)
Installing rack (1.2.2)
Installing rack-mount (0.6.14)
Installing rack-test (0.5.7)
Installing tzinfo (0.3.27)
Installing actionpack (3.0.7)
Installing mime-types (1.16)
Installing polyglot (0.3.1)
Installing treetop (1.4.9)
Installing mail (2.2.19)
Installing actionmailer (3.0.7)
Installing arel (2.0.9)
Installing activerecord (3.0.7)
Installing activeresource (3.0.7)
Installing autotest (4.4.6)
Installing autotest-growl (0.2.9)
Installing bcrypt-ruby (2.1.4) with native extensions
Installing bson (1.3.0)
Installing bson_ext (1.3.0) with native extensions
Using bundler (1.0.15)
Installing celerity (0.8.9)
Installing culerity (0.2.15)
Installing nokogiri (1.4.4) with native extensions
Installing ffi (1.0.7) with native extensions
Installing childprocess (0.1.8)
Installing json_pure (1.5.1)
Installing rubyzip (0.9.4)
Installing selenium-webdriver (0.2.0)
Installing xpath (0.1.4)
Installing capybara (0.4.1.2)
Installing chalofa_ruby-progressbar (0.0.9.1)
Installing chunky_png (1.1.1)
Installing fssm (0.2.7)
Installing sass (3.1.1)
Installing compass (0.11.1)
Installing configuration (1.2.0)
Installing database_cleaner (0.6.7)
Installing orm_adapter (0.0.4)
Installing warden (1.0.3)
Installing devise (1.3.3)
Installing diff-lcs (1.1.2)
Installing rspec-core (2.5.1)
Installing rspec-expectations (2.5.0)
Installing rspec-mocks (2.5.0)
Installing rspec (2.5.0)
Installing email_spec (1.1.1)
Installing factory_girl (2.0.0.beta2)
Installing thor (0.14.6)
Installing railties (3.0.7)
Installing rails (3.0.7)
Installing factory_girl_rails (1.1.beta1)
Installing rspec-instafail (0.1.7)
Installing fuubar (0.0.4)
Installing haml (3.1.1)
Installing launchy (0.4.0)
Installing mongo (1.3.0)
Installing pg (0.11.0) with native extensions /usr/local/lib/ruby/1.9.1/rubygems/installer.rb:483:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

/usr/local/bin/ruby extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
--with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** 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-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/ruby
--with-pg
--without-pg
--with-pg-dir
--without-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/lib
--with-pg-config
--without-pg-config
--with-pg_config
--without-pg_config


Gem files will remain installed in /home/mikky3/.bundler/tmp/10729/gems/pg-0.11.0 for inspection.
Results logged to /home/mikky3/.bundler/tmp/10729/gems/pg-0.11.0/ext/gem_make.out
from /usr/local/lib/ruby/1.9.1/rubygems/installer.rb:486:in `block in build_extensions'
from /usr/local/lib/ruby/1.9.1/rubygems/installer.rb:446:in `each'
from /usr/local/lib/ruby/1.9.1/rubygems/installer.rb:446:in `build_extensions'
from /usr/local/lib/ruby/1.9.1/rubygems/installer.rb:198:in `install'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/source.rb:101:in `block in install'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/rubygems_integration.rb:78:in `preserve_paths'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/source.rb:91:in `install'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/installer.rb:58:in `block (2 levels) in run'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/rubygems_integration.rb:93:in `with_build_args'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/installer.rb:57:in `block in run'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12:in `block in each'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12:in `each'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/spec_set.rb:12:in `each'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/installer.rb:49:in `run'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/installer.rb:8:in `install'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/cli.rb:222:in `install'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/vendor/thor/task.rb:22:in `run'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/vendor/thor.rb:246:in `dispatch'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/vendor/thor/base.rb:389:in `start'
from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/bin/bundle:13:in `'
from /usr/local/bin/bundle:19:in `load'
from /usr/local/bin/bundle:19:in `
'


PostgresSQLも必要なみたいです。


$ sudo yum install postgresql-devel


$ bundle install
...
Installing pg (0.11.0) with native extensions
Installing radix62 (0.1.0)
Installing rspec-rails (2.5.0)
Installing shoulda-matchers (1.0.0.beta2)
Installing simple_form (1.3.1)
Installing simplecov-html (0.4.4)
Installing simplecov (0.4.2)
Installing snowfinch-collector (0.5.0)
Installing sqlite3 (1.3.3) with native extensions
Installing sqlite3-ruby (1.3.3)
Installing steak (1.1.0)
Installing timecop (0.3.5)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.


$ rake db:setup
(in /home/mikky3/dl/jcxplorer-snowfinch-ffe6032)
db/test.sqlite3 already exists
db/development.sqlite3 already exists
rake aborted!
Failed to connect to a master node at localhost:27017
/usr/local/lib/ruby/gems/1.9.1/gems/mongo-1.3.0/lib/mongo/connection.rb:494:in `connect'
/usr/local/lib/ruby/gems/1.9.1/gems/mongo-1.3.0/lib/mongo/connection.rb:632:in `setup'
/usr/local/lib/ruby/gems/1.9.1/gems/mongo-1.3.0/lib/mongo/connection.rb:101:in `initialize'
/home/mikky3/dl/jcxplorer-snowfinch-ffe6032/lib/mongo_ext.rb:7:in `new'
/home/mikky3/dl/jcxplorer-snowfinch-ffe6032/lib/mongo_ext.rb:7:in `db'
/home/mikky3/dl/jcxplorer-snowfinch-ffe6032/config/initializers/snowfinch.rb:4:in `'
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:235:in `load'
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:235:in `block in load'
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:225:in `block in load_d
ependency'
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:596:in `new_constants_i
n'
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:225:in `load_dependency
'
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:235:in `load'
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/engine.rb:201:in `block (2 levels) in '
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/engine.rb:200:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/engine.rb:200:in `block in '
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/initializable.rb:25:in `instance_exec'
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/initializable.rb:25:in `run'
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/initializable.rb:50:in `block in run_initializers'
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/initializable.rb:49:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/initializable.rb:49:in `run_initializers'
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/application.rb:134:in `initialize!'
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/application.rb:77:in `method_missing'
/home/mikky3/dl/jcxplorer-snowfinch-ffe6032/config/environment.rb:5:in `'
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `require'
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `block in require'
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:225:in `block in load_dependency'
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:596:in `new_constants_in'
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:225:in `load_dependency'
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-3.0.7/lib/active_support/dependencies.rb:239:in `require'
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/application.rb:103:in `require_environment!'
/usr/local/lib/ruby/gems/1.9.1/gems/railties-3.0.7/lib/rails/application.rb:217:in `block in initialize_tasks'
/usr/local/lib/ruby/1.9.1/rake.rb:634:in `call'
/usr/local/lib/ruby/1.9.1/rake.rb:634:in `block in execute'
/usr/local/lib/ruby/1.9.1/rake.rb:629:in `each'
/usr/local/lib/ruby/1.9.1/rake.rb:629:in `execute'
/usr/local/lib/ruby/1.9.1/rake.rb:595:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/usr/local/lib/ruby/1.9.1/rake.rb:588:in `invoke_with_call_chain'
/usr/local/lib/ruby/1.9.1/rake.rb:605:in `block in invoke_prerequisites'
/usr/local/lib/ruby/1.9.1/rake.rb:602:in `each'
/usr/local/lib/ruby/1.9.1/rake.rb:602:in `invoke_prerequisites'
/usr/local/lib/ruby/1.9.1/rake.rb:594:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/usr/local/lib/ruby/1.9.1/rake.rb:588:in `invoke_with_call_chain'
/usr/local/lib/ruby/1.9.1/rake.rb:605:in `block in invoke_prerequisites'
/usr/local/lib/ruby/1.9.1/rake.rb:602:in `each'
/usr/local/lib/ruby/1.9.1/rake.rb:602:in `invoke_prerequisites'
/usr/local/lib/ruby/1.9.1/rake.rb:594:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
/usr/local/lib/ruby/1.9.1/rake.rb:588:in `invoke_with_call_chain'
/usr/local/lib/ruby/1.9.1/rake.rb:581:in `invoke'
/usr/local/lib/ruby/1.9.1/rake.rb:2041:in `invoke_task'
/usr/local/lib/ruby/1.9.1/rake.rb:2019:in `block (2 levels) in top_level'
/usr/local/lib/ruby/1.9.1/rake.rb:2019:in `each'
/usr/local/lib/ruby/1.9.1/rake.rb:2019:in `block in top_level'
/usr/local/lib/ruby/1.9.1/rake.rb:2058:in `standard_exception_handling'
/usr/local/lib/ruby/1.9.1/rake.rb:2013:in `top_level'
/usr/local/lib/ruby/1.9.1/rake.rb:1992:in `run'
/usr/local/bin/rake:31:in `
'

原因がよく分からない

sqliteがだめっぽいのでproductionでやってみます。
$ sudo yum install postgresql-server
$ rake db:setup RAILS_ENV=production

これもだめ。

今日はここまで。

参考
"make install"したソフトウェアを管理できる超便利ツール「Paco」 - RX-7乗りの適当な日々
スポンサーサイト
タグ :
コメント












管理者にだけ表示を許可する
トラックバック
トラックバックURL:

http://mikky3.blog40.fc2.com/tb.php/152-df8077e7

≪ トップページへこのページの先頭へ  ≫
上記広告は1ヶ月以上更新のないブログに表示されています。新しい記事を書くことで広告を消せます。