メールはOK あとはredMine
昨日のMX設定情報が伝搬したようで、会社からVPS向けのメールは送受信を確認できた。
さて、問題はredMineだ。
どうしたものか。
installing binary commands /home/xxxxxxx/Downloads/ruby-1.8.7-p299/lib/fileutils.rb:846:in `utime': No such file or directory - /usr/lib/libruby-static.a (Errno::ENOENT)
と言う事で、/usr/lib/libruby*を確認
# ls -l /usr/lib/libruby* -rw-r--r-- 1 root root 2624068 7月 29 10:16 /usr/lib/libruby-static.a lrwxrwxrwx 1 root root 16 7月 28 15:12 /usr/lib/libruby.so.1.8 -> libruby.so.1.8.5 -rwxr-xr-x 1 root root 912808 1月 8 2010 /usr/lib/libruby.so.1.8.5 [root@yukikaze ruby-1.8.7-p299]# chmod +x /usr/lib/libruby-static.a
libruby-static.aに実行権限を付けたら、
installing binary commands installing command scripts installing library scripts /home/xxxxxx/Downloads/ruby-1.8.7-p299/lib/fileutils.rb:846:in `utime': No such file or directory - /usr/lib/ruby/1.8/set.rb (Errno::ENOENT)
に変わった。set.rb以外の*.rbも実行権限がついていなかったので
find /usr/lib/ruby/1.8/ -name "*.rb" -exec chmod +x {} \;
で実行権限を付けた。今度は
installing binary commands /home/kkijiya/Downloads/ruby-1.8.7-p299/lib/fileutils.rb:240:in `mkdir': File exists - /usr/lib/ruby/1.8/i686-linux (Errno::EEXIST)
ファイルがなきゃ無いで、ありゃ有ったで文句言いやがる。てかさっきよりも悪くなってない?binary commandsで止まっているものね。
とりあえず、i686-linuxを消してもう一度
installing binary commands installing command scripts installing library scripts /home/kkijiya/Downloads/ruby-1.8.7-p299/lib/fileutils.rb:846:in `utime': No such file or directory - /usr/lib/ruby/1.8/sync.rb (Errno::ENOENT)
でも、今度は
# ls -l /usr/lib/ruby/1.8/sync.rb -rwxr-xr-x 1 root root 6232 7月 29 10:30 /usr/lib/ruby/1.8/sync.rb
でちゃんと有るし、実行権限もついているし。何だぁ?
で、何の気無しに
# ls -lt /usr/lib/ruby/1.8/ 合計 1164 -rw-r--r-- 1 root root 6276 7月 29 10:30 i686-linux -rwxr-xr-x 1 root root 6232 7月 29 10:30 sync.rb -rwxr-xr-x 1 root root 27726 7月 29 10:19 set.rb drwxr-xr-x 4 root root 4096 7月 28 16:40 irb drwxr-xr-x 7 root root 4096 7月 28 16:40 rdoc drwxr-xr-x 3 root root 4096 7月 28 15:12 test drwxr-xr-x 2 root root 4096 7月 28 15:12 uri drwxr-xr-x 4 root root 4096 7月 28 15:12 webrick drwxr-xr-x 4 root root 4096 7月 28 15:12 wsdl drwxr-xr-x 2 root root 4096 7月 28 15:12 xmlrpc drwxr-xr-x 4 root root 4096 7月 28 15:12 xsd drwxr-xr-x 2 root root 4096 7月 28 15:12 yaml drwxr-xr-x 2 root root 4096 7月 28 15:12 bigdecimal drwxr-xr-x 3 root root 4096 7月 28 15:12 cgi drwxr-xr-x 2 root root 4096 7月 28 15:12 date drwxr-xr-x 2 root root 4096 7月 28 15:12 dl drwxr-xr-x 2 root root 4096 7月 28 15:12 drb drwxr-xr-x 5 root root 4096 7月 28 15:12 i386-linux drwxr-xr-x 2 root root 4096 7月 28 15:12 io drwxr-xr-x 2 root root 4096 7月 28 15:12 net drwxr-xr-x 2 root root 4096 7月 28 15:12 openssl drwxr-xr-x 2 root root 4096 7月 28 15:12 optparse drwxr-xr-x 2 root root 4096 7月 28 15:12 racc drwxr-xr-x 7 root root 4096 7月 28 15:12 rexml drwxr-xr-x 2 root root 4096 7月 28 15:12 rinda drwxr-xr-x 3 root root 4096 7月 28 15:12 rss drwxr-xr-x 3 root root 4096 7月 28 15:12 runit drwxr-xr-x 2 root root 4096 7月 28 15:12 shell drwxr-xr-x 6 root root 4096 7月 28 15:12 soap -rwxr-xr-x 1 root root 629 1月 8 2010 expect.rb -rwxr-xr-x 1 root root 261 1月 8 2010 md5.rb -rwxr-xr-x 1 root root 8327 1月 8 2010 kconv.rb -rwxr-xr-x 1 root root 526 1月 8 2010 openssl.rb -rwxr-xr-x 1 root root 269 1月 8 2010 sha1.rb
変だぞ、引っかかったset.rbやsync.rb,i686-Linuxの日付は今日だけど、それ以外は古い・・・。
# rpm -qa|grep ruby ruby-libs-1.8.5-5.el5_4.8 # rpm -e ruby-libs
昨日、rubyパッケージを削除した際の忘れ物だったのね。
道理で、まだインストールパッケージを作っている途中なのになぜ/usr/lib/rubyが存在するのか引っかかっては居たのよ。
そこで、もう一度make cleanしてmake;checkinstallを実行
installing binary commands /home/kkijiya/Downloads/ruby-1.8.7-p299/lib/fileutils.rb:846:in `utime': No such file or directory - /usr/lib/libruby-static.a (Errno::ENOENT)
orz 振り出しに戻った。
しかも今度は実行権限ちゃんとついているし。
あきらめて、make installしちゃった。
で、http://redmine.jp/tech_note/install/を参考に、本題のredMineのインストールを進める。
# cd /home/xxxxxx/Downloads/redmine-1.0.0/config # rake db:migrate RAILS_ENV="production" (in /home/kkijiya/Downloads/redmine-1.0.0) !!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql. rake aborted! no such file to load -- mysql (See full trace by running task with --trace) [root@yukikaze redmine-1.0.0]# gem install mysql Building native extensions. This could take a while... Successfully installed mysql-2.8.1 1 gem installed Installing ri documentation for mysql-2.8.1... No definition for next_result No definition for field_name
以降、No definitionが続いたがErrorになっていないのでOK?
rake db:migrate RAILS_ENV="production" (in /home/kkijiya/Downloads/redmine-1.0.0) == Setup: migrating ========================================================== -- create_table("attachments", {:force=>true}) -> 0.0546s -- create_table("auth_sources", {:force=>true}) -> 0.0054s : : == ChangeChangesPathLengthLimit: migrated (0.0186s) ========================== [root@yukikaze config]# rake redmine:load_default_data RAILS_ENV=production (in /home/kkijiya/Downloads/redmine-1.0.0) Select language: bg, bs, ca, cs, da, de, el, en, en-GB, es, eu, fi, fr, gl, he, hr, hu, id, it, ja, ko, lt, lv, mn, nl, no, pl, pt, pt-BR, ro, ru, sk, sl, sr, sr-CY, sv, th, tr, uk, vi, zh, zh-TW [en] ja ==================================== Default configuration data loaded.
どうやらDBも設定できたようなので、
script/server -e production &
で、redMineの画面が表示された。
adminのパスワードを変更したり、ユーザを追加、プロジェクトを追加してみて、何となくちゃんと動きそう。
良かったよぉ。
続いてredMineをApacheに組み込む。上記のURLの内容に従って、
# gem install passenger Building native extensions. This could take a while... Building native extensions. This could take a while... Successfully installed fastthread-1.0.7 Successfully installed passenger-2.2.15 2 gems installed Installing ri documentation for fastthread-1.0.7... No definition for dummy_dump No definition for dummy_dump :
とりあえず入った?
# passenger-install-apache2-module Welcome to the Phusion Passenger Apache 2 module installer, v2.2.15. 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. -------------------------------------------- Checking for required software... * GNU C++ compiler... not found * Ruby development headers... found * OpenSSL support for Ruby... found * RubyGems... found * Rake... found at /usr/bin/rake * rack... found * Apache 2... found at /usr/sbin/httpd * Apache 2 development headers... not found * Apache Portable Runtime (APR) development headers... not found * Apache Portable Runtime Utility (APU) development headers... not found Some required software is not installed. But don't worry, this installer will tell you how to install them. Press Enter to continue, or Ctrl-C to abort. -------------------------------------------- Installation instructions for required software * To install GNU C++ compiler: Please run yum install gcc-c++ as root. * To install Apache 2 development headers: Please run yum install httpd-devel as root. * To install Apache Portable Runtime (APR) development headers: Please run yum install apr-devel as root. * To install Apache Portable Runtime Utility (APU) development headers: Please download it from http://httpd.apache.org/ (APR Utility is an integrated part of Apache.) If the aforementioned instructions didn't solve your problem, then please take a look at the Users Guide: /usr/lib/ruby/gems/1.8/gems/passenger-2.2.15/doc/Users guide Apache.html
となるので、yumでgcc-c++とhttpd-develをインストールして再度
passenger-install-apache2-moduleを実行すると、なにやらコンパイルをして、
The Apache 2 module was successfully installed. Please edit your Apache configuration file, and add these lines: LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.15/ext/apache2/mod_passenger.so PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.15 PassengerRuby /usr/bin/ruby After you restart Apache, you are ready to deploy any number of Ruby on Rails applications on Apache, without any further Ruby on Rails-specific configuration!
だそうな。
現状、新たなサーバ名が使えないので、ポートで切り分ける事に。
Listen *:80 Listen *:8080 # # The following modules are load for passenger module # LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.15/ext/apache2/mod_passenger.so PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.15 PassengerRuby /usr/bin/ruby <VirtualHost xxx.xxx.xxx.27:8080> DocumentRoot /var/www/html/redmine/public <Directory "/"> allow from all AllowOverride all Options ExecCGI FollowSymLinks -MultiViews </Directory> Options FollowSymLinks SymLinksIfOwnerMatch </VirtualHost>
をhttpd.confに追加
最初は/home/xxxxx/Downloads/redmine-1.0.0/を/var/www/html/redmineにシンボリックリンクしたんだが
例によって、パーミッションエラーが消えなくて、結局redmine-1.0.0配下をコピーしてchownした。
これで、Apacheからredmineが使えるようになったよ。
ああ、昨日から遠かったぁ(^-^;;