ブログ - 公開カテゴリのエントリ
■.今回のミッション……公開しているrailsサンプル(ドメイン1、2)に引き続き新たな「rails×SQLite3サンプル」(ドメイン3)を公開したい
■.結論……HOSTSファイルの設定が必要
■.手順
▼1.世界的無料転送URLサービス(リダイレクションサービス)Good.toで、無料ドメイン取得。
http://good.to/
※XREAのサブドメイン取得後に、自宅サーバ公開用として設定するやり方は不明。問い合わせたところサポート対象外との回答
※dyndnsは取得済。無料は1ドメインのみ。
※NO.IPも取得済。無料は1ドメインのみ。
※DotTkは取得設定後、ブラウザ上の表示確認まで終えたが、Yahoo!登録時に「入力されたURLにアクセスできません」とエラーメッセージが出現し登録完了することが出来ないため、止むを得ず使用を見送る。理由は不明
▼2.「rails×SQLite3サンプル」enqueteが、ローカル(Windows×rails1.2)で正常に動作することを確認
▼3.サーバ(Fedora7×rails2.0)var/www/html/enqueteへ移動
▼4.HOSTSファイルの設定
該当サイトへローカルマシンから名前解決の接続を行うために、hostsファイルを開き、下記記述を追加
▽変更対象ファイルhosts(拡張子なし)の場所
C:\WINDOWS\system32\drivers\etc\hosts
▽追加記述内容
サーバIPアドレス ドメイン3
▼5.ドキュメントルートの追加……etc/httpd/conf/httpd.conf
<VirtualHost *:80>
ServerName ドメイン3
DocumentRoot /var/www/html/enquete/public
</VirtualHost>
▼6.ブラウザで確認(http://ドメイン3/)……403エラー
SELinuxをPermissiveへ変更すると、正常に表示されることを確認
▽システム-管理-SELinux Management
・System Default Enforcing Mode……Enforcing→Permissive
・Current Enforcing Mode……Enforcing→Permissive
▼7.該当ディレクトリ(enquete)以下のタイプラベルを確認
・該当ディレクトリ(enquete)のプロパティを開きアクセス権タブをクリック。
下に表示されているSELinux Contextが、「Read from all httpd scripts and the daemon」を選択していないこと、また、プルダウンメニューの中に、この項目自体がないことを確認。
ディレクトリにSELinuxのタイプラベルが割り当てられていない。
・通常、SELinuxはディレクトリやファイルに「タイプ」と呼ばれるラベルを割り当てて管理している。このラベルがないとapacheはディレクトリやファイルにアクセスできない。
(新しくディレクトリを作成すると、その親ディレクトリからポリシーを継承するルールとなっている)
▼8.該当ディレクトリ(enquete)以下のタイプラベルを初期化し、タイプラベルの付け直しを行う
[root@]# getenforce //現在のモードをみる
Enforcing
[root@]# restorecon -R /var/www/html/enquete //特定のディレクトリタイプの変更をする。-R はrecursive
[root@]# cd /var/www/html/enquete //カレントディレクトリを移動
[root@]# ls -Z //タイプをlsコマンドの「-Z」オプションで閲覧
[root@]# chcon system_u:object_r:httpd_sys_content_t /var/www/html/enquete -R
[root@]# chmod 711 /var/www/html/enquete
[root@]# ls -Z //該当ディレクトリが、下記状態となっていることを確認
drwxr-xr-x root root system_u:object_r:httpd_sys_content_t enquete
▼GUIでも確認
▽該当ディレクトリ選択後、ツールバー表示を選択し、再読み込み(R)をクリック
▽該当ディレクトリ(enquete)のプロパティを開きアクセス権タブをクリック
・所有者:root
・フォルダのアクセス権:作成と削除
・ファイルのアクセス権:---
・グループ:root
・フォルダのアクセス権:いいえ一覧,いいえ作成/削除,アクセス
・ファイルのアクセス権:---
・その他
・フォルダのアクセス権:いいえ一覧,いいえ作成/削除,アクセス
・ファイルのアクセス権:---
・実行:-
・SELinux Context:Read from all httpd scripts and the daemon
●参考
モードの切り替え
# setenforce 0 // Permissiveモードになる
# setenforce 1 // enforcingモードになる
※なお、該当フォルダの表示を再読み込みしなければ、「Read from all httpd scripts and the daemon」を選択することが出来ない。
■今後の課題
1.MySQLと対応したrailsサンプルを動かす
2.rails1.2系のサンプルを2.0系へとカスタマイズして公開
3.railsサンプル(ドメイン1・2・3)以外のドキュメントルートの確保(以前は動作していたMovableTypeの確認など)
4.サブバージョンの導入……Samba経由ではなく、サーバへコミット出来るような設定を行う
■参考url
▼HOSTSファイルの設定 - Windows関連 - 自宅サーバーでやってみよう!!
http://vine-linux.ddo.jp/windows/hosts.php
▼バーチャルホストの設定- Apacheの設定 - 自宅サーバーの構築 - 自宅サーバーでやってみよう!!
http://vine-linux.ddo.jp/linux/apache/virtualhost.php
■.結論……HOSTSファイルの設定が必要
■.手順
▼1.世界的無料転送URLサービス(リダイレクションサービス)Good.toで、無料ドメイン取得。
http://good.to/
※XREAのサブドメイン取得後に、自宅サーバ公開用として設定するやり方は不明。問い合わせたところサポート対象外との回答
※dyndnsは取得済。無料は1ドメインのみ。
※NO.IPも取得済。無料は1ドメインのみ。
※DotTkは取得設定後、ブラウザ上の表示確認まで終えたが、Yahoo!登録時に「入力されたURLにアクセスできません」とエラーメッセージが出現し登録完了することが出来ないため、止むを得ず使用を見送る。理由は不明
▼2.「rails×SQLite3サンプル」enqueteが、ローカル(Windows×rails1.2)で正常に動作することを確認
▼3.サーバ(Fedora7×rails2.0)var/www/html/enqueteへ移動
▼4.HOSTSファイルの設定
該当サイトへローカルマシンから名前解決の接続を行うために、hostsファイルを開き、下記記述を追加
▽変更対象ファイルhosts(拡張子なし)の場所
C:\WINDOWS\system32\drivers\etc\hosts
▽追加記述内容
サーバIPアドレス ドメイン3
▼5.ドキュメントルートの追加……etc/httpd/conf/httpd.conf
<VirtualHost *:80>
ServerName ドメイン3
DocumentRoot /var/www/html/enquete/public
</VirtualHost>
▼6.ブラウザで確認(http://ドメイン3/)……403エラー
SELinuxをPermissiveへ変更すると、正常に表示されることを確認
▽システム-管理-SELinux Management
・System Default Enforcing Mode……Enforcing→Permissive
・Current Enforcing Mode……Enforcing→Permissive
▼7.該当ディレクトリ(enquete)以下のタイプラベルを確認
・該当ディレクトリ(enquete)のプロパティを開きアクセス権タブをクリック。
下に表示されているSELinux Contextが、「Read from all httpd scripts and the daemon」を選択していないこと、また、プルダウンメニューの中に、この項目自体がないことを確認。
ディレクトリにSELinuxのタイプラベルが割り当てられていない。
・通常、SELinuxはディレクトリやファイルに「タイプ」と呼ばれるラベルを割り当てて管理している。このラベルがないとapacheはディレクトリやファイルにアクセスできない。
(新しくディレクトリを作成すると、その親ディレクトリからポリシーを継承するルールとなっている)
▼8.該当ディレクトリ(enquete)以下のタイプラベルを初期化し、タイプラベルの付け直しを行う
[root@]# getenforce //現在のモードをみる
Enforcing
[root@]# restorecon -R /var/www/html/enquete //特定のディレクトリタイプの変更をする。-R はrecursive
[root@]# cd /var/www/html/enquete //カレントディレクトリを移動
[root@]# ls -Z //タイプをlsコマンドの「-Z」オプションで閲覧
[root@]# chcon system_u:object_r:httpd_sys_content_t /var/www/html/enquete -R
[root@]# chmod 711 /var/www/html/enquete
[root@]# ls -Z //該当ディレクトリが、下記状態となっていることを確認
drwxr-xr-x root root system_u:object_r:httpd_sys_content_t enquete
▼GUIでも確認
▽該当ディレクトリ選択後、ツールバー表示を選択し、再読み込み(R)をクリック
▽該当ディレクトリ(enquete)のプロパティを開きアクセス権タブをクリック
・所有者:root
・フォルダのアクセス権:作成と削除
・ファイルのアクセス権:---
・グループ:root
・フォルダのアクセス権:いいえ一覧,いいえ作成/削除,アクセス
・ファイルのアクセス権:---
・その他
・フォルダのアクセス権:いいえ一覧,いいえ作成/削除,アクセス
・ファイルのアクセス権:---
・実行:-
・SELinux Context:Read from all httpd scripts and the daemon
●参考
モードの切り替え
# setenforce 0 // Permissiveモードになる
# setenforce 1 // enforcingモードになる
※なお、該当フォルダの表示を再読み込みしなければ、「Read from all httpd scripts and the daemon」を選択することが出来ない。
■今後の課題
1.MySQLと対応したrailsサンプルを動かす
2.rails1.2系のサンプルを2.0系へとカスタマイズして公開
3.railsサンプル(ドメイン1・2・3)以外のドキュメントルートの確保(以前は動作していたMovableTypeの確認など)
4.サブバージョンの導入……Samba経由ではなく、サーバへコミット出来るような設定を行う
■参考url
▼HOSTSファイルの設定 - Windows関連 - 自宅サーバーでやってみよう!!
http://vine-linux.ddo.jp/windows/hosts.php
▼バーチャルホストの設定- Apacheの設定 - 自宅サーバーの構築 - 自宅サーバーでやってみよう!!
http://vine-linux.ddo.jp/linux/apache/virtualhost.php
■.今回のミッション……公開している「htmlオンリーのサンプル(ドメイン2)」samplebbsを、「rails×SQLite3サンプル」articleと入れ替える
1.「rails×SQLite3サンプル」articleが、ローカル(Windows×rails1.2)で正常に動作することを確認
2.サーバ(Fedora7×rails2.0)var/www/html/articleへ移動
3.ブラウザで動作確認(http://ドメイン2/articles)……SQLiteがないとのエラー表示
4.SQLiteインストール
▽4-1……SQLiteのgemを探す
gem list --remote sqlite
▽4-2……SQLite3-rubyをインストール
gem install sqlite3-ruby
4.ブラウザで再度確認(http://ドメイン2/articles)……エラー
5.ドキュメントルートの変更……etc/httpd/conf/httpd.conf
ディレクトリ名変更
DocumentRoot /var/www/html/samplebbs/public→ /var/www/html/article/public
6.ブラウザで再度確認(http://ドメイン2/articles)……エラー
7.SELinuxの切り替え
[root@]# getenforce //現在のモードをみる
Enforcing
[root@]# restorecon -R /var/www/html/article //特定のディレクトリタイプの変更をする。-R はrecursive
[root@]# ls -Z //タイプをlsコマンドの「-Z」オプションで閲覧
[root@]# chcon system_u:object_r:httpd_sys_content_t /var/www/html/article -R
8.ブラウザで再度確認(http://ドメイン2/articles)……O.K.
■今後の課題
1.MySQLと対応したrailsサンプルを動かす
2.rails1.2系のサンプルを2.0系へとカスタマイズして公開
3.rails2系統以外のドキュメントルートの確保(以前は動作していたMovableTypeの確認など)
■参考url
▼Ruby on Railsインストールメモ - rubyco(るびこ)の日記
http://d.hatena.ne.jp/rubyco/20070530/ror
1.「rails×SQLite3サンプル」articleが、ローカル(Windows×rails1.2)で正常に動作することを確認
2.サーバ(Fedora7×rails2.0)var/www/html/articleへ移動
3.ブラウザで動作確認(http://ドメイン2/articles)……SQLiteがないとのエラー表示
4.SQLiteインストール
▽4-1……SQLiteのgemを探す
gem list --remote sqlite
▽4-2……SQLite3-rubyをインストール
gem install sqlite3-ruby
4.ブラウザで再度確認(http://ドメイン2/articles)……エラー
5.ドキュメントルートの変更……etc/httpd/conf/httpd.conf
ディレクトリ名変更
DocumentRoot /var/www/html/samplebbs/public→ /var/www/html/article/public
6.ブラウザで再度確認(http://ドメイン2/articles)……エラー
7.SELinuxの切り替え
[root@]# getenforce //現在のモードをみる
Enforcing
[root@]# restorecon -R /var/www/html/article //特定のディレクトリタイプの変更をする。-R はrecursive
[root@]# ls -Z //タイプをlsコマンドの「-Z」オプションで閲覧
[root@]# chcon system_u:object_r:httpd_sys_content_t /var/www/html/article -R
8.ブラウザで再度確認(http://ドメイン2/articles)……O.K.
■今後の課題
1.MySQLと対応したrailsサンプルを動かす
2.rails1.2系のサンプルを2.0系へとカスタマイズして公開
3.rails2系統以外のドキュメントルートの確保(以前は動作していたMovableTypeの確認など)
■参考url
▼Ruby on Railsインストールメモ - rubyco(るびこ)の日記
http://d.hatena.ne.jp/rubyco/20070530/ror
■現状
・SELinux……Enforcing設定(You don't have permission to access Apache/2.2.8 (Fedora) Server at ドメイン2 Port 80)
・SELinux設定をEnforcingとすると、ドメイン2のドキュメントルート以下にあるindex.htmlファイルをブラウザから確認出来ず、403 forbiddenとなってしまう。
・該当フォルダのプロパティを開きアクセス権タブをクリック。
下のほうのSELinux Contextが「Read from all httpd scripts and the daemon」を選択していないことを確認。また、この項目自体がない場合には、ディレクトリにSELinuxのタイプラベルが割り当てられていないことが原因だと思われる。
・通常、SELinuxはディレクトリやファイルに「タイプ」と呼ばれるラベルを割り当てて管理している。このラベルがないとapacheはディレクトリやファイルにアクセスできないのだが、新しくディレクトリを作成すると、その親ディレクトリからポリシーを継承するルールとなっている(ハズ……)。
・該当ディレクトリ以下のタイプラベルを初期化し、タイプラベルの付け直しを行う。
■SELinuxの切り替え
[root@]# getenforce //現在のモードをみる
Enforcing
[root@]# restorecon -R /var/www/html/samplebbs //特定のディレクトリタイプの変更をする。-R はrecursive
[root@]# ls -Z //タイプをlsコマンドの「-Z」オプションで閲覧
[root@]# chcon system_u:object_r:httpd_sys_content_t /var/www/html/samplebbs -R
[root@]# chmod 711 /var/www/html/samplebbs
[root@]# ls -Z
drwxr-xr-x root root system_u:object_r:httpd_sys_content_t samplebbs
■モードの切り替え
# setenforce 0 // Permissiveモードになる
# setenforce 1 // enforcingモードになる
※なお、該当フォルダの表示を再読み込みしなければ、「Read from all httpd scripts and the daemon」を選択することが出来ない。
■<これから(明日以降)取り組むこと>
・ドメイン1……rails1.2系サンプルの、rails2.0系への対応
・ドメイン2……文字化け対応
・ドメイン2……rails2.0系のサンプル動作確認
・MovableType1,2……今回の設定変更で、閲覧不可となった左記対応
・pingを打った後に返ってくるIPアドレスが、ドメイン1は内部IPアドレス・ドメイン2は外部IPアドレスとなっている理由を確認
▼参考url
・リナックス(Linux) 管理人の覚え書き
http://www.ttm123.com/hp/linux_memo.html
・【Linux】FedraCore4 samba起動できない - FREEBOX IV
http://blog.goo.ne.jp/freebox_tk/e/4b148b97bfa7be4b749b701132c44eb2
・home-mg.que.ne.jp - diary(01-03[長年日記])
http://home-mg.que.ne.jp/0103.html
・くわぞうメモ: SELinuxの切り替え
http://www.kuwazou.net/blog/unixlinux/selinux/selinux.html
・秩父の情報とコンピュータ、IT関連情報なら、秩父の総合情報サイト :: c-atwork :: - よくある疑問・質問 - Linux - Fedora core、Whitebox など SELinux を採用しているデリストロビューションの Apache で、のユーザーホームページが公開できません
http://c-atwork.com/modules/smartfaq/faq.php?faqid=22
・SELinux……Enforcing設定(You don't have permission to access Apache/2.2.8 (Fedora) Server at ドメイン2 Port 80)
・SELinux設定をEnforcingとすると、ドメイン2のドキュメントルート以下にあるindex.htmlファイルをブラウザから確認出来ず、403 forbiddenとなってしまう。
・該当フォルダのプロパティを開きアクセス権タブをクリック。
下のほうのSELinux Contextが「Read from all httpd scripts and the daemon」を選択していないことを確認。また、この項目自体がない場合には、ディレクトリにSELinuxのタイプラベルが割り当てられていないことが原因だと思われる。
・通常、SELinuxはディレクトリやファイルに「タイプ」と呼ばれるラベルを割り当てて管理している。このラベルがないとapacheはディレクトリやファイルにアクセスできないのだが、新しくディレクトリを作成すると、その親ディレクトリからポリシーを継承するルールとなっている(ハズ……)。
・該当ディレクトリ以下のタイプラベルを初期化し、タイプラベルの付け直しを行う。
■SELinuxの切り替え
[root@]# getenforce //現在のモードをみる
Enforcing
[root@]# restorecon -R /var/www/html/samplebbs //特定のディレクトリタイプの変更をする。-R はrecursive
[root@]# ls -Z //タイプをlsコマンドの「-Z」オプションで閲覧
[root@]# chcon system_u:object_r:httpd_sys_content_t /var/www/html/samplebbs -R
[root@]# chmod 711 /var/www/html/samplebbs
[root@]# ls -Z
drwxr-xr-x root root system_u:object_r:httpd_sys_content_t samplebbs
■モードの切り替え
# setenforce 0 // Permissiveモードになる
# setenforce 1 // enforcingモードになる
※なお、該当フォルダの表示を再読み込みしなければ、「Read from all httpd scripts and the daemon」を選択することが出来ない。
■<これから(明日以降)取り組むこと>
・ドメイン1……rails1.2系サンプルの、rails2.0系への対応
・ドメイン2……文字化け対応
・ドメイン2……rails2.0系のサンプル動作確認
・MovableType1,2……今回の設定変更で、閲覧不可となった左記対応
・pingを打った後に返ってくるIPアドレスが、ドメイン1は内部IPアドレス・ドメイン2は外部IPアドレスとなっている理由を確認
▼参考url
・リナックス(Linux) 管理人の覚え書き
http://www.ttm123.com/hp/linux_memo.html
・【Linux】FedraCore4 samba起動できない - FREEBOX IV
http://blog.goo.ne.jp/freebox_tk/e/4b148b97bfa7be4b749b701132c44eb2
・home-mg.que.ne.jp - diary(01-03[長年日記])
http://home-mg.que.ne.jp/0103.html
・くわぞうメモ: SELinuxの切り替え
http://www.kuwazou.net/blog/unixlinux/selinux/selinux.html
・秩父の情報とコンピュータ、IT関連情報なら、秩父の総合情報サイト :: c-atwork :: - よくある疑問・質問 - Linux - Fedora core、Whitebox など SELinux を採用しているデリストロビューションの Apache で、のユーザーホームページが公開できません
http://c-atwork.com/modules/smartfaq/faq.php?faqid=22
■<これまでに出来たこと>
・ドメイン1……railsサンプルのトップページ表示
・ドメイン2……別サンプル(htmlオンリー)のトップページ表示
■<これから(明日以降)取り組むこと>
・SELinux……Enforcing設定(You don't have permission to access Apache/2.2.8 (Fedora) Server at ドメイン2 Port 80)
・ドメイン1……rails1.2系サンプルの、rails2.0系への対応
・ドメイン2……文字化け対応
・ドメイン2……rails2.0系のサンプル動作確認
・MovableType1,2……今回の設定変更で、閲覧不可となった左記対応
・pingを打った後に返ってくるIPアドレスが、ドメイン1は内部IPアドレス・ドメイン2は外部IPアドレスとなっている理由を確認
■<コマンド等各種メモ>
▼<PC履歴一覧>
・PC1.IBMAptiva 2153-E31……売却
・PC2.東芝ノート……廃棄
・PC3.デルDimension 2300C……サーバ
・PC4.パソコン工房 AmphisValue……放置中
・PC5.eX.COMPUTER-AeroStream-B31J-6330E……現在のメインPC
▼<ファイル情報を見る>
[一般user@]$ ls
README Rakefile components db files log script tmp
README_LOGIN app config doc lib public test vendor
▼<属性も含めたファイル情報を見る>
[一般user@]$ ls -l
合計 132
-rwxrw-rw- 1 一般user 一般user 7353 2007-09-23 19:48 README
-rwxrw-rw- 1 一般user 一般user 3032 2007-09-23 19:48 README_LOGIN
▼<カレントディレクトリを移動>
▽デフォルト位置への移動
[root@]# cd
▽相対パス
[一般user@]$ cd scheduler
■<Samba>
▼<Samba……workgroup名の確認>
PC5……ワークグル-プ名の確認
フルコンピュータ名:Reimi.
ワークグル-プ名:RedSky
▼<Samba……smb.conf設定>
▽workgroup変更
vi /etc/samba/smb.conf <=設定ファイルの編集
==Global Setings==
[global]
workgroup = RedSky
▽charset変更
security = user
unix charset = UTF-8
display charset = UTF-8
▼<Samba……再起動>
[root@]# /etc/rc.d/init.d/smb start
■<ユーザー>
▼<ユーザー……追加>
※例としてユーザ名をcentosとする
[root@]# useradd centos ← システムへユーザ追加
▼<ユーザー……パスワード変更>
[root@]# passwd centos ← パスワード設定
Changing password for user centos.
New password: ← パスワード応答※表示はされない
Retype new password: ← パスワード応答(確認)※表示はされない
passwd: all authentication tokens updated successfully.
▼<ユーザー……変更>
[一般user@]$ su - 一般user
パスワード:
▼<ユーザー……情報の詳細表示>
[root@]# pdbedit -a centos ← Sambaへユーザ追加
new password: ← パスワード応答※表示はされない
retype new password: ← パスワード応答(確認)※表示はされない
※既存ユーザーではなく、必ずsamba用ユーザーを、手順に沿って初めから作成する。
■<Ruby>
▼<Ruby……バージョン確認>
>ruby -v
ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32]
■<Rsils>
▼<Rails……インストール>
[root@]# gem install rails
Bulk updating Gem source index for: http://gems.rubyforge.org/
Successfully installed rails-2.0.2
1 gem installed
▼<Rails……バージョンを指定してインストール>
[root@]# sudo gem install rails --version 1.2.3
2 gems installed
▼<Rails……バージョン確認>
>rails -v
Rails 1.2.3
■<MySQL>
▼<MySQL……mysql-serverインストール>
[root@]# yum -y install mysql-server
Package mysql-server - 5.0.45-6.fc7.i386 is already installed.
Nothing to do
▼<MySQL……ルートパスワード変更>
mysql> UPDATE user SET Password=PASSWORD('sample999') WHERE User='root';
Rows matched: 2 Changed: 2 Warnings: 0
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.01 sec)
▼<MySQL……再起動>
[root@]# /etc/rc.d/init.d/mysqld start
MySQL を起動中: [ OK ]
▼<MySQL……起動>
[root@]# service mysqld start
MySQL を起動中: [ OK ]
▼<MySQL……指定ユーザーへ全権限を付与>
mysql> grant all on scheduler_development.*to'一般user'@'localhost';
Query OK, 0 rows affected (0.18 sec)
▼<MySQL……ログイン>
>mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 57 to server version: 5.0.45-community-nt
▼<MySQL……データベース確認>
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
+--------------------+
7 rows in set (1.47 sec)
▼<MySQL……テーブル確認>
mysql> show tables from mysql;
+---------------------------+
| Tables_in_mysql |
+---------------------------+
| columns_priv |
| user |
+---------------------------+
17 rows in set (0.00 sec)
▼<MySQL……データベース変更>
mysql> use mysql
Database changed
▼<MySQL……ユーザー、ホスト、パスワード確認>
mysql> select host,user,password from user;
+-------------------+-------+------------------+
| host | user | password |
+-------------------+-------+------------------+
| localhost | root | password1 |
| ドメイン1 | root | password1 |
| dd | user1 | password2 |
| ドメイン1 | user1 | password2 |
| localhost | user1 | password2 |
| localhost | user2 | |
+-------------------+-------+------------------+
6 rows in set (0.10 sec)
▼<MySQL……ユーザー情報がないユーザーを削除>
mysql> delete from user where user="";
Query OK, 0 rows affected (0.08 sec)
▼<MySQL……指定データベースの中より指定テーブルを見る>
mysql> show tables from scheduler_development;
Empty set (0.00 sec)
▼<MySQL……ログアウト>
mysql> \q
Bye
<MySQL……ホストのネットワーク統計や状態を確認>
[root@]# netstat -ln | grep mysql
unix 2 [ ACC ] STREAM LISTENING 21913 /var/lib/mysql/mysql.sock
▼<MySQLアダプタ……インストール>
[root@]# gem install mysql -- --with-mysql-lib=/usr/lib/mysql --with-
Successfully installed mysql-2.7
1 gem installed
■<パス>
▼<パス……設定>
[一般user@]$ PATH=$PATH:/usr/local/mysql/bin
[一般user@]$ export PATH
▼<RubyGems……アップデート>
[一般user@]$ gem update --system
Updating RubyGems
Nothing to update
▼<RubyGems……指定バージョンをインストール>
[root@]# sudo gem install rails --version 1.2.3
Successfully installed rails-1.2.3
▼<ruby-deveとmysql-develをyumでインストール>
[root@]# sudo yum install ruby-devel mysql-devel
Is this ok [y/N]: y
Complete!
■<Webサーバapache>
▼<Webサーバapache……設定>
vi /etc/httpd/conf/httpd.conf
▽VirtualHost……1
ServerName ドメイン1(○ ブラウザでドメイン1のアドレスを入力するとドメイン1のドキュメントルート内容を表示)
DocumentRoot /var/www/html/schedules/public
▽VirtualHost……2_1(× ブラウザでドメイン2のアドレスを入力してもドメイン1のドキュメントルート内容を表示)
DocumentRoot /var/www/html/schedules/public
ServerName ドメイン1
DocumentRoot /var/www/html/samplebbs/public
ServerName ドメイン2
▽VirtualHost……2_2(× apache起動しない)
# Ensure that Apache listens on port 80
Listen 80
# Listen for virtual host requests on all IP addresses
NameVirtualHost *:80
DocumentRoot /var/www/html/schedules/public
ServerName ドメイン1
# Other directives here
DocumentRoot /var/www/html/samplebbs/public
ServerName ドメイン2
# Other directives here
▽VirtualHost……2_3(○ ブラウザでアドレスを入力すると、それぞれのドメインのそれぞれのドキュメントルート内容を表示)
NameVirtualHost *:80
ServerName ドメイン1
ServerAlias dyndns.org *.dyndns.org
DocumentRoot /var/www/html/schedules/public
ServerName ドメイン2
DocumentRoot /var/www/html/samplebbs/public
▼<Webサーバapache……再起動>
[root@]# /etc/init.d/httpd restart
httpd を停止中: [ OK ]
httpd を起動中: [ OK ]
▼ping
▽ping ドメイン1
>ping ドメイン1
Pinging ドメイン1 [内部IPアドレス] with 32 bytes of data:
Reply from 内部IPアドレス: bytes=32 time=1ms TTL=64
Reply from 内部IPアドレス4: bytes=32 time<1ms TTL=64
Reply from 内部IPアドレス: bytes=32 time<1ms TTL=64
Reply from 内部IPアドレス: bytes=32 time<1ms TTL=64
Ping statistics for 内部IPアドレス:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms
▽ping ドメイン2
>ping ドメイン2
Pinging ドメイン2 [外部IPアドレス] with 32 bytes of data:
Reply from 外部IPアドレス: bytes=32 time=1ms TTL=64
Reply from 外部IPアドレス6: bytes=32 time<1ms TTL=64
Reply from 外部IPアドレス: bytes=32 time<1ms TTL=64
Reply from 外部IPアドレス: bytes=32 time<1ms TTL=64
Ping statistics for 外部IPアドレス:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms
■参考url
▽Passenger (mod_rails for Apache) を使ってRedmineを動かしてみたよ! - RX-7乗りの適当な日々
http://d.hatena.ne.jp/rx7/20080412/p1
▽街に待った。。 Passenger ( Mod_rails For Apache ) !!/べあの散策路: Rails
http://adalberyo.blog116.fc2.com/blog-category-5.html
▽Passengerことmod_railsのインストール - BitArts
http://bitarts.jp/blog/archives/002726.html
▽MacOSX 10.4 (Tiger) にPassenger (mod_rails for Apache) をインストール » RAILS PRESS
http://railspress.matake.jp/install-passenger-to-apache2-on-macosx-tiger
▽Redmine.JP | Apache上でRuby on Railsアプリケーションを動かす/Passenger(mod_rails for Apache)の利用
http://redmine.jp/tech_note/apache-passenger/
▽rootなどのユーザの権限でコマンドを実行できるsudoコマンドのオプション一覧-knowledge database-
http://it.kndb.jp/entry/show/id/1070
▽各ディレクトリの役割を知ろう(ルートディレクトリ編)(1/2)
http://www.atmarkit.co.jp/flinux/rensai/theory02/theory02a.html
▽Linux 基礎知識 > ディレクトリ階層/FHS
http://cyberam.dip.jp/linux_foundation/directory/fhs_main.html
▽RubyGems のインストール
http://www.gfd-dennou.org/arch/davis/gfdnavi/doc/install/install-rubygems.htm#label-8
▽Rubyのパッケージマネジメントシステムgem(Rubygems)のコマンド一覧-knowledge database-
http://it.kndb.jp/entry/show/id/655
▽はじめての自宅サーバ構築 Fedora/CentOS - ファイルサーバの構築(Samba)
http://kajuhome.com/samba.shtml#n01
▽mod_railsを使って、手早くRailsアプリケーションを動かします/Open Service » Blog Archive » Amazon EC2を使ってWebサービスを公開する「インスタンス編」
http://openservice.jp/2008/04/using_amazon_ec2_2/
▽[ヅラド] MySQL の root パスワード忘れた!
http://www.nilab.info/zurazure2/000310.html
▽mysqlのrootのパスワードを忘れた場合の対処法 - With skill and creativeness
http://d.hatena.ne.jp/shohu33/20080318
▽忘れたrootのパスワードを再設定する方法/MySQLの小技
http://good-stream.com/goodstream/database/mysql/linux/tips.htm
▽mysql> FLUSH PRIVILEGES;/MySQL :: MySQL 4.1 リファレンスマニュアル :: 4.6.4 FLUSH 構文http://dev.mysql.com/doc/refman/4.1/ja/flush.html
▽InfoLinux FAQ - mysqlのrootパスワードを忘れた場合にどうすればいい?
http://faq.infolinux.jp/index.php?action=artikel&cat=16&id=169&artlang=ja
▽無料ドメインを取得する - Linux で自宅サーバ [ Home Server Technical. ]
http://www.miloweb.net/dns.html
▽ping を実行した結果によって、目的のホストとの接続状況が確認/Windows.FAQ - 基礎講座:ping コマンドの使い方
http://homepage2.nifty.com/winfaq/pinghowto.html
▽apacheの設定をしよう!
http://yosemite.una-g.to/apache/conf.html
▽名前ベースのバーチャルホスト - Apache HTTP サーバ
http://httpd.apache.org/docs/2.2/vhosts/name-based.html
▽参考/バーチャルホストの例 - Apache HTTP サーバ
http://httpd.apache.org/docs/2.2/ja/vhosts/examples.html
▽Web サーバの動作確認/Apache の基本設定 - Linux で自宅サーバ [ Home Server Technical. ]
http://www.miloweb.net/apache.html#3
▽SELinuxがアクセスをブロック/リナックス(Linux) 管理人の覚え書き
http://www.ttm123.com/hp/linux_memo.html
・ドメイン1……railsサンプルのトップページ表示
・ドメイン2……別サンプル(htmlオンリー)のトップページ表示
■<これから(明日以降)取り組むこと>
・SELinux……Enforcing設定(You don't have permission to access Apache/2.2.8 (Fedora) Server at ドメイン2 Port 80)
・ドメイン1……rails1.2系サンプルの、rails2.0系への対応
・ドメイン2……文字化け対応
・ドメイン2……rails2.0系のサンプル動作確認
・MovableType1,2……今回の設定変更で、閲覧不可となった左記対応
・pingを打った後に返ってくるIPアドレスが、ドメイン1は内部IPアドレス・ドメイン2は外部IPアドレスとなっている理由を確認
■<コマンド等各種メモ>
▼<PC履歴一覧>
・PC1.IBMAptiva 2153-E31……売却
・PC2.東芝ノート……廃棄
・PC3.デルDimension 2300C……サーバ
・PC4.パソコン工房 AmphisValue……放置中
・PC5.eX.COMPUTER-AeroStream-B31J-6330E……現在のメインPC
▼<ファイル情報を見る>
[一般user@]$ ls
README Rakefile components db files log script tmp
README_LOGIN app config doc lib public test vendor
▼<属性も含めたファイル情報を見る>
[一般user@]$ ls -l
合計 132
-rwxrw-rw- 1 一般user 一般user 7353 2007-09-23 19:48 README
-rwxrw-rw- 1 一般user 一般user 3032 2007-09-23 19:48 README_LOGIN
▼<カレントディレクトリを移動>
▽デフォルト位置への移動
[root@]# cd
▽相対パス
[一般user@]$ cd scheduler
■<Samba>
▼<Samba……workgroup名の確認>
PC5……ワークグル-プ名の確認
フルコンピュータ名:Reimi.
ワークグル-プ名:RedSky
▼<Samba……smb.conf設定>
▽workgroup変更
vi /etc/samba/smb.conf <=設定ファイルの編集
==Global Setings==
[global]
workgroup = RedSky
▽charset変更
security = user
unix charset = UTF-8
display charset = UTF-8
▼<Samba……再起動>
[root@]# /etc/rc.d/init.d/smb start
■<ユーザー>
▼<ユーザー……追加>
※例としてユーザ名をcentosとする
[root@]# useradd centos ← システムへユーザ追加
▼<ユーザー……パスワード変更>
[root@]# passwd centos ← パスワード設定
Changing password for user centos.
New password: ← パスワード応答※表示はされない
Retype new password: ← パスワード応答(確認)※表示はされない
passwd: all authentication tokens updated successfully.
▼<ユーザー……変更>
[一般user@]$ su - 一般user
パスワード:
▼<ユーザー……情報の詳細表示>
[root@]# pdbedit -a centos ← Sambaへユーザ追加
new password: ← パスワード応答※表示はされない
retype new password: ← パスワード応答(確認)※表示はされない
※既存ユーザーではなく、必ずsamba用ユーザーを、手順に沿って初めから作成する。
■<Ruby>
▼<Ruby……バージョン確認>
>ruby -v
ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32]
■<Rsils>
▼<Rails……インストール>
[root@]# gem install rails
Bulk updating Gem source index for: http://gems.rubyforge.org/
Successfully installed rails-2.0.2
1 gem installed
▼<Rails……バージョンを指定してインストール>
[root@]# sudo gem install rails --version 1.2.3
2 gems installed
▼<Rails……バージョン確認>
>rails -v
Rails 1.2.3
■<MySQL>
▼<MySQL……mysql-serverインストール>
[root@]# yum -y install mysql-server
Package mysql-server - 5.0.45-6.fc7.i386 is already installed.
Nothing to do
▼<MySQL……ルートパスワード変更>
mysql> UPDATE user SET Password=PASSWORD('sample999') WHERE User='root';
Rows matched: 2 Changed: 2 Warnings: 0
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.01 sec)
▼<MySQL……再起動>
[root@]# /etc/rc.d/init.d/mysqld start
MySQL を起動中: [ OK ]
▼<MySQL……起動>
[root@]# service mysqld start
MySQL を起動中: [ OK ]
▼<MySQL……指定ユーザーへ全権限を付与>
mysql> grant all on scheduler_development.*to'一般user'@'localhost';
Query OK, 0 rows affected (0.18 sec)
▼<MySQL……ログイン>
>mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 57 to server version: 5.0.45-community-nt
▼<MySQL……データベース確認>
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
+--------------------+
7 rows in set (1.47 sec)
▼<MySQL……テーブル確認>
mysql> show tables from mysql;
+---------------------------+
| Tables_in_mysql |
+---------------------------+
| columns_priv |
| user |
+---------------------------+
17 rows in set (0.00 sec)
▼<MySQL……データベース変更>
mysql> use mysql
Database changed
▼<MySQL……ユーザー、ホスト、パスワード確認>
mysql> select host,user,password from user;
+-------------------+-------+------------------+
| host | user | password |
+-------------------+-------+------------------+
| localhost | root | password1 |
| ドメイン1 | root | password1 |
| dd | user1 | password2 |
| ドメイン1 | user1 | password2 |
| localhost | user1 | password2 |
| localhost | user2 | |
+-------------------+-------+------------------+
6 rows in set (0.10 sec)
▼<MySQL……ユーザー情報がないユーザーを削除>
mysql> delete from user where user="";
Query OK, 0 rows affected (0.08 sec)
▼<MySQL……指定データベースの中より指定テーブルを見る>
mysql> show tables from scheduler_development;
Empty set (0.00 sec)
▼<MySQL……ログアウト>
mysql> \q
Bye
<MySQL……ホストのネットワーク統計や状態を確認>
[root@]# netstat -ln | grep mysql
unix 2 [ ACC ] STREAM LISTENING 21913 /var/lib/mysql/mysql.sock
▼<MySQLアダプタ……インストール>
[root@]# gem install mysql -- --with-mysql-lib=/usr/lib/mysql --with-
Successfully installed mysql-2.7
1 gem installed
■<パス>
▼<パス……設定>
[一般user@]$ PATH=$PATH:/usr/local/mysql/bin
[一般user@]$ export PATH
▼<RubyGems……アップデート>
[一般user@]$ gem update --system
Updating RubyGems
Nothing to update
▼<RubyGems……指定バージョンをインストール>
[root@]# sudo gem install rails --version 1.2.3
Successfully installed rails-1.2.3
▼<ruby-deveとmysql-develをyumでインストール>
[root@]# sudo yum install ruby-devel mysql-devel
Is this ok [y/N]: y
Complete!
■<Webサーバapache>
▼<Webサーバapache……設定>
vi /etc/httpd/conf/httpd.conf
▽VirtualHost……1
ServerName ドメイン1(○ ブラウザでドメイン1のアドレスを入力するとドメイン1のドキュメントルート内容を表示)
DocumentRoot /var/www/html/schedules/public
▽VirtualHost……2_1(× ブラウザでドメイン2のアドレスを入力してもドメイン1のドキュメントルート内容を表示)
DocumentRoot /var/www/html/schedules/public
ServerName ドメイン1
DocumentRoot /var/www/html/samplebbs/public
ServerName ドメイン2
▽VirtualHost……2_2(× apache起動しない)
# Ensure that Apache listens on port 80
Listen 80
# Listen for virtual host requests on all IP addresses
NameVirtualHost *:80
DocumentRoot /var/www/html/schedules/public
ServerName ドメイン1
# Other directives here
DocumentRoot /var/www/html/samplebbs/public
ServerName ドメイン2
# Other directives here
▽VirtualHost……2_3(○ ブラウザでアドレスを入力すると、それぞれのドメインのそれぞれのドキュメントルート内容を表示)
NameVirtualHost *:80
ServerName ドメイン1
ServerAlias dyndns.org *.dyndns.org
DocumentRoot /var/www/html/schedules/public
ServerName ドメイン2
DocumentRoot /var/www/html/samplebbs/public
▼<Webサーバapache……再起動>
[root@]# /etc/init.d/httpd restart
httpd を停止中: [ OK ]
httpd を起動中: [ OK ]
▼ping
▽ping ドメイン1
>ping ドメイン1
Pinging ドメイン1 [内部IPアドレス] with 32 bytes of data:
Reply from 内部IPアドレス: bytes=32 time=1ms TTL=64
Reply from 内部IPアドレス4: bytes=32 time<1ms TTL=64
Reply from 内部IPアドレス: bytes=32 time<1ms TTL=64
Reply from 内部IPアドレス: bytes=32 time<1ms TTL=64
Ping statistics for 内部IPアドレス:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms
▽ping ドメイン2
>ping ドメイン2
Pinging ドメイン2 [外部IPアドレス] with 32 bytes of data:
Reply from 外部IPアドレス: bytes=32 time=1ms TTL=64
Reply from 外部IPアドレス6: bytes=32 time<1ms TTL=64
Reply from 外部IPアドレス: bytes=32 time<1ms TTL=64
Reply from 外部IPアドレス: bytes=32 time<1ms TTL=64
Ping statistics for 外部IPアドレス:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms
■参考url
▽Passenger (mod_rails for Apache) を使ってRedmineを動かしてみたよ! - RX-7乗りの適当な日々
http://d.hatena.ne.jp/rx7/20080412/p1
▽街に待った。。 Passenger ( Mod_rails For Apache ) !!/べあの散策路: Rails
http://adalberyo.blog116.fc2.com/blog-category-5.html
▽Passengerことmod_railsのインストール - BitArts
http://bitarts.jp/blog/archives/002726.html
▽MacOSX 10.4 (Tiger) にPassenger (mod_rails for Apache) をインストール » RAILS PRESS
http://railspress.matake.jp/install-passenger-to-apache2-on-macosx-tiger
▽Redmine.JP | Apache上でRuby on Railsアプリケーションを動かす/Passenger(mod_rails for Apache)の利用
http://redmine.jp/tech_note/apache-passenger/
▽rootなどのユーザの権限でコマンドを実行できるsudoコマンドのオプション一覧-knowledge database-
http://it.kndb.jp/entry/show/id/1070
▽各ディレクトリの役割を知ろう(ルートディレクトリ編)(1/2)
http://www.atmarkit.co.jp/flinux/rensai/theory02/theory02a.html
▽Linux 基礎知識 > ディレクトリ階層/FHS
http://cyberam.dip.jp/linux_foundation/directory/fhs_main.html
▽RubyGems のインストール
http://www.gfd-dennou.org/arch/davis/gfdnavi/doc/install/install-rubygems.htm#label-8
▽Rubyのパッケージマネジメントシステムgem(Rubygems)のコマンド一覧-knowledge database-
http://it.kndb.jp/entry/show/id/655
▽はじめての自宅サーバ構築 Fedora/CentOS - ファイルサーバの構築(Samba)
http://kajuhome.com/samba.shtml#n01
▽mod_railsを使って、手早くRailsアプリケーションを動かします/Open Service » Blog Archive » Amazon EC2を使ってWebサービスを公開する「インスタンス編」
http://openservice.jp/2008/04/using_amazon_ec2_2/
▽[ヅラド] MySQL の root パスワード忘れた!
http://www.nilab.info/zurazure2/000310.html
▽mysqlのrootのパスワードを忘れた場合の対処法 - With skill and creativeness
http://d.hatena.ne.jp/shohu33/20080318
▽忘れたrootのパスワードを再設定する方法/MySQLの小技
http://good-stream.com/goodstream/database/mysql/linux/tips.htm
▽mysql> FLUSH PRIVILEGES;/MySQL :: MySQL 4.1 リファレンスマニュアル :: 4.6.4 FLUSH 構文http://dev.mysql.com/doc/refman/4.1/ja/flush.html
▽InfoLinux FAQ - mysqlのrootパスワードを忘れた場合にどうすればいい?
http://faq.infolinux.jp/index.php?action=artikel&cat=16&id=169&artlang=ja
▽無料ドメインを取得する - Linux で自宅サーバ [ Home Server Technical. ]
http://www.miloweb.net/dns.html
▽ping を実行した結果によって、目的のホストとの接続状況が確認/Windows.FAQ - 基礎講座:ping コマンドの使い方
http://homepage2.nifty.com/winfaq/pinghowto.html
▽apacheの設定をしよう!
http://yosemite.una-g.to/apache/conf.html
▽名前ベースのバーチャルホスト - Apache HTTP サーバ
http://httpd.apache.org/docs/2.2/vhosts/name-based.html
▽参考/バーチャルホストの例 - Apache HTTP サーバ
http://httpd.apache.org/docs/2.2/ja/vhosts/examples.html
▽Web サーバの動作確認/Apache の基本設定 - Linux で自宅サーバ [ Home Server Technical. ]
http://www.miloweb.net/apache.html#3
▽SELinuxがアクセスをブロック/リナックス(Linux) 管理人の覚え書き
http://www.ttm123.com/hp/linux_memo.html
遅々として勉強が進まないので、railsのアプリを公開してみることにした。railsのアプリつってもサンプルなんだけどさ。要は、自分的にテンションをどう上げていくか。これ重要なわけです。
■<Xreaでrailsアプリを公開したい>
自宅サーバーは「スペックがあまりよろしくない」&「そもそも仕組み自体をよく分かっていない」ため、できればXreaで公開したいと考えていた。前回、ググったときはレスポンスとかが厳しそうだったけど、そろそろ何か進展あるかも? てことで期待をしながら再度検索してみたのだが……、。
結論としては、Xreaでrailsアプリを公開してみよーってのは、ちょっと難しいようだ。
さらに、この壮大なるプロジェクトにかけることが出来る予算は、実質的に0円なので、他のレンサバを借りることは出来ない……。=やっぱ、自宅サーバーしかないのか……。
■<自宅サーバーでrailsサンプルを動かしたい>
「Fast CGI」とか全然やったこともないのに、何か良さ気なヤツを発見したので、とりあえず試してみることにする。「Passenger」? 聞いたこともない名前だけど……。
■<サーバ環境>
・Fedora7
・Web&ファイル共有サーバーとして、以前、構築していたもの(スクラップ同然のスペックということもあり、基本的にかなりの放置プレイ中)
▼<Apacheバージョン確認>
・Poderosa―新規接続[ホスト(H)][アカウント(A)][パスフレーズ(P)]
未サポートのエスケープシーケンスを見つけました ESC [?1034h
exit
・Poderosa―新規接続[種類(Y)]プルダウンより、xtermをvt100へと変更
[一般user@]$ httpd -v
-bash: httpd: command not found
[一般user@]$ su -
パスワード:
[root@]# httpd -v
Server version: Apache/2.2.6 (Unix)
▼<一般userに対してsudo コマンドを使用できるよう設定>
・Poderosa―rootで新規接続
visudo
Enter
I―インサートモードへ
最後の行に、sampleuser ALL=(ALL) ALL を追加
Esc―コマンドモードへ
:wq―保存して終了
exit
・Poderosa―一般userで新規接続
試しにroot しか閲覧することのできない/var/log/messageをsudo コマンドを実行してみることにする。
sudo tail /var/log/messages
Password:一般userのパスワード
May 14 10:48:53 一般user ntpd[1691]: kernel time sync status change 0001
▼<「yum-updatesd」サービス停止>
[一般user@]$ /etc/rc.d/init.d/yum-updatesd stop
yum-updates を停止中: [失敗]
rm: cannot remove `/var/lock/subsys/yum-updatesd': 許可がありません
Another app is currently holding the yum lock; waiting for it to exit...
Another app is currently holding the yum lock; waiting for it to exit...
Exiting on user cancel.
[一般user@]$ sudo /etc/rc.d/init.d/yum-updatesd stop
yum-updates を停止中:
[ OK ]
▼<rubyインストール>
[一般user@]$ yum -y install ruby
You need to be root to perform this command.
[一般user@]$ sudo yum -y install ruby
Password:
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
ruby i386 1.8.6.114-1.fc7 updates 514 k
Updating for dependencies:
ruby-libs i386 1.8.6.114-1.fc7 updates 1.7 M
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 1 Package(s)
Complete!
▼<wgetインストール>
[一般user@]$ yum install wget
You need to be root to perform this command.
[root@]# yum install wget
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
wget i386 1.10.2-15.fc7 fedora 585 k
Transaction Summary
=============================================================================
Install 1 Package(s)
Is this ok [y/N]: y
Installed: wget.i386 0:1.10.2-15.fc7
Complete!
▼<rubygemsインストール>
[一般user@]$ wget http://rubyforge.org/frs/download.php/35283/rubygems-1.1.1.tgz
17:29:11 (134.33 KB/s) - `rubygems-1.1.1.tgz' を保存しました [423308/423308]
[一般user@]$ ls
rubygems-1.1.1.tgz
[一般user@]$ tar xzf rubygems-1.1.1.tgz
[一般user@]$ ls
rubygems-1.1.1 rubygems-1.1.1.tgz
[一般user@]$ cd rubygems-1.1.1
[一般user@ rubygems-1.1.1]$ sudo ruby setup.rb
Password:
./lib/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- rdoc/rdoc (LoadError)
from ./lib/rubygems/custom_require.rb:27:in `require'
from setup.rb:51
▼<rdocインストール>
[一般user@ rubygems-1.1.1]$ yum install rdoc
You need to be root to perform this command.
[一般user@アドレス rubygems-1.1.1]$ sudo yum install rdoc
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
ruby-rdoc i386 1.8.6.114-1.fc7 updates 342 k
Installing for dependencies:
ruby-irb i386 1.8.6.114-1.fc7 updates 274 k
Transaction Summary
=============================================================================
Install 2 Package(s)
Is this ok [y/N]: y
Installed: ruby-rdoc.i386 0:1.8.6.114-1.fc7
Dependency Installed: ruby-irb.i386 0:1.8.6.114-1.fc7
Complete!
▼<rubygemsインストールに再挑戦>
[一般user@ rubygems-1.1.1]$ sudo ruby setup.rb
Password:
mkdir -p /usr/lib/ruby/site_ruby/1.8/rubygems
install -c -m 0644 rubygems/gem_path_searcher.rb /usr/lib/ruby/site_ruby/1.8/rubygems/gem_path_searcher.rb
install -c -m 0644 rubygems/exceptions.rb /usr/lib/ruby/site_ruby/1.8/rubygems/exceptions.rb
mkdir -p /usr/lib/ruby/site_ruby/1.8/rubygems/digest
install -c -m 0644 rubygems/digest/sha2.rb /usr/lib/ruby/site_ruby/1.8/rubygems/digest/sha2.rb
install -c -m 0644 rubygems/digest/digest_adapter.rb /usr/lib/ruby/site_ruby/1.8/rubygems/digest/digest_adapter.rb
install -c -m 0644 rubygems/digest/md5.rb /usr/lib/ruby/site_ruby/1.8/rubygems/digest/md5.rb
install -c -m 0644 rubygems/digest/sha1.rb /usr/lib/ruby/site_ruby/1.8/rubygems/digest/sha1.rb
install -c -m 0644 rubygems/validator.rb /usr/lib/ruby/site_ruby/1.8/rubygems/validator.rb
install -c -m 0644 rubygems/defaults.rb /usr/lib/ruby/site_ruby/1.8/rubygems/defaults.rb
install -c -m 0644 rubygems/installer.rb /usr/lib/ruby/site_ruby/1.8/rubygems/installer.rb
install -c -m 0644 rubygems/user_interaction.rb /usr/lib/ruby/site_ruby/1.8/rubygems/user_interaction.rb
install -c -m 0644 rubygems/dependency_installer.rb /usr/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb
install -c -m 0644 rubygems/version.rb /usr/lib/ruby/site_ruby/1.8/rubygems/version.rb
install -c -m 0644 rubygems/command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/command.rb
mkdir -p /usr/lib/ruby/site_ruby/1.8/rubygems/indexer
install -c -m 0644 rubygems/indexer/latest_index_builder.rb /usr/lib/ruby/site_ruby/1.8/rubygems/indexer/latest_index_builder.rb
install -c -m 0644 rubygems/indexer/master_index_builder.rb /usr/lib/ruby/site_ruby/1.8/rubygems/indexer/master_index_builder.rb
install -c -m 0644 rubygems/indexer/quick_index_builder.rb /usr/lib/ruby/site_ruby/1.8/rubygems/indexer/quick_index_builder.rb
install -c -m 0644 rubygems/indexer/marshal_index_builder.rb /usr/lib/ruby/site_ruby/1.8/rubygems/indexer/marshal_index_builder.rb
install -c -m 0644 rubygems/indexer/abstract_index_builder.rb /usr/lib/ruby/site_ruby/1.8/rubygems/indexer/abstract_index_builder.rb
install -c -m 0644 rubygems/security.rb /usr/lib/ruby/site_ruby/1.8/rubygems/security.rb
install -c -m 0644 rubygems/config_file.rb /usr/lib/ruby/site_ruby/1.8/rubygems/config_file.rb
install -c -m 0644 rubygems/version_option.rb /usr/lib/ruby/site_ruby/1.8/rubygems/version_option.rb
install -c -m 0644 rubygems/source_index.rb /usr/lib/ruby/site_ruby/1.8/rubygems/source_index.rb
install -c -m 0644 rubygems/command_manager.rb /usr/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb
install -c -m 0644 rubygems/doc_manager.rb /usr/lib/ruby/site_ruby/1.8/rubygems/doc_manager.rb
install -c -m 0644 rubygems/require_paths_builder.rb /usr/lib/ruby/site_ruby/1.8/rubygems/require_paths_builder.rb
install -c -m 0644 rubygems/gem_openssl.rb /usr/lib/ruby/site_ruby/1.8/rubygems/gem_openssl.rb
install -c -m 0644 rubygems/source_info_cache.rb /usr/lib/ruby/site_ruby/1.8/rubygems/source_info_cache.rb
install -c -m 0644 rubygems/dependency.rb /usr/lib/ruby/site_ruby/1.8/rubygems/dependency.rb
install -c -m 0644 rubygems/format.rb /usr/lib/ruby/site_ruby/1.8/rubygems/format.rb
install -c -m 0644 rubygems/server.rb /usr/lib/ruby/site_ruby/1.8/rubygems/server.rb
install -c -m 0644 rubygems/local_remote_options.rb /usr/lib/ruby/site_ruby/1.8/rubygems/local_remote_options.rb
install -c -m 0644 rubygems/remote_fetcher.rb /usr/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb
install -c -m 0644 rubygems/uninstaller.rb /usr/lib/ruby/site_ruby/1.8/rubygems/uninstaller.rb
install -c -m 0644 rubygems/dependency_list.rb /usr/lib/ruby/site_ruby/1.8/rubygems/dependency_list.rb
install -c -m 0644 rubygems/rubygems_version.rb /usr/lib/ruby/site_ruby/1.8/rubygems/rubygems_version.rb
install -c -m 0644 rubygems/install_update_options.rb /usr/lib/ruby/site_ruby/1.8/rubygems/install_update_options.rb
install -c -m 0644 rubygems/package.rb /usr/lib/ruby/site_ruby/1.8/rubygems/package.rb
install -c -m 0644 rubygems/specification.rb /usr/lib/ruby/site_ruby/1.8/rubygems/specification.rb
install -c -m 0644 rubygems/source_info_cache_entry.rb /usr/lib/ruby/site_ruby/1.8/rubygems/source_info_cache_entry.rb
install -c -m 0644 rubygems/gem_runner.rb /usr/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb
install -c -m 0644 rubygems/custom_require.rb /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb
mkdir -p /usr/lib/ruby/site_ruby/1.8/rubygems/package
install -c -m 0644 rubygems/package/tar_reader.rb /usr/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader.rb
mkdir -p /usr/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader
install -c -m 0644 rubygems/package/tar_reader/entry.rb /usr/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader/entry.rb
install -c -m 0644 rubygems/package/tar_input.rb /usr/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb
install -c -m 0644 rubygems/package/f_sync_dir.rb /usr/lib/ruby/site_ruby/1.8/rubygems/package/f_sync_dir.rb
install -c -m 0644 rubygems/package/tar_writer.rb /usr/lib/ruby/site_ruby/1.8/rubygems/package/tar_writer.rb
install -c -m 0644 rubygems/package/tar_header.rb /usr/lib/ruby/site_ruby/1.8/rubygems/package/tar_header.rb
install -c -m 0644 rubygems/package/tar_output.rb /usr/lib/ruby/site_ruby/1.8/rubygems/package/tar_output.rb
install -c -m 0644 rubygems/timer.rb /usr/lib/ruby/site_ruby/1.8/rubygems/timer.rb
install -c -m 0644 rubygems/indexer.rb /usr/lib/ruby/site_ruby/1.8/rubygems/indexer.rb
install -c -m 0644 rubygems/platform.rb /usr/lib/ruby/site_ruby/1.8/rubygems/platform.rb
install -c -m 0644 rubygems/requirement.rb /usr/lib/ruby/site_ruby/1.8/rubygems/requirement.rb
install -c -m 0644 rubygems/ext.rb /usr/lib/ruby/site_ruby/1.8/rubygems/ext.rb
mkdir -p /usr/lib/ruby/site_ruby/1.8/rubygems/commands
install -c -m 0644 rubygems/commands/generate_index_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/generate_index_command.rb
install -c -m 0644 rubygems/commands/fetch_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/fetch_command.rb
install -c -m 0644 rubygems/commands/contents_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/contents_command.rb
install -c -m 0644 rubygems/commands/help_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/help_command.rb
install -c -m 0644 rubygems/commands/sources_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/sources_command.rb
install -c -m 0644 rubygems/commands/list_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/list_command.rb
install -c -m 0644 rubygems/commands/query_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/query_command.rb
install -c -m 0644 rubygems/commands/search_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/search_command.rb
install -c -m 0644 rubygems/commands/dependency_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/dependency_command.rb
install -c -m 0644 rubygems/commands/which_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/which_command.rb
install -c -m 0644 rubygems/commands/update_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/update_command.rb
install -c -m 0644 rubygems/commands/uninstall_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/uninstall_command.rb
install -c -m 0644 rubygems/commands/environment_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/environment_command.rb
install -c -m 0644 rubygems/commands/build_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/build_command.rb
install -c -m 0644 rubygems/commands/unpack_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/unpack_command.rb
install -c -m 0644 rubygems/commands/server_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/server_command.rb
install -c -m 0644 rubygems/commands/cert_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/cert_command.rb
install -c -m 0644 rubygems/commands/mirror_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/mirror_command.rb
install -c -m 0644 rubygems/commands/rdoc_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/rdoc_command.rb
install -c -m 0644 rubygems/commands/lock_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/lock_command.rb
install -c -m 0644 rubygems/commands/pristine_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/pristine_command.rb
install -c -m 0644 rubygems/commands/check_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/check_command.rb
install -c -m 0644 rubygems/commands/cleanup_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/cleanup_command.rb
install -c -m 0644 rubygems/commands/specification_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/specification_command.rb
install -c -m 0644 rubygems/commands/outdated_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/outdated_command.rb
install -c -m 0644 rubygems/commands/install_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb
install -c -m 0644 rubygems/builder.rb /usr/lib/ruby/site_ruby/1.8/rubygems/builder.rb
mkdir -p /usr/lib/ruby/site_ruby/1.8/rubygems/ext
install -c -m 0644 rubygems/ext/rake_builder.rb /usr/lib/ruby/site_ruby/1.8/rubygems/ext/rake_builder.rb
install -c -m 0644 rubygems/ext/configure_builder.rb /usr/lib/ruby/site_ruby/1.8/rubygems/ext/configure_builder.rb
install -c -m 0644 rubygems/ext/builder.rb /usr/lib/ruby/site_ruby/1.8/rubygems/ext/builder.rb
install -c -m 0644 rubygems/ext/ext_conf_builder.rb /usr/lib/ruby/site_ruby/1.8/rubygems/ext/ext_conf_builder.rb
install -c -m 0644 rubygems/old_format.rb /usr/lib/ruby/site_ruby/1.8/rubygems/old_format.rb
install -c -m 0644 ubygems.rb /usr/lib/ruby/site_ruby/1.8/ubygems.rb
install -c -m 0644 rubygems.rb /usr/lib/ruby/site_ruby/1.8/rubygems.rb
mkdir -p /usr/lib/ruby/site_ruby/1.8/rbconfig
install -c -m 0644 rbconfig/datadir.rb /usr/lib/ruby/site_ruby/1.8/rbconfig/datadir.rb
cp gem /tmp/gem
install -c -m 0755 /tmp/gem /usr/bin/gem
rm /tmp/gem
rm -f /usr/lib/ruby/gems/1.8/source_cache
Removing old RubyGems RDoc and ri
Installing rubygems-1.1.1 ri into /usr/lib/ruby/gems/1.8/doc/rubygems-1.1.1/ri
Installing rubygems-1.1.1 rdoc into /usr/lib/ruby/gems/1.8/doc/rubygems-1.1.1/rdoc
As of RubyGems 0.8.0, library stubs are no longer needed.
Searching $LOAD_PATH for stubs to optionally delete (may take a while)
...done.
No library stubs found.
▼<yum update>
[一般ユーザ@ rubygems-1.1.1]$
Transaction Summary
=============================================================================
Install 7 Package(s)
Update 231 Package(s)
Remove 1 Package(s)
Total download size: 386 M
Is this ok [y/N]: y
Downloading Packages:
(1/238): libraw1394-1.2.1 100% |=========================| 43 kB 00:06
(238/238): qt-3.3.8b-1.fc 100% |=========================| 3.6 MB 00:16
Removed: kernel.i686 0:2.6.21-1.3194.fc7
Installed: kernel.i686 0:2.6.23.15-80.fc7
Complete!
▼<ImageMagick-devel・ruby-devel・rubygems・ghostscript-devel・lcms-develインストール/ruby・IMgageMagickがインストール済であることを確認>
[root@]# yum install ruby ruby-devel rubygems ImageMagick ImageMagick-devel ruby-mysql httpd
Package ruby - 1.8.6.114-1.fc7.i386 is already installed.
Package ImageMagick - 6.3.2.9-3.fc7.i386 is already installed.
No package ruby-mysql httpd available.
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
ImageMagick-devel i386 6.3.2.9-3.fc7 fedora 76 k
ruby-devel i386 1.8.6.114-1.fc7 updates 770 k
rubygems noarch 0.9.4-1.fc7 updates 498 k
Installing for dependencies:
ghostscript-devel i386 8.15.4-4.fc7 updates 41 k
lcms-devel i386 1.16-3 fedora 51 k
Transaction Summary
=============================================================================
Install 5 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Is this ok [y/N]: y
Installed: ImageMagick-devel.i386 0:6.3.2.9-3.fc7 ruby-devel.i386 0:1.8.6.114-1.fc7 rubygems.noarch 0:0.9.4-1.fc7
Dependency Installed: ghostscript-devel.i386 0:8.15.4-4.fc7 lcms-devel.i386 0:1.16-3
Complete!
▼<mysql-serverインストール済であることを確認>
[一般ユーザ@]$ yum -y install mysql-server
You need to be root to perform this command.
[一般ユーザ@]$ sudo yum -y install mysql-server
Password:
Package mysql-server - 5.0.45-6.fc7.i386 is already installed.
Nothing to do
▼<railsインストール>
[一般ユーザ@ rubygems-1.1.1]$ sudo gem install -y rails
INFO: `gem install -y` is now default and will be removed
INFO: use --ignore-dependencies to install only the gems you list
Bulk updating Gem source index for: http://gems.rubyforge.org/
Successfully installed rails-2.0.2
1 gem installed
▼<passengerインストール>
[一般ユーザ@]$ sudo gem install passenger
Building native extensions. This could take a while...
Successfully installed fastthread-1.0.1
Successfully installed passenger-1.0.5
2 gems installed
Installing ri documentation for fastthread-1.0.1...
No definition for dummy_dump
No definition for rb_queue_marshal_load
No definition for rb_queue_marshal_dump
Installing ri documentation for passenger-1.0.5...
Installing RDoc documentation for fastthread-1.0.1...
No definition for dummy_dump
No definition for rb_queue_marshal_load
No definition for rb_queue_marshal_dump
Installing RDoc documentation for passenger-1.0.5...
./doc/template/horo.rb:17: warning: already initialized constant FONTS
./doc/template/horo.rb:19: warning: already initialized constant STYLE
./doc/template/horo.rb:213: warning: already initialized constant XHTML_PREAMBLE
./doc/template/horo.rb:221: warning: already initialized constant HEADER
./doc/template/horo.rb:272: warning: already initialized constant FILE_PAGE
./doc/template/horo.rb:300: warning: already initialized constant CLASS_PAGE
./doc/template/horo.rb:338: warning: already initialized constant METHOD_LIST
./doc/template/horo.rb:486: warning: already initialized constant FOOTER
./doc/template/horo.rb:491: warning: already initialized constant BODY
./doc/template/horo.rb:503: warning: already initialized constant SRC_PAGE
./doc/template/horo.rb:531: warning: already initialized constant FR_INDEX_BODY
./doc/template/horo.rb:535: warning: already initialized constant FILE_INDEX
./doc/template/horo.rb:583: warning: already initialized constant CLASS_INDEX
./doc/template/horo.rb:584: warning: already initialized constant METHOD_INDEX
./doc/template/horo.rb:586: warning: already initialized constant INDEX
▼<fastthreadインストール>
[一般ユーザ@]$ sudo gem install fastthread
Building native extensions. This could take a while...
Successfully installed fastthread-1.0.1
1 gem installed
Installing ri documentation for fastthread-1.0.1...
No definition for dummy_dump
No definition for rb_queue_marshal_load
No definition for rb_queue_marshal_dump
Installing RDoc documentation for fastthread-1.0.1...
No definition for dummy_dump
No definition for rb_queue_marshal_load
No definition for rb_queue_marshal_dump
▼<Apache 2 moduleインストール>
[一般ユーザ@]$ sudo passenger-install-apache2-module
Welcome to the Passenger Apache 2 module installer, v1.0.5.
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.
1
Checking for required software...
* GNU C++ compiler... found at /usr/lib/ccache/g++
* Ruby development headers... found
* OpenSSL support for Ruby... found
* RubyGems... found
* Rake... found at /usr/bin/rake
* Apache 2... found at /usr/sbin/httpd
* Apache 2 development headers... not found
* Apache Portable Runtime (APR) development headers... found
* fastthread... 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 Apache 2 development headers:
Please run yum install httpd-devel as root.
▼<Apache 2 development headersインストール>
[一般ユーザ@]$ sudo yum install httpd-devel
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
httpd-devel i386 2.2.8-1.fc7 updates 144 k
Installing for dependencies:
apr-devel i386 1.2.8-6 fedora 170 k
apr-util-devel i386 1.2.10-1.fc7 updates 54 k
Transaction Summary
=============================================================================
Install 3 Package(s)
Is this ok [y/N]: y
Installed: httpd-devel.i386 0:2.2.8-1.fc7
Dependency Installed: apr-devel.i386 0:1.2.8-6 apr-util-devel.i386 0:1.2.10-1.fc7
Complete!
[一般ユーザ@]$ sudo passenger-install-apache2-module
Password:
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.
Press Enter to continue, or Ctrl-C to abort.
2
Checking for required software...
* GNU C++ compiler... found at /usr/lib/ccache/g++
* Ruby development headers... found
* OpenSSL support for Ruby... found
* RubyGems... found
* Rake... found at /usr/bin/rake
* Apache 2... found at /usr/sbin/httpd
* Apache 2 development headers... found at /usr/sbin/apxs
* Apache Portable Runtime (APR) development headers... found at /usr/bin/apr-1-config
* fastthread... found
--------------------------------------------
--------------------------------------------
Compiling and installing Apache 2 module...
cd /usr/lib/ruby/gems/1.8/gems/passenger-1.0.5
rake clean apache2
(in /usr/lib/ruby/gems/1.8/gems/passenger-1.0.5)
### In ext/apache2:
rm -rf Utils.o Logging.o Configuration.o Hooks.o mod_passenger.o mod_passenger.so
### In ext/passenger:
make clean
rm -f Makefile
### In ext/boost/src:
rm -f libboost_thread.a *.o
### In test:
rm -f Apache2ModuleTests *.o
### In benchmark:
rm -f DummyRequestHandler
### In ext/boost/src:
g++ -O2 -fPIC -I../.. -D_REENTRANT -DNDEBUG -c *.cpp
ar cru libboost_thread.a *.o
ranlib libboost_thread.a
### In ext/apache2:
g++ -I.. -fPIC -g -DPASSENGER_DEBUG -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I/usr/include/apr-1 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -I/usr/include/httpd -D_REENTRANT -Wall -g -I/usr/local/include -c mod_passenger.c
### In ext/apache2:
g++ -I.. -fPIC -g -DPASSENGER_DEBUG -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I/usr/include/apr-1 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -I/usr/include/httpd -D_REENTRANT -Wall -g -I/usr/local/include -c Utils.cpp
### In ext/apache2:
g++ -I.. -fPIC -g -DPASSENGER_DEBUG -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I/usr/include/apr-1 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -I/usr/include/httpd -D_REENTRANT -Wall -g -I/usr/local/include -c Logging.cpp
### In ext/apache2:
g++ -I.. -fPIC -g -DPASSENGER_DEBUG -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I/usr/include/apr-1 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -I/usr/include/httpd -D_REENTRANT -Wall -g -I/usr/local/include -c Configuration.cpp
### In ext/apache2:
g++ -I.. -fPIC -g -DPASSENGER_DEBUG -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I/usr/include/apr-1 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -I/usr/include/httpd -D_REENTRANT -Wall -g -I/usr/local/include -c Hooks.cpp
### In ext/apache2:
g++ -shared Utils.o Logging.o Configuration.o Hooks.o mod_passenger.o -fPIC -o mod_passenger.so -lstdc++ -lpthread ../boost/src/libboost_thread.a -lapr-1
### In ext/passenger:
ruby extconf.rb
creating Makefile
### In ext/passenger:
make
gcc -I. -I/usr/lib/ruby/1.8/i386-linux -I/usr/lib/ruby/1.8/i386-linux -I. -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -Wall -fPIC -c native_support.c
gcc -shared -o native_support.so native_support.o -L"." -L"/usr/lib" -L. -rdynamic -Wl,-export-dynamic -lruby -lpthread -ldl -lcrypt -lm -lc
--------------------------------------------
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-1.0.5/ext/apache2/mod_passenger.so
RailsSpawnServer /usr/lib/ruby/gems/1.8/gems/passenger-1.0.5/bin/passenger-spawn-server
RailsRuby /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!
--------------------------------------------
Deploying a Ruby on Rails application: an example
Suppose you have a Ruby on Rails application in /somewhere. Add a virtual host
to your Apache configuration file, and set its DocumentRoot to
/somewhere/public, like this:
ServerName www.yourhost.com
DocumentRoot /somewhere/public
And that's it! You may also want to check the Users Guide for security and
optimization tips and other useful information:
/usr/lib/ruby/gems/1.8/gems/passenger-1.0.5/doc/Users guide.html
Enjoy Passenger, a product of Phusion (www.phusion.nl)
http://www.modrails.com/
▼<httpd.conf 編集>
cd /etc/httpd/conf
vi httpd.conf
下記行追加
LoadModule passenger_module /opt/local/lib/ruby/gems/1.8/gems/passenger-1.0.1/ext/apache2/mod_passenger.so
RailsSpawnServer /opt/local/lib/ruby/gems/1.8/gems/passenger-1.0.1/bin/passenger-spawn-server
RailsRuby /opt/local/bin/ruby
RailsEnv development
▼で、今はここ。
疲れたので、休憩中。
これからどうする?
▼メモ
・Mongrel
・Thin
・Passenger
▼参考url
▽今週の話題 : Passenger (mod_rails for Apache) - Apache で簡単に Rails を運用など - WebOS Goodies
http://webos-goodies.jp/archives/51320129.html
▽MOONGIFT: » チェック必須!Rails新時代の到来か?「Passenger(mod_rails for Apache)」:オープンソースを毎日紹介
http://www.moongift.jp/2008/04/passenger/
▽Rails 2.0 » ホスティングサービスでもRailsが利用できるようになるかも、な「Passenger」
http://rails20.jp/2008/04/passenger/
▽サーバのIPアドレス/PROGRAMMIN3G/ウェブプログラミング
http://inwr2.ifdef.jp/linux/homeserver/0/index.html
▽未サポートのエスケープシーケンスを見つけました ESC [?1034h/端っこなひとの備忘録: Fedora7のネットワークインストールメモ
http://animemo.seesaa.net/article/92542363.html
▽Apacheのバージョンを調べるには
http://www.ksknet.net/apache/apache_1.html
▽sudoコマンドは、なにも設定していない状態では一般ユーザはデフォルトで使用できないようになっています/sudo による管理者権限の付与
http://linux.kororo.jp/cont/intro/sudo.php
▽visudoコマンド/root用コマンドを特定ユーザーが実行できるようにするには
http://www.atmarkit.co.jp/flinux/rensai/linuxtips/221rootcomuse.html
▽rubygemsとは - はてなダイアリー
http://d.hatena.ne.jp/keyword/rubygems
▽コマンド名がgemであるRuby のパッケージ管理システムRubyGemsをインストール/PROGRAMMIN3G/ウェブプログラミング
http://inwr2.ifdef.jp/linux/vmware2/vmfile3/index.html
▽Another app is currently holding the yum lock; waiting for it to exit.../FC8のアップデートが出来なくなりました。
http://kajuhome.com/cgi-bin/patio/patio.cgi?mode=view&no=1480
▽wget command not found/コマンドがないと言われています。 - 教えて!goo
http://oshiete1.goo.ne.jp/qa2107370.html
▽`gem_original_require': no such file to load -- rdoc/rdoc (LoadError)/CentOS5にRailsインストール - Get crazy
http://d.hatena.ne.jp/mtbtaizo/20070909
■<Xreaでrailsアプリを公開したい>
自宅サーバーは「スペックがあまりよろしくない」&「そもそも仕組み自体をよく分かっていない」ため、できればXreaで公開したいと考えていた。前回、ググったときはレスポンスとかが厳しそうだったけど、そろそろ何か進展あるかも? てことで期待をしながら再度検索してみたのだが……、。
結論としては、Xreaでrailsアプリを公開してみよーってのは、ちょっと難しいようだ。
さらに、この壮大なるプロジェクトにかけることが出来る予算は、実質的に0円なので、他のレンサバを借りることは出来ない……。=やっぱ、自宅サーバーしかないのか……。
■<自宅サーバーでrailsサンプルを動かしたい>
「Fast CGI」とか全然やったこともないのに、何か良さ気なヤツを発見したので、とりあえず試してみることにする。「Passenger」? 聞いたこともない名前だけど……。
■<サーバ環境>
・Fedora7
・Web&ファイル共有サーバーとして、以前、構築していたもの(スクラップ同然のスペックということもあり、基本的にかなりの放置プレイ中)
▼<Apacheバージョン確認>
・Poderosa―新規接続[ホスト(H)][アカウント(A)][パスフレーズ(P)]
未サポートのエスケープシーケンスを見つけました ESC [?1034h
exit
・Poderosa―新規接続[種類(Y)]プルダウンより、xtermをvt100へと変更
[一般user@]$ httpd -v
-bash: httpd: command not found
[一般user@]$ su -
パスワード:
[root@]# httpd -v
Server version: Apache/2.2.6 (Unix)
▼<一般userに対してsudo コマンドを使用できるよう設定>
・Poderosa―rootで新規接続
visudo
Enter
I―インサートモードへ
最後の行に、sampleuser ALL=(ALL) ALL を追加
Esc―コマンドモードへ
:wq―保存して終了
exit
・Poderosa―一般userで新規接続
試しにroot しか閲覧することのできない/var/log/messageをsudo コマンドを実行してみることにする。
sudo tail /var/log/messages
Password:一般userのパスワード
May 14 10:48:53 一般user ntpd[1691]: kernel time sync status change 0001
▼<「yum-updatesd」サービス停止>
[一般user@]$ /etc/rc.d/init.d/yum-updatesd stop
yum-updates を停止中: [失敗]
rm: cannot remove `/var/lock/subsys/yum-updatesd': 許可がありません
Another app is currently holding the yum lock; waiting for it to exit...
Another app is currently holding the yum lock; waiting for it to exit...
Exiting on user cancel.
[一般user@]$ sudo /etc/rc.d/init.d/yum-updatesd stop
yum-updates を停止中:
[ OK ]
▼<rubyインストール>
[一般user@]$ yum -y install ruby
You need to be root to perform this command.
[一般user@]$ sudo yum -y install ruby
Password:
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
ruby i386 1.8.6.114-1.fc7 updates 514 k
Updating for dependencies:
ruby-libs i386 1.8.6.114-1.fc7 updates 1.7 M
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 1 Package(s)
Complete!
▼<wgetインストール>
[一般user@]$ yum install wget
You need to be root to perform this command.
[root@]# yum install wget
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
wget i386 1.10.2-15.fc7 fedora 585 k
Transaction Summary
=============================================================================
Install 1 Package(s)
Is this ok [y/N]: y
Installed: wget.i386 0:1.10.2-15.fc7
Complete!
▼<rubygemsインストール>
[一般user@]$ wget http://rubyforge.org/frs/download.php/35283/rubygems-1.1.1.tgz
17:29:11 (134.33 KB/s) - `rubygems-1.1.1.tgz' を保存しました [423308/423308]
[一般user@]$ ls
rubygems-1.1.1.tgz
[一般user@]$ tar xzf rubygems-1.1.1.tgz
[一般user@]$ ls
rubygems-1.1.1 rubygems-1.1.1.tgz
[一般user@]$ cd rubygems-1.1.1
[一般user@ rubygems-1.1.1]$ sudo ruby setup.rb
Password:
./lib/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- rdoc/rdoc (LoadError)
from ./lib/rubygems/custom_require.rb:27:in `require'
from setup.rb:51
▼<rdocインストール>
[一般user@ rubygems-1.1.1]$ yum install rdoc
You need to be root to perform this command.
[一般user@アドレス rubygems-1.1.1]$ sudo yum install rdoc
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
ruby-rdoc i386 1.8.6.114-1.fc7 updates 342 k
Installing for dependencies:
ruby-irb i386 1.8.6.114-1.fc7 updates 274 k
Transaction Summary
=============================================================================
Install 2 Package(s)
Is this ok [y/N]: y
Installed: ruby-rdoc.i386 0:1.8.6.114-1.fc7
Dependency Installed: ruby-irb.i386 0:1.8.6.114-1.fc7
Complete!
▼<rubygemsインストールに再挑戦>
[一般user@ rubygems-1.1.1]$ sudo ruby setup.rb
Password:
mkdir -p /usr/lib/ruby/site_ruby/1.8/rubygems
install -c -m 0644 rubygems/gem_path_searcher.rb /usr/lib/ruby/site_ruby/1.8/rubygems/gem_path_searcher.rb
install -c -m 0644 rubygems/exceptions.rb /usr/lib/ruby/site_ruby/1.8/rubygems/exceptions.rb
mkdir -p /usr/lib/ruby/site_ruby/1.8/rubygems/digest
install -c -m 0644 rubygems/digest/sha2.rb /usr/lib/ruby/site_ruby/1.8/rubygems/digest/sha2.rb
install -c -m 0644 rubygems/digest/digest_adapter.rb /usr/lib/ruby/site_ruby/1.8/rubygems/digest/digest_adapter.rb
install -c -m 0644 rubygems/digest/md5.rb /usr/lib/ruby/site_ruby/1.8/rubygems/digest/md5.rb
install -c -m 0644 rubygems/digest/sha1.rb /usr/lib/ruby/site_ruby/1.8/rubygems/digest/sha1.rb
install -c -m 0644 rubygems/validator.rb /usr/lib/ruby/site_ruby/1.8/rubygems/validator.rb
install -c -m 0644 rubygems/defaults.rb /usr/lib/ruby/site_ruby/1.8/rubygems/defaults.rb
install -c -m 0644 rubygems/installer.rb /usr/lib/ruby/site_ruby/1.8/rubygems/installer.rb
install -c -m 0644 rubygems/user_interaction.rb /usr/lib/ruby/site_ruby/1.8/rubygems/user_interaction.rb
install -c -m 0644 rubygems/dependency_installer.rb /usr/lib/ruby/site_ruby/1.8/rubygems/dependency_installer.rb
install -c -m 0644 rubygems/version.rb /usr/lib/ruby/site_ruby/1.8/rubygems/version.rb
install -c -m 0644 rubygems/command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/command.rb
mkdir -p /usr/lib/ruby/site_ruby/1.8/rubygems/indexer
install -c -m 0644 rubygems/indexer/latest_index_builder.rb /usr/lib/ruby/site_ruby/1.8/rubygems/indexer/latest_index_builder.rb
install -c -m 0644 rubygems/indexer/master_index_builder.rb /usr/lib/ruby/site_ruby/1.8/rubygems/indexer/master_index_builder.rb
install -c -m 0644 rubygems/indexer/quick_index_builder.rb /usr/lib/ruby/site_ruby/1.8/rubygems/indexer/quick_index_builder.rb
install -c -m 0644 rubygems/indexer/marshal_index_builder.rb /usr/lib/ruby/site_ruby/1.8/rubygems/indexer/marshal_index_builder.rb
install -c -m 0644 rubygems/indexer/abstract_index_builder.rb /usr/lib/ruby/site_ruby/1.8/rubygems/indexer/abstract_index_builder.rb
install -c -m 0644 rubygems/security.rb /usr/lib/ruby/site_ruby/1.8/rubygems/security.rb
install -c -m 0644 rubygems/config_file.rb /usr/lib/ruby/site_ruby/1.8/rubygems/config_file.rb
install -c -m 0644 rubygems/version_option.rb /usr/lib/ruby/site_ruby/1.8/rubygems/version_option.rb
install -c -m 0644 rubygems/source_index.rb /usr/lib/ruby/site_ruby/1.8/rubygems/source_index.rb
install -c -m 0644 rubygems/command_manager.rb /usr/lib/ruby/site_ruby/1.8/rubygems/command_manager.rb
install -c -m 0644 rubygems/doc_manager.rb /usr/lib/ruby/site_ruby/1.8/rubygems/doc_manager.rb
install -c -m 0644 rubygems/require_paths_builder.rb /usr/lib/ruby/site_ruby/1.8/rubygems/require_paths_builder.rb
install -c -m 0644 rubygems/gem_openssl.rb /usr/lib/ruby/site_ruby/1.8/rubygems/gem_openssl.rb
install -c -m 0644 rubygems/source_info_cache.rb /usr/lib/ruby/site_ruby/1.8/rubygems/source_info_cache.rb
install -c -m 0644 rubygems/dependency.rb /usr/lib/ruby/site_ruby/1.8/rubygems/dependency.rb
install -c -m 0644 rubygems/format.rb /usr/lib/ruby/site_ruby/1.8/rubygems/format.rb
install -c -m 0644 rubygems/server.rb /usr/lib/ruby/site_ruby/1.8/rubygems/server.rb
install -c -m 0644 rubygems/local_remote_options.rb /usr/lib/ruby/site_ruby/1.8/rubygems/local_remote_options.rb
install -c -m 0644 rubygems/remote_fetcher.rb /usr/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb
install -c -m 0644 rubygems/uninstaller.rb /usr/lib/ruby/site_ruby/1.8/rubygems/uninstaller.rb
install -c -m 0644 rubygems/dependency_list.rb /usr/lib/ruby/site_ruby/1.8/rubygems/dependency_list.rb
install -c -m 0644 rubygems/rubygems_version.rb /usr/lib/ruby/site_ruby/1.8/rubygems/rubygems_version.rb
install -c -m 0644 rubygems/install_update_options.rb /usr/lib/ruby/site_ruby/1.8/rubygems/install_update_options.rb
install -c -m 0644 rubygems/package.rb /usr/lib/ruby/site_ruby/1.8/rubygems/package.rb
install -c -m 0644 rubygems/specification.rb /usr/lib/ruby/site_ruby/1.8/rubygems/specification.rb
install -c -m 0644 rubygems/source_info_cache_entry.rb /usr/lib/ruby/site_ruby/1.8/rubygems/source_info_cache_entry.rb
install -c -m 0644 rubygems/gem_runner.rb /usr/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb
install -c -m 0644 rubygems/custom_require.rb /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb
mkdir -p /usr/lib/ruby/site_ruby/1.8/rubygems/package
install -c -m 0644 rubygems/package/tar_reader.rb /usr/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader.rb
mkdir -p /usr/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader
install -c -m 0644 rubygems/package/tar_reader/entry.rb /usr/lib/ruby/site_ruby/1.8/rubygems/package/tar_reader/entry.rb
install -c -m 0644 rubygems/package/tar_input.rb /usr/lib/ruby/site_ruby/1.8/rubygems/package/tar_input.rb
install -c -m 0644 rubygems/package/f_sync_dir.rb /usr/lib/ruby/site_ruby/1.8/rubygems/package/f_sync_dir.rb
install -c -m 0644 rubygems/package/tar_writer.rb /usr/lib/ruby/site_ruby/1.8/rubygems/package/tar_writer.rb
install -c -m 0644 rubygems/package/tar_header.rb /usr/lib/ruby/site_ruby/1.8/rubygems/package/tar_header.rb
install -c -m 0644 rubygems/package/tar_output.rb /usr/lib/ruby/site_ruby/1.8/rubygems/package/tar_output.rb
install -c -m 0644 rubygems/timer.rb /usr/lib/ruby/site_ruby/1.8/rubygems/timer.rb
install -c -m 0644 rubygems/indexer.rb /usr/lib/ruby/site_ruby/1.8/rubygems/indexer.rb
install -c -m 0644 rubygems/platform.rb /usr/lib/ruby/site_ruby/1.8/rubygems/platform.rb
install -c -m 0644 rubygems/requirement.rb /usr/lib/ruby/site_ruby/1.8/rubygems/requirement.rb
install -c -m 0644 rubygems/ext.rb /usr/lib/ruby/site_ruby/1.8/rubygems/ext.rb
mkdir -p /usr/lib/ruby/site_ruby/1.8/rubygems/commands
install -c -m 0644 rubygems/commands/generate_index_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/generate_index_command.rb
install -c -m 0644 rubygems/commands/fetch_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/fetch_command.rb
install -c -m 0644 rubygems/commands/contents_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/contents_command.rb
install -c -m 0644 rubygems/commands/help_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/help_command.rb
install -c -m 0644 rubygems/commands/sources_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/sources_command.rb
install -c -m 0644 rubygems/commands/list_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/list_command.rb
install -c -m 0644 rubygems/commands/query_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/query_command.rb
install -c -m 0644 rubygems/commands/search_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/search_command.rb
install -c -m 0644 rubygems/commands/dependency_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/dependency_command.rb
install -c -m 0644 rubygems/commands/which_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/which_command.rb
install -c -m 0644 rubygems/commands/update_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/update_command.rb
install -c -m 0644 rubygems/commands/uninstall_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/uninstall_command.rb
install -c -m 0644 rubygems/commands/environment_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/environment_command.rb
install -c -m 0644 rubygems/commands/build_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/build_command.rb
install -c -m 0644 rubygems/commands/unpack_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/unpack_command.rb
install -c -m 0644 rubygems/commands/server_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/server_command.rb
install -c -m 0644 rubygems/commands/cert_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/cert_command.rb
install -c -m 0644 rubygems/commands/mirror_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/mirror_command.rb
install -c -m 0644 rubygems/commands/rdoc_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/rdoc_command.rb
install -c -m 0644 rubygems/commands/lock_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/lock_command.rb
install -c -m 0644 rubygems/commands/pristine_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/pristine_command.rb
install -c -m 0644 rubygems/commands/check_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/check_command.rb
install -c -m 0644 rubygems/commands/cleanup_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/cleanup_command.rb
install -c -m 0644 rubygems/commands/specification_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/specification_command.rb
install -c -m 0644 rubygems/commands/outdated_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/outdated_command.rb
install -c -m 0644 rubygems/commands/install_command.rb /usr/lib/ruby/site_ruby/1.8/rubygems/commands/install_command.rb
install -c -m 0644 rubygems/builder.rb /usr/lib/ruby/site_ruby/1.8/rubygems/builder.rb
mkdir -p /usr/lib/ruby/site_ruby/1.8/rubygems/ext
install -c -m 0644 rubygems/ext/rake_builder.rb /usr/lib/ruby/site_ruby/1.8/rubygems/ext/rake_builder.rb
install -c -m 0644 rubygems/ext/configure_builder.rb /usr/lib/ruby/site_ruby/1.8/rubygems/ext/configure_builder.rb
install -c -m 0644 rubygems/ext/builder.rb /usr/lib/ruby/site_ruby/1.8/rubygems/ext/builder.rb
install -c -m 0644 rubygems/ext/ext_conf_builder.rb /usr/lib/ruby/site_ruby/1.8/rubygems/ext/ext_conf_builder.rb
install -c -m 0644 rubygems/old_format.rb /usr/lib/ruby/site_ruby/1.8/rubygems/old_format.rb
install -c -m 0644 ubygems.rb /usr/lib/ruby/site_ruby/1.8/ubygems.rb
install -c -m 0644 rubygems.rb /usr/lib/ruby/site_ruby/1.8/rubygems.rb
mkdir -p /usr/lib/ruby/site_ruby/1.8/rbconfig
install -c -m 0644 rbconfig/datadir.rb /usr/lib/ruby/site_ruby/1.8/rbconfig/datadir.rb
cp gem /tmp/gem
install -c -m 0755 /tmp/gem /usr/bin/gem
rm /tmp/gem
rm -f /usr/lib/ruby/gems/1.8/source_cache
Removing old RubyGems RDoc and ri
Installing rubygems-1.1.1 ri into /usr/lib/ruby/gems/1.8/doc/rubygems-1.1.1/ri
Installing rubygems-1.1.1 rdoc into /usr/lib/ruby/gems/1.8/doc/rubygems-1.1.1/rdoc
As of RubyGems 0.8.0, library stubs are no longer needed.
Searching $LOAD_PATH for stubs to optionally delete (may take a while)
...done.
No library stubs found.
▼<yum update>
[一般ユーザ@ rubygems-1.1.1]$
Transaction Summary
=============================================================================
Install 7 Package(s)
Update 231 Package(s)
Remove 1 Package(s)
Total download size: 386 M
Is this ok [y/N]: y
Downloading Packages:
(1/238): libraw1394-1.2.1 100% |=========================| 43 kB 00:06
(238/238): qt-3.3.8b-1.fc 100% |=========================| 3.6 MB 00:16
Removed: kernel.i686 0:2.6.21-1.3194.fc7
Installed: kernel.i686 0:2.6.23.15-80.fc7
Complete!
▼<ImageMagick-devel・ruby-devel・rubygems・ghostscript-devel・lcms-develインストール/ruby・IMgageMagickがインストール済であることを確認>
[root@]# yum install ruby ruby-devel rubygems ImageMagick ImageMagick-devel ruby-mysql httpd
Package ruby - 1.8.6.114-1.fc7.i386 is already installed.
Package ImageMagick - 6.3.2.9-3.fc7.i386 is already installed.
No package ruby-mysql httpd available.
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
ImageMagick-devel i386 6.3.2.9-3.fc7 fedora 76 k
ruby-devel i386 1.8.6.114-1.fc7 updates 770 k
rubygems noarch 0.9.4-1.fc7 updates 498 k
Installing for dependencies:
ghostscript-devel i386 8.15.4-4.fc7 updates 41 k
lcms-devel i386 1.16-3 fedora 51 k
Transaction Summary
=============================================================================
Install 5 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Is this ok [y/N]: y
Installed: ImageMagick-devel.i386 0:6.3.2.9-3.fc7 ruby-devel.i386 0:1.8.6.114-1.fc7 rubygems.noarch 0:0.9.4-1.fc7
Dependency Installed: ghostscript-devel.i386 0:8.15.4-4.fc7 lcms-devel.i386 0:1.16-3
Complete!
▼<mysql-serverインストール済であることを確認>
[一般ユーザ@]$ yum -y install mysql-server
You need to be root to perform this command.
[一般ユーザ@]$ sudo yum -y install mysql-server
Password:
Package mysql-server - 5.0.45-6.fc7.i386 is already installed.
Nothing to do
▼<railsインストール>
[一般ユーザ@ rubygems-1.1.1]$ sudo gem install -y rails
INFO: `gem install -y` is now default and will be removed
INFO: use --ignore-dependencies to install only the gems you list
Bulk updating Gem source index for: http://gems.rubyforge.org/
Successfully installed rails-2.0.2
1 gem installed
▼<passengerインストール>
[一般ユーザ@]$ sudo gem install passenger
Building native extensions. This could take a while...
Successfully installed fastthread-1.0.1
Successfully installed passenger-1.0.5
2 gems installed
Installing ri documentation for fastthread-1.0.1...
No definition for dummy_dump
No definition for rb_queue_marshal_load
No definition for rb_queue_marshal_dump
Installing ri documentation for passenger-1.0.5...
Installing RDoc documentation for fastthread-1.0.1...
No definition for dummy_dump
No definition for rb_queue_marshal_load
No definition for rb_queue_marshal_dump
Installing RDoc documentation for passenger-1.0.5...
./doc/template/horo.rb:17: warning: already initialized constant FONTS
./doc/template/horo.rb:19: warning: already initialized constant STYLE
./doc/template/horo.rb:213: warning: already initialized constant XHTML_PREAMBLE
./doc/template/horo.rb:221: warning: already initialized constant HEADER
./doc/template/horo.rb:272: warning: already initialized constant FILE_PAGE
./doc/template/horo.rb:300: warning: already initialized constant CLASS_PAGE
./doc/template/horo.rb:338: warning: already initialized constant METHOD_LIST
./doc/template/horo.rb:486: warning: already initialized constant FOOTER
./doc/template/horo.rb:491: warning: already initialized constant BODY
./doc/template/horo.rb:503: warning: already initialized constant SRC_PAGE
./doc/template/horo.rb:531: warning: already initialized constant FR_INDEX_BODY
./doc/template/horo.rb:535: warning: already initialized constant FILE_INDEX
./doc/template/horo.rb:583: warning: already initialized constant CLASS_INDEX
./doc/template/horo.rb:584: warning: already initialized constant METHOD_INDEX
./doc/template/horo.rb:586: warning: already initialized constant INDEX
▼<fastthreadインストール>
[一般ユーザ@]$ sudo gem install fastthread
Building native extensions. This could take a while...
Successfully installed fastthread-1.0.1
1 gem installed
Installing ri documentation for fastthread-1.0.1...
No definition for dummy_dump
No definition for rb_queue_marshal_load
No definition for rb_queue_marshal_dump
Installing RDoc documentation for fastthread-1.0.1...
No definition for dummy_dump
No definition for rb_queue_marshal_load
No definition for rb_queue_marshal_dump
▼<Apache 2 moduleインストール>
[一般ユーザ@]$ sudo passenger-install-apache2-module
Welcome to the Passenger Apache 2 module installer, v1.0.5.
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.
1
Checking for required software...
* GNU C++ compiler... found at /usr/lib/ccache/g++
* Ruby development headers... found
* OpenSSL support for Ruby... found
* RubyGems... found
* Rake... found at /usr/bin/rake
* Apache 2... found at /usr/sbin/httpd
* Apache 2 development headers... not found
* Apache Portable Runtime (APR) development headers... found
* fastthread... 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 Apache 2 development headers:
Please run yum install httpd-devel as root.
▼<Apache 2 development headersインストール>
[一般ユーザ@]$ sudo yum install httpd-devel
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
httpd-devel i386 2.2.8-1.fc7 updates 144 k
Installing for dependencies:
apr-devel i386 1.2.8-6 fedora 170 k
apr-util-devel i386 1.2.10-1.fc7 updates 54 k
Transaction Summary
=============================================================================
Install 3 Package(s)
Is this ok [y/N]: y
Installed: httpd-devel.i386 0:2.2.8-1.fc7
Dependency Installed: apr-devel.i386 0:1.2.8-6 apr-util-devel.i386 0:1.2.10-1.fc7
Complete!
[一般ユーザ@]$ sudo passenger-install-apache2-module
Password:
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.
Press Enter to continue, or Ctrl-C to abort.
2
Checking for required software...
* GNU C++ compiler... found at /usr/lib/ccache/g++
* Ruby development headers... found
* OpenSSL support for Ruby... found
* RubyGems... found
* Rake... found at /usr/bin/rake
* Apache 2... found at /usr/sbin/httpd
* Apache 2 development headers... found at /usr/sbin/apxs
* Apache Portable Runtime (APR) development headers... found at /usr/bin/apr-1-config
* fastthread... found
--------------------------------------------
--------------------------------------------
Compiling and installing Apache 2 module...
cd /usr/lib/ruby/gems/1.8/gems/passenger-1.0.5
rake clean apache2
(in /usr/lib/ruby/gems/1.8/gems/passenger-1.0.5)
### In ext/apache2:
rm -rf Utils.o Logging.o Configuration.o Hooks.o mod_passenger.o mod_passenger.so
### In ext/passenger:
make clean
rm -f Makefile
### In ext/boost/src:
rm -f libboost_thread.a *.o
### In test:
rm -f Apache2ModuleTests *.o
### In benchmark:
rm -f DummyRequestHandler
### In ext/boost/src:
g++ -O2 -fPIC -I../.. -D_REENTRANT -DNDEBUG -c *.cpp
ar cru libboost_thread.a *.o
ranlib libboost_thread.a
### In ext/apache2:
g++ -I.. -fPIC -g -DPASSENGER_DEBUG -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I/usr/include/apr-1 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -I/usr/include/httpd -D_REENTRANT -Wall -g -I/usr/local/include -c mod_passenger.c
### In ext/apache2:
g++ -I.. -fPIC -g -DPASSENGER_DEBUG -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I/usr/include/apr-1 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -I/usr/include/httpd -D_REENTRANT -Wall -g -I/usr/local/include -c Utils.cpp
### In ext/apache2:
g++ -I.. -fPIC -g -DPASSENGER_DEBUG -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I/usr/include/apr-1 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -I/usr/include/httpd -D_REENTRANT -Wall -g -I/usr/local/include -c Logging.cpp
### In ext/apache2:
g++ -I.. -fPIC -g -DPASSENGER_DEBUG -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I/usr/include/apr-1 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -I/usr/include/httpd -D_REENTRANT -Wall -g -I/usr/local/include -c Configuration.cpp
### In ext/apache2:
g++ -I.. -fPIC -g -DPASSENGER_DEBUG -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I/usr/include/apr-1 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -I/usr/include/httpd -D_REENTRANT -Wall -g -I/usr/local/include -c Hooks.cpp
### In ext/apache2:
g++ -shared Utils.o Logging.o Configuration.o Hooks.o mod_passenger.o -fPIC -o mod_passenger.so -lstdc++ -lpthread ../boost/src/libboost_thread.a -lapr-1
### In ext/passenger:
ruby extconf.rb
creating Makefile
### In ext/passenger:
make
gcc -I. -I/usr/lib/ruby/1.8/i386-linux -I/usr/lib/ruby/1.8/i386-linux -I. -fPIC -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -Wall -fPIC -c native_support.c
gcc -shared -o native_support.so native_support.o -L"." -L"/usr/lib" -L. -rdynamic -Wl,-export-dynamic -lruby -lpthread -ldl -lcrypt -lm -lc
--------------------------------------------
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-1.0.5/ext/apache2/mod_passenger.so
RailsSpawnServer /usr/lib/ruby/gems/1.8/gems/passenger-1.0.5/bin/passenger-spawn-server
RailsRuby /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!
--------------------------------------------
Deploying a Ruby on Rails application: an example
Suppose you have a Ruby on Rails application in /somewhere. Add a virtual host
to your Apache configuration file, and set its DocumentRoot to
/somewhere/public, like this:
ServerName www.yourhost.com
DocumentRoot /somewhere/public
And that's it! You may also want to check the Users Guide for security and
optimization tips and other useful information:
/usr/lib/ruby/gems/1.8/gems/passenger-1.0.5/doc/Users guide.html
Enjoy Passenger, a product of Phusion (www.phusion.nl)

http://www.modrails.com/
▼<httpd.conf 編集>
cd /etc/httpd/conf
vi httpd.conf
下記行追加
LoadModule passenger_module /opt/local/lib/ruby/gems/1.8/gems/passenger-1.0.1/ext/apache2/mod_passenger.so
RailsSpawnServer /opt/local/lib/ruby/gems/1.8/gems/passenger-1.0.1/bin/passenger-spawn-server
RailsRuby /opt/local/bin/ruby
RailsEnv development
▼で、今はここ。
疲れたので、休憩中。
これからどうする?
▼メモ
・Mongrel
・Thin
・Passenger
▼参考url
▽今週の話題 : Passenger (mod_rails for Apache) - Apache で簡単に Rails を運用など - WebOS Goodies
http://webos-goodies.jp/archives/51320129.html
▽MOONGIFT: » チェック必須!Rails新時代の到来か?「Passenger(mod_rails for Apache)」:オープンソースを毎日紹介
http://www.moongift.jp/2008/04/passenger/
▽Rails 2.0 » ホスティングサービスでもRailsが利用できるようになるかも、な「Passenger」
http://rails20.jp/2008/04/passenger/
▽サーバのIPアドレス/PROGRAMMIN3G/ウェブプログラミング
http://inwr2.ifdef.jp/linux/homeserver/0/index.html
▽未サポートのエスケープシーケンスを見つけました ESC [?1034h/端っこなひとの備忘録: Fedora7のネットワークインストールメモ
http://animemo.seesaa.net/article/92542363.html
▽Apacheのバージョンを調べるには
http://www.ksknet.net/apache/apache_1.html
▽sudoコマンドは、なにも設定していない状態では一般ユーザはデフォルトで使用できないようになっています/sudo による管理者権限の付与
http://linux.kororo.jp/cont/intro/sudo.php
▽visudoコマンド/root用コマンドを特定ユーザーが実行できるようにするには
http://www.atmarkit.co.jp/flinux/rensai/linuxtips/221rootcomuse.html
▽rubygemsとは - はてなダイアリー
http://d.hatena.ne.jp/keyword/rubygems
▽コマンド名がgemであるRuby のパッケージ管理システムRubyGemsをインストール/PROGRAMMIN3G/ウェブプログラミング
http://inwr2.ifdef.jp/linux/vmware2/vmfile3/index.html
▽Another app is currently holding the yum lock; waiting for it to exit.../FC8のアップデートが出来なくなりました。
http://kajuhome.com/cgi-bin/patio/patio.cgi?mode=view&no=1480
▽wget command not found/コマンドがないと言われています。 - 教えて!goo
http://oshiete1.goo.ne.jp/qa2107370.html
▽`gem_original_require': no such file to load -- rdoc/rdoc (LoadError)/CentOS5にRailsインストール - Get crazy
http://d.hatena.ne.jp/mtbtaizo/20070909




