<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
		xmlns:xhtml="http://www.w3.org/1999/xhtml"
>

<channel>
	<title>りでぃすとりびゅ～しょん &#187; Linux</title>
	<atom:link href="http://www.redistribution.cc/blog/category/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://www.redistribution.cc/blog</link>
	<description>日々の出来事など・・・。</description>
	<lastBuildDate>Sat, 24 Jul 2010 17:43:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.redistribution.cc/blog/category/linux/feed" />
		<item>
		<title>Apacheを停止すると起動しなくなる。</title>
		<link>http://www.redistribution.cc/blog/20100703_2162.html</link>
		<comments>http://www.redistribution.cc/blog/20100703_2162.html#comments</comments>
		<pubDate>Sat, 03 Jul 2010 05:40:59 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.redistribution.cc/blog/?p=2162</guid>
		<description><![CDATA[DL厨が来てApacheのプロセスを食い潰してから手動でApacheを停止すると
高確率で下記のErrorが出て起動できなくなったので復旧方法をφ(．．)メモメモ
# /etc/rc.d/init.d/httpd sta [...]]]></description>
			<content:encoded><![CDATA[<p>DL厨が来てApacheのプロセスを食い潰してから手動でApacheを停止すると<br />
高確率で下記のErrorが出て起動できなくなったので復旧方法をφ(．．)メモメモ</p>
<pre class="brush: php;"># /etc/rc.d/init.d/httpd start
httpd を起動中: (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
                                                           [失敗]</pre>
<p>原因は既に他のプロセスがポートを使用していること。<br />
大抵はapacheをバージョン違いで2つインストールしてるとか<br />
skypeを入れてるとポートが被るようです。<br />
#xamppで環境作ったりしてるとハマるみたいですね。<br />
Apacheの重複もないしその他アプリで80番占拠もしてないので・・・<br />
何で80番が占拠されるのかが不明。<br />
とりあえずkillしてしまえば復旧できそうですが、起動しているサービスでポートが<br />
重複している場合はポート変更をちゃんとしないと駄目ですね。</p>
<p>纏めて下記のコマンドkillっと・・・。</p>
<pre class="brush: php;">/sbin/fuser -kn tcp 80</pre>
<p>その後に、Apache起動すれば問題なく起動したのでよしとするか・・・。</p>
<p>原因は推測だけど、プロセスを食い潰してる＋CPUもかなり喰ってたので<br />
正常に停止できてなかったのかなと？</p>
<p>DL厨対策かミラーの公開を止めないとずっと続きそうだな・・・。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redistribution.cc/blog/20100703_2162.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.redistribution.cc/blog/20100703_2162.html" />
	</item>
		<item>
		<title>CentOS 5.5が適用されていた。</title>
		<link>http://www.redistribution.cc/blog/20100516_1907.html</link>
		<comments>http://www.redistribution.cc/blog/20100516_1907.html#comments</comments>
		<pubDate>Sun, 16 May 2010 04:04:46 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.redistribution.cc/blog/?p=1907</guid>
		<description><![CDATA[
ぇぇ。yum-cron止めて無かったので今朝CentOS 5.5が適用されてました(;ﾟロﾟ)
5/15にミラーサイトに配置されてたみたいですね。
#情報拾えてなかった(ﾟДﾟ)
CentOS 5.5 リリースノート( [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.redistribution.cc/blog/wp-content/plugins/wp-tegaki/wp-tegaki-img.php?tegaki_id=1907-0" alt="自動で本番環境にCentOS 5.5が入っちゃったっ！" width="412" height="28" /><br />
ぇぇ。yum-cron止めて無かったので今朝CentOS 5.5が適用されてました(;ﾟロﾟ)<br />
5/15にミラーサイトに配置されてたみたいですね。<br />
#情報拾えてなかった(ﾟДﾟ)</p>
<p><a href="http://wiki.centos.org/Manuals/ReleaseNotes/CentOS5.5" target="_blank">CentOS 5.5 リリースノート</a>(英語)で変更点はみてください。</p>
<p>特に問題はでてないので通常の</p>
<pre class="brush: php;">yum clean all
yum update
shutdown -r now</pre>
<p>で問題はないと思います。<br />
※自己責任でねっ♪</p>
<p>2010/06/09追記<br />
CentOS 5.4からのアップデート手順が公開されてるので追記。</p>
<pre class="brush: php;">yum clean all
yum update glibc\*
yum update yum\* rpm\* pyth\*
yum clean all
yum update mkinitrd nash
yum update selinux\*
yum update
shutdown -r now</pre>
<p>念のため・・・<br />
# cat /etc/redhat-release<br />
CentOS release 5.5 (Final)<br />
になってるか確認するといいかも(^^♪</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redistribution.cc/blog/20100516_1907.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.redistribution.cc/blog/20100516_1907.html" />
	</item>
		<item>
		<title>DLツールの防ぎ方？</title>
		<link>http://www.redistribution.cc/blog/20100510_1880.html</link>
		<comments>http://www.redistribution.cc/blog/20100510_1880.html#comments</comments>
		<pubDate>Mon, 10 May 2010 03:23:20 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.redistribution.cc/blog/?p=1880</guid>
		<description><![CDATA[りでぃすとりびゅ～しょんはBlogとして運用していますが、同じ鯖＆ドメインで
リディストリビュ～ションという18禁ゲームの体験版・デモムービー等のダウンロードミラー
のサイトも運用しています。
#ミラーサイトがメインでB [...]]]></description>
			<content:encoded><![CDATA[<p>りでぃすとりびゅ～しょんはBlogとして運用していますが、同じ鯖＆ドメインで<br />
リディストリビュ～ションという18禁ゲームの体験版・デモムービー等のダウンロードミラー<br />
のサイトも運用しています。<br />
#ミラーサイトがメインでBlogはついでだったり(@@;)</p>
<p>体験版とかのファイルは1ファイル数百MB(最近は500BM以上)が多くなっています。<br />
うちは元々回線が脆弱なのでDLツールを使われると鯖と回線への負荷が大変なことになってます。<br />
ってことで閉め出すのが一番と判断・・・。</p>
<p>※かなり端よった記事になってます。<br />
<span id="more-1880"></span><br />
分割ツールが何故迷惑なのかは・・・某サイト様で掲載されていたのを引用<br />
ダウンロードツールには初期設定で10分割ダウンロードとなっているものが少なくないと思います。<br />
これはファイル全体を10個に分けて、10並列でダウンロードしていると理解しているかも<br />
しれませんが、それは間違いです。</p>
<p>実際には10回より多くのダウンロードが行われていて、数百～数千回のダウンロードを<br />
行うケースが多いのです。<br />
数百～数千のダウンロードが実行されると、それぞれに不正アクセス対策の検査が行われるため、<br />
転送効率が大きく悪化します。</p>
<p>最速でダウンロードを行うことを意図しているのか、トリッキーな挙動が観測されています。<br />
例えば、途中でダウンロードを中断してダウンロードサイズをどんどん小さくしていく場合や、<br />
最初から小さいサイズでダウンロードを多数実行するケースが多く見られます。</p>
<p>20MBのファイルを16KBずつダウンロードすると1,280回になりますし、<br />
200MBのファイルを16KBずつダウンロードすると12,800回にもなります。<br />
(16KBは観測される最小のサイズです)</p>
<p>このように一人が数百～数千回のダウンロードを連続して行うと、アクセスの検査に<br />
10秒前後かかることがあります(ディスクのアクセスの待ち時間よりもはるかに長くなります)。<br />
そして、実際のデータ(16KB)のダウンロードには0.1秒もかかりません。<br />
つまり、分割ダウンロードするため転送速度が百分の一以下に落ちているのです。</p>
<p>転送速度を測りながらサイズを小さく変更するダウンロードツールの場合、<br />
最初は100KB～1MBのサイズで分割するものの、上の状況の通り転送速度が<br />
低めに出るために16KBにサイズを下げてしまいます。<br />
そして、状況をさらに悪化させます。</p>
<p>ダウンロードツールが10分割ダウンロードしたくても、Webサーバーが混雑しているために<br />
全て(10個)は受け付けられない場合がよくあります。<br />
また、サイトによって同時接続数を制限しているところが多数あります。</p>
<p>そのような状況でも、常に10個のダウンロードのリクエストを＜待ち時間無し＞で出し続ける<br />
ダウンロードツールが多いので、処理不可能なリクエストを延々と出し続ける→<br />
サーバーの処理の負荷が上がったままになるという状況になります<br />
(エラーで応答する場合でも処理コストがかかります)。</p>
<p>このために、状況を悪化させる→応答速度が悪くなる→転送速度が落ちるという悪循環になります。</p>
<p>ダウンロードツールでは重複したダウンロードを防ぐ仕組みが用意されていないのです。</p>
<p>例えば、あるサーバーでダウンロード設定をしたものの、なかなかファイルが落ちてこないので、<br />
別のサーバーでダウンロード設定をしたらすぐに落とせた場合、<br />
最初のダウンロード設定を残したままにするケースがあります。<br />
そのため、混雑しているサーバーのリクエストが残ったまま減らない困った状況になります。</p>
<p>分割ダウンロードはサーバー運用コストを本来の10倍以上に引き上げる迷惑行為です。</p>
<h3>.htaccessでの締め出し</h3>
<p>USER AGENTで有名どころのDLツールをお断り。</p>
<pre class="brush: plain;">&lt;IfModule mod_rewrite.c&gt;
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^.*【USER AGENTの文字列】.*$ [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^.*【USER AGENTの文字列】.*$ [NC]
RewriteRule .*$ http://www.google.co.jp/ [L]
&lt;/IfModule&gt;</pre>
<p>こんな感じで【USER AGENTの文字列】にHitするものがあればGoogleさんへ<br />
飛ばしてお引き取りしてます。</p>
<h3>iptablesでの締め出し</h3>
<pre class="brush: plain;"># 1秒間に○回を超える80番へのリクエストはログを記録して破棄
# ※DLTool攻撃対策
iptables -N LOG_DLTOOLDEATH
iptables -A LOG_DLTOOLDEATH -m limit --limit 1/s --limit-burst ○ -j ACCEPT
iptables -A LOG_DLTOOLDEATH -j LOG --log-prefix '[IPTABLES DLTOOLDEATH] : '
iptables -A LOG_DLTOOLDEATH -j DROP
iptables -A INPUT -p tcp --dport 80 -j LOG_DLTOOLDEATH</pre>
<p>※「&#8211;limit-burst ○ -j ACCEPT」の「○」に回数を数字で指定<br />
例：「&#8211;limit-burst 5 -j ACCEPT」<br />
これで1秒間に指定した回数のリクエストを送ってきたら接続を拒否されます。</p>
<h3>その他の方法での締め出し</h3>
<p>Apacheのモジュールでmod_dosdetector(DOS攻撃対策)やmod_limitipconn<br />
(同時ダウンロード数制限)を導入するのも効果的です。<br />
さらにSWATCH(ログ監視ツール)で監視してFWでカットさせるのもいいかもです。<br />
また、DLツールにはクッキー非対応の物があるのでDL時にクッキーを発行して<br />
あるかないかのチェックをさせるのもいいかもです。</p>
<h3>弊害？</h3>
<p>iptablesでの締め出しの場合、全パケットを審査するので・・・<br />
表示速度が落ちます(;ﾟロﾟ)<br />
しかしかなりのDLツールを閉め出せます。<br />
効果>利便性 となっていまいます(；´Д｀)</p>
<p>また、SWITCHはあまりシビアな設定にすると・・・・<br />
メモリをスワップまで食いつぶしてくれることになります。<br />
#iptablesでの締め出しを未適用の時。<br />
処理が追いつかないで鯖が死亡とかになります・・・。</p>
<h3>その他</h3>
<p>これ以上の締め出し設定は利便性がさらに犠牲になるので無理でしょうね。<br />
効果>>>利便性 みたいな感じに？<br />
これ以上する場合は、鯖の分離(Web用とデータ置き場用)にして・・・<br />
ルーターもいいやつに買い換えてとかしないと駄目そうです。</p>
<p>まぁ素人が設定してるのでプロからしたら、なんちゅ～設定してるんじゃ！<br />
ってなるかもでしょうけどね(;ﾟロﾟ)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redistribution.cc/blog/20100510_1880.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.redistribution.cc/blog/20100510_1880.html" />
	</item>
		<item>
		<title>Red Hat Enterprise Linux 5.5 リリースされていた。</title>
		<link>http://www.redistribution.cc/blog/20100406_1807.html</link>
		<comments>http://www.redistribution.cc/blog/20100406_1807.html#comments</comments>
		<pubDate>Tue, 06 Apr 2010 09:32:53 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.redistribution.cc/blog/?p=1807</guid>
		<description><![CDATA[3月31日にRed Hat Enterprise Linux 5.5 リリースされてましたね。
主な新機能は以下みたいです。
・最新プロセッサのサポート
・仮想化機能の拡張
・Windowsとの相互運用性の向上
他にも数 [...]]]></description>
			<content:encoded><![CDATA[<p>3月31日に<a href="http://www.jp.redhat.com/news_releases/2010/03312010.html" target="_blank">Red Hat Enterprise Linux 5.5 リリース</a>されてましたね。</p>
<p>主な新機能は以下みたいです。<br />
・最新プロセッサのサポート<br />
・仮想化機能の拡張<br />
・Windowsとの相互運用性の向上<br />
他にも数多くの機能追加・修正があるらしいですが・・・。</p>
<p>CentOS 5.5は5月辺りにはリリースされるのかな？<br />
Red Hat Enterprise Linux 6βも4月下旬頃に公開されるとか？<br />
今からいろいろと楽しみです。</p>
<p>ぼちぼちyum updateの自動実行を止めておくかな。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redistribution.cc/blog/20100406_1807.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.redistribution.cc/blog/20100406_1807.html" />
	</item>
		<item>
		<title>PCREでUnicode文字プロパティを使う</title>
		<link>http://www.redistribution.cc/blog/20100301_1510.html</link>
		<comments>http://www.redistribution.cc/blog/20100301_1510.html#comments</comments>
		<pubDate>Mon, 01 Mar 2010 14:36:42 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.redistribution.cc/blog/?p=1510</guid>
		<description><![CDATA[Red Hat Entreprise Linux 5 / CentOS 5の環境で「Unicode  properties」のサポートが無いので
preg_matchやpreg_replaceで\pとか使おうとするとPH [...]]]></description>
			<content:encoded><![CDATA[<p>Red Hat Entreprise Linux 5 / CentOS 5の環境で「Unicode  properties」のサポートが無いので<br />
preg_matchやpreg_replaceで\pとか使おうとするとPHP Warningが出ます。</p>
<pre class="brush: php;">PHP Warning: preg_replace() [function.preg-replace]: Compilation failed: support for \\P, \\p, and \\X has not been compiled at offset 16 in</pre>
<p>確認するにはpcretest -Cで確認できます。<br />
<code># pcretest -C<br />
PCRE version 6.6 06-Feb-2006<br />
Compiled with<br />
  UTF-8 support<br />
  No Unicode properties support<br />
  Newline character is LF<br />
  Internal link size = 2<br />
  POSIX malloc threshold = 10<br />
  Default match limit = 10000000<br />
  Default recursion depth limit = 10000000<br />
  Match recursion uses stack</code><br />
「No Unicode properties support」・・・サポートしてませんね(´д｀)<br />
リビルドするのは面倒なのでできものを頂いてきました。<br />
<a href="http://gaarai.com/wp-content/uploads/2009/01/pcre-66-27x86_64.rpm">ここ</a>からpcre-66-27&#215;86_64.rpmをDLしてインストール。<br />
<code># wget http://gaarai.com/wp-content/uploads/2009/01/pcre-66-27x86_64.rpm<br />
# rpm -ivh pcre-66-27x86_64.rpm<br />
# /etc/rc.d/init.d/httpd restart</code></p>
<p>再度pcretest -Cで確認<br />
<code># pcretest -C<br />
PCRE version 6.6 06-Feb-2006<br />
Compiled with<br />
  UTF-8 support<br />
  Unicode properties support<br />
  Newline character is LF<br />
  Internal link size = 2<br />
  POSIX malloc threshold = 10<br />
  Default match limit = 10000000<br />
  Default recursion depth limit = 10000000<br />
  Match recursion uses stack</code><br />
「Unicode properties support」になりました。<br />
PHP Warningも消えたので良しとしよう(笑)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redistribution.cc/blog/20100301_1510.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.redistribution.cc/blog/20100301_1510.html" />
	</item>
		<item>
		<title>CentOS 5.4を適用してみた(゜-゜)</title>
		<link>http://www.redistribution.cc/blog/20091023_447.html</link>
		<comments>http://www.redistribution.cc/blog/20091023_447.html#comments</comments>
		<pubDate>Fri, 23 Oct 2009 08:49:18 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.redistribution.cc/blog/?p=447</guid>
		<description><![CDATA[
げふん。げふん。
本当は少し待つつもりでしたが入れてみました。
CentOS 5.4 リリースノートで変更点はみてください。
アップデート手順は下記で行いました。
yum clean all
yum update gl [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.redistribution.cc/blog/wp-content/plugins/wp-tegaki/wp-tegaki-img.php?tegaki_id=447-0" alt="本番環境にCentOS 5.4入れちゃったっ！" width="338" height="28" /><br />
げふん。げふん。<br />
本当は少し待つつもりでしたが入れてみました。</p>
<p><a href="http://wiki.centos.org/Manuals/ReleaseNotes/CentOS5.4/Japanese" target="_blank">CentOS 5.4 リリースノート</a>で変更点はみてください。</p>
<p>アップデート手順は下記で行いました。</p>
<pre class="brush: php;">yum clean all
yum update glibc\*
yum update yum\* rpm\* python\*
yum clean all
yum update
yum update kernel\*
shutdown -r now</pre>
<p>無事に起動したら・・・再度yum updateを実行してください。<br />
うちでは下のエラーがでました（汁</p>
<pre class="brush: php;">Transaction Check Error:
  file /usr/share/emacs/site-lisp/psvn.el from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
  file /usr/share/locale/de/LC_MESSAGES/subversion.mo from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
  file /usr/share/locale/es/LC_MESSAGES/subversion.mo from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
  file /usr/share/locale/fr/LC_MESSAGES/subversion.mo from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
  file /usr/share/locale/it/LC_MESSAGES/subversion.mo from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
  file /usr/share/locale/ja/LC_MESSAGES/subversion.mo from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
  file /usr/share/locale/ko/LC_MESSAGES/subversion.mo from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
  file /usr/share/locale/nb/LC_MESSAGES/subversion.mo from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
  file /usr/share/locale/pl/LC_MESSAGES/subversion.mo from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
  file /usr/share/locale/pt_BR/LC_MESSAGES/subversion.mo from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
  file /usr/share/locale/sv/LC_MESSAGES/subversion.mo from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
  file /usr/share/locale/zh_CN/LC_MESSAGES/subversion.mo from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
  file /usr/share/locale/zh_TW/LC_MESSAGES/subversion.mo from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
  file /usr/share/man/man1/svn.1.gz from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
  file /usr/share/man/man1/svnadmin.1.gz from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
  file /usr/share/man/man1/svnlook.1.gz from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
  file /usr/share/man/man5/svnserve.conf.5.gz from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
  file /usr/share/man/man8/svnserve.8.gz from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386
  file /usr/share/xemacs/site-packages/lisp/psvn.el from install of subversion-1.6.5-0.1.el5.rf.x86_64 conflicts with file from package subversion-1.4.2-4.el5_3.1.i386

Error Summary
-------------</pre>
<p>subversionの64bit版を入れたいが32bit版が入ってるから無理だよ と解釈して・・・</p>
<pre class="brush: php;"># rpm -e subversion-1.4.2-4.el5_3.1.i386</pre>
<p>を実行して32bit版をアンインストール</p>
<p>その後、yum updateをしたら問題なくsubversionの64bit版がインストールできました。<br />
他にもperl-Archive-Zip等がアップデートされてました。</p>
<p>動作確認してみましたが特に問題ないのでアップデート完了です(゜-゜)</p>
<p>念のため・・・<br />
# cat /etc/redhat-release<br />
CentOS release 5.4 (Final)<br />
になってるか確認するといいかも(^^♪</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redistribution.cc/blog/20091023_447.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.redistribution.cc/blog/20091023_447.html" />
	</item>
		<item>
		<title>各種設定はしっかりと・・・（汁</title>
		<link>http://www.redistribution.cc/blog/20090518_227.html</link>
		<comments>http://www.redistribution.cc/blog/20090518_227.html#comments</comments>
		<pubDate>Mon, 18 May 2009 03:18:21 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.redistribution.cc/blog/?p=227</guid>
		<description><![CDATA[そういえばPHPの設定をしていなかったなと思ってはいたけど、
実害がなかったので放置プレイしてました(笑)
ところがWordPressのページを更新しようと思ったら白紙ページが表示されました。
Apacheのログをみると [...]]]></description>
			<content:encoded><![CDATA[<p>そういえばPHPの設定をしていなかったなと思ってはいたけど、<br />
実害がなかったので放置プレイしてました(笑)</p>
<p>ところがWordPressのページを更新しようと思ったら白紙ページが表示されました。<br />
Apacheのログをみると下記が出力されました。</p>
<pre class="brush: php;">
Allowed memory size of 33554432 bytes exhausted (tried to allocate 17 bytes)
Allowed memory size of 33554432 bytes exhausted (tried to allocate 17 bytes)
Allowed memory size of 33554432 bytes exhausted (tried to allocate 17 bytes)
Allowed memory size of 33554432 bytes exhausted (tried to allocate 17 bytes)
Allowed memory size of 33554432 bytes exhausted (tried to allocate 64 bytes)
</pre>
<p>PHPのメモリ割り当てが足りなくなった場合に出るエラーですね。<br />
PHP.INIのmemory_limitの設定値を確認すると・・・デフォルトの32MBのままでした（汁<br />
どれくらい割り当てるかは算出するのが面倒だったので<br />
倍の64MBを割り当ててこっそりApacheを再起動。</p>
<p>次にエラーが出る前にきっちりとした値を決めて割り当てしたいともいます。<br />
う～ん。他に抜けてる設定あったかな・・・。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redistribution.cc/blog/20090518_227.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.redistribution.cc/blog/20090518_227.html" />
	</item>
		<item>
		<title>Apache2の起動・停止コマンド</title>
		<link>http://www.redistribution.cc/blog/20090413_201.html</link>
		<comments>http://www.redistribution.cc/blog/20090413_201.html#comments</comments>
		<pubDate>Mon, 13 Apr 2009 05:05:38 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.redistribution.cc/blog/?p=201</guid>
		<description><![CDATA[たまにしか使わないので忘れないようにメモ。
OSによってパスが違うので適用に読み替えてください。
・起動
/etc/rc.d/init.d/httpd start
・停止
/etc/rc.d/init.d/httpd s [...]]]></description>
			<content:encoded><![CDATA[<p>たまにしか使わないので忘れないようにメモ。</p>
<p>OSによってパスが違うので適用に読み替えてください。</p>
<p>・起動<br />
/etc/rc.d/init.d/httpd start</p>
<p>・停止<br />
/etc/rc.d/init.d/httpd stop</p>
<p>・再起動<br />
/etc/rc.d/init.d/httpd restart</p>
<p>・設定ファイルの再読み込み<br />
/etc/rc.d/init.d/httpd reload</p>
<p>・設定ファイルの書式チェック<br />
/etc/rc.d/init.d/httpd configtest</p>
<p>・状態確認<br />
/etc/rc.d/init.d/httpd status</p>
<p>・プロセスを切断しないで再起動<br />
/etc/rc.d/init.d/httpd graceful</p>
<p>捕捉：<br />
gracefulはプロセスの通信が終わるのを待って、<br />
順次新しい設定を反映したhttpdを起動させる方法。<br />
Webサーバを公開していて、サービスの停止が出来ない場合に便利。</p>
<p>最近再起動よりgracefulを多用している気が(笑)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redistribution.cc/blog/20090413_201.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.redistribution.cc/blog/20090413_201.html" />
	</item>
		<item>
		<title>MySQL等のデータバックアップ方法</title>
		<link>http://www.redistribution.cc/blog/20090413_197.html</link>
		<comments>http://www.redistribution.cc/blog/20090413_197.html#comments</comments>
		<pubDate>Mon, 13 Apr 2009 01:02:37 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.redistribution.cc/blog/?p=197</guid>
		<description><![CDATA[※実行前にテストDB等でテスト後に本番に適用してください。
※この記事内を参考にする場合は、自己責任でお願いします。

■MySQLのDBバックアップ
・個別でDBのバックアップを手動で実行するなら下記を実行
※「*** [...]]]></description>
			<content:encoded><![CDATA[<p><span style="color: #ff0000;">※実行前にテストDB等でテスト後に本番に適用してください。<br />
※この記事内を参考にする場合は、自己責任でお願いします。</span></p>
<p><span id="more-197"></span></p>
<p>■MySQLのDBバックアップ</p>
<p>・個別でDBのバックアップを手動で実行するなら下記を実行<br />
※「******」はMySQLのrootのパスワード<br />
※「dbname」はMySQLのデータベース名<br />
# mysqldump -u root -p****** dbname &gt; dbname.sql</p>
<p>復元方法<br />
# mysql -u root -p****** dbname &lt; dbname.sql</p>
<p>・全DBのバックアップを手動で実行するなら下記を実行<br />
# mysqldump -u root -p****** &#8211;all-database &gt; alldb.sql</p>
<p>全DBの一括復元方法<br />
# mysql -u root -p****** &lt; alldb.sql</p>
<p>全バックアップファイルから個別のDBを選んで復元する方法<br />
# mysql -u root -p****** dbname &lt; alldb.sql</p>
<p>■DBや各種設定ファイルの自動バックアップ<br />
手動は面倒なので自動バックアップさせましょう。</p>
<p>うちで使ってるのは下記です。</p>
<p># cat /root/backup.sh</p>
<pre class="brush: perl;">
#!/bin/sh
today=`date +%Y%m%d`
oldday=`date --d &quot;7day ago&quot; +%Y%m%d`
target_dir=&quot;/sub_disk/backup&quot;
db_dump=&quot;/usr/bin/mysqldump&quot;
mysql=&quot;/usr/bin/mysql&quot;

function mk_dir(){
 if [ ! -e $target_dir/$today ]
 then
 mkdir -p $target_dir/$today/{DB,ETC}
 fi
}
function etc_backup(){
 etc_list=`ls /etc`
 for i in $etc_list
 do
 tar cfz $target_dir/$today/ETC/$i.tar.gz /etc/$i
 done
}
function db_backup(){
 database_list=`$mysql -u root -p****** -e &quot;show databases&quot;|grep -v Database`
 for i in $database_list
 do
 echo &quot;db backup $i&quot;
 /usr/bin/mysqldump -u root -p****** $i&gt;$target_dir/$today/DB/${i}.DB.sql
 done
}
function rm_dir(){
 if [ -e $target_dir/$oldday ]
 then
 rm -fr $target_dir/$oldday
 fi
}

mk_dir
etc_backup
db_backup
rm_dir
</pre>
<p>7日間バックアップを保存し、古いものから削除させてます。<br />
取得はDBを個別で吐き出させてるのと、/etc以下をフォルダorファイル単位で固めてバックアップしてます。</p>
<p>このスクリプトを使用する場合は、target_dir/db_dump/mysqlのパス変更と<br />
MySQLのrootのパスワード(******)を2箇所修正してください。<br />
target_dirが保存先となります。</p>
<p>後はbackup.shに実行権つけてcronで毎日任意の時間に実行させればOK。</p>
<p>・復元方法<br />
DBの復元は・・・<br />
# mysql -u root -p****** dbname &lt; dbname.sql</p>
<p>設定ファイルを戻したい場合は、解凍後に移動とかしてください。</p>
<p><img src="http://www.redistribution.cc/blog/wp-content/plugins/wp-tegaki/wp-tegaki-img.php?tegaki_id=197-0" alt="めっちゃ適当な記事になりました(笑)" width="324" height="29" /><br />
<img src="http://www.redistribution.cc/blog/wp-content/plugins/wp-tegaki/wp-tegaki-img.php?tegaki_id=197-1" alt="責任とれませんので自己責任で～(笑)" width="322" height="29" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.redistribution.cc/blog/20090413_197.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.redistribution.cc/blog/20090413_197.html" />
	</item>
		<item>
		<title>人柱に・・・なってもうた(笑)</title>
		<link>http://www.redistribution.cc/blog/20090406_143.html</link>
		<comments>http://www.redistribution.cc/blog/20090406_143.html#comments</comments>
		<pubDate>Mon, 06 Apr 2009 13:18:50 +0000</pubDate>
		<dc:creator>ken</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.redistribution.cc/blog/?p=143</guid>
		<description><![CDATA[来月くらいまでまつつもりやったけど・・・無理でした(笑)

適当にサービスあげてるけど・・・CentOS 5.2 → 5.3 へのUpDateはyumで
# yum update glibc\* &#038;&#038; [...]]]></description>
			<content:encoded><![CDATA[<p>来月くらいまでまつつもりやったけど・・・無理でした(笑)<br />
<img src="http://www.redistribution.cc/blog/wp-content/plugins/wp-tegaki/wp-tegaki-img.php?tegaki_id=143-0" alt="本番環境にCentOS 5.3入れちゃったっ！" width="338" height="28" /></p>
<p>適当にサービスあげてるけど・・・CentOS 5.2 → 5.3 へのUpDateはyumで<br />
# yum update glibc\* &#038;&#038; yum update<br />
でさっくりとUpdateしました。</p>
<p>*.conf.rpmnewって感じで何個か設定ファイルの新しいのが保存されてたので、旧ファイルと見比べて修正箇所を適用して鯖再起動で完了っと。<br />
とりあえず影響でてないのでこのまま使います～。</p>
<p><img src="http://www.redistribution.cc/blog/wp-content/plugins/wp-tegaki/wp-tegaki-img.php?tegaki_id=143-1" alt="人柱になりたい衝動を我慢できませんでした(笑)" width="417" height="29" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.redistribution.cc/blog/20090406_143.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://www.redistribution.cc/blog/20090406_143.html" />
	</item>
	</channel>
</rss>
