Unicorn公式サイトhttp://unicorn.bogomips.org/
環境:Redhat系Linux
Apache:2.2
Unicorn:1.1.2
Ruby:1.8.5
Rails:2.3.5
Railsアプリ:Redmine
(続きを読む…)
Unicorn公式サイトhttp://unicorn.bogomips.org/
環境:Redhat系Linux
Apache:2.2
Unicorn:1.1.2
Ruby:1.8.5
Rails:2.3.5
Railsアプリ:Redmine
(続きを読む…)
Mongrelの監視のためにGodを入れてみた。
公式サイト:http://god.rubyforge.org/
参考にしたサイト:https://boxpanel.blueboxgrp.com/public/the_vault/index.php/Using_God_To_Monitor_Your_Processes#Step_1:_Installing_God
環境:Redhat系Linux
Ruby:1.8.5
Rails:2.3.5
Railsアプリ:Redmine
(続きを読む…)
あるチェックようのプログラムを使用したら、突然、ディスクI/Oエラーが・・・・
/ 以下に新規ファイルを作成できなくなるし・・・・・
一体、この症状は何なんだろう、と思って、マウント状況を調べてみたら
[root@s1 root]# cat /proc/mounts
rootfs / rootfs rw 0 0
/proc /proc proc rw 0 0
/dev/root / ext3 ro,data=ordered 0 0 ← なぜか リードオンリーに!!
/proc /proc proc rw 0 0
工工エエエエ(´Д`)エエエエ工工
なんでそうなるの・・・・・・
/ だからremountも出来ないし、マンドクセからリブートすることにした。
が、
rm: cannot remove ‘/ .auto-fsck’ : Read-Only file-system
と表示されてリブートできない・・・・
もう、しょうがないから電源を引っこ抜いて強制リブートすることに。
当然、リブートの途中でエラーが出て止まってしまった。
rootのパスワードを求められたので入力したら、とりあえずログイン
だけは出来るようになった。
本当はいけないんだけど、/をumountせずに fsck -y / としたら
無事に復旧しましたとさ。
めでたし めでたし。
●まず、epel、remiのリポジトリを追加
$ wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
$ wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
# rpm -Uvh remi-release-5.rpm epel-release-5-3.noarch.rpm
●PHP5.3のインストール
# yum remove php* 念の為
# yum --enablerepo=epel install libedit
# yum --enablerepo=remi install php
# yum --enablerepo=remi install php-mbstring
# yum --enablerepo=epel install t1lib
# yum --enablerepo=remi install php-gd
# service httpd restart
これでOK
プロジェクト管理システムとしてRedmineを使ってみたいな
と思ってインストールしてみた。
Mongrel ClusterとApacheで動かしてますが、意外に動作が軽いですね。
いい感じかも。(クックパッドもこの組み合わせらしいですね
ApacheTopっていい感じですねぇ。
http://freshmeat.net/projects/apachetop
インストールの仕方は簡単。
./configure して make && make install するだけ。
使い方は
$ apachetop -f /var/log/apache2/access_log
last hit: 09:40:27 atop runtime: 0 days, 00:02:50 09:40:32
All: 46 reqs ( 0.3/sec) 222.0K ( 1411.7B/sec) 4940.8B/req
2xx: 44 (95.7%) 3xx: 2 ( 4.3%) 4xx: 0 ( 0.0%) 5xx: 0 ( 0.0%)
R ( 30s): 6 reqs ( 0.2/sec) 39.1K ( 1335.4B/sec) 6676.8B/req
2xx: 6 ( 100%) 3xx: 0 ( 0.0%) 4xx: 0 ( 0.0%) 5xx: 0 ( 0.0%)
REQS REQ/S KB KB/S URL
1 0.07 0.7 0.0*/
1 0.07 0.5 0.0 /rules.html
1 0.09 3.1 0.3 /spec.shtml
1 0.09 6.8 0.6 /faq.html
1 0.10 22.3 2.2 /blog/root/
1 0.20 5.7 1.1 /blog/root/2009/01/news20090112html.html
データベースごとにパスワードを入力しないといけないらしいので
環境変数PGPASSWORDを使って
$ PGPASSWORD=パスワード
$ export PGPASSWORD
$ pg_dumpall > pgsql.dump
とすれば良いらしい。
定期的なバックアップをシェルスクリプトでとる場合は
#!/bin/sh
PGPASSWORD=パスワード
export PGPASSWORD
sudo -u postgres pg_dumpall > pgsql.dump
これで良いらしい。
他に良い解決方法はあるのかしら?
自宅サーバのApacheのチューニングの話。
自分以外アクセスしてないので、デフォルトの設定だと
メモリの無駄遣いのようですので、このように設定しました。
(preforkですよ
StartServers 4 # 起動時は4つのプロセスで
MinSpareServers 4 # 最小のアイドル数
MaxSpareServers 6 # 最大のアイドル数
ServerLimit 64
MaxClients 64 # お客さんが増えたら64までプロセスを増やします。
MaxRequestsPerChild 20 # 20リクエスト処理したら、さっさと終了
MaxMemFree 2000
某巨大サイトのApacheの設定は
こんな感じらしです。 次元が違いますね^^
(preforkですよ
StartServers 1024
MinSpareServers 703
MaxSpareServers 1024
ServerLimit 2048
MaxClients 2048
MaxRequestsPerChild 10000
MaxMemFree 2000
Windows XPにVMware Server 2とubuntu server 10.04をインストールした時のお話。
VMware上のubuntuからpingやwgetができない。nslookupの結果は正常に返ってくる。
(ネットワークはbridge接続
ZoneAlarmのインターネットゾーンセキュリティを中にしたら
正常にping出来るようになりました。
他に何かいい解決方法があったら教えてくらはい。
環境:Redhat系Linux
Apache Tomcat:6.0.13
JVM:1.6.0_02-b05
JDBC:postgresql-8.4-701.jdbc4.jar
(続きを読む…)
Powered by WordPress