<?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>ueblog &#187; サーバ</title>
	<atom:link href="http://ueblog.natural-wave.com/tag/%e3%82%b5%e3%83%bc%e3%83%90/feed/" rel="self" type="application/rss+xml" />
	<link>http://ueblog.natural-wave.com</link>
	<description>Web関連のネタを中心に役立つ情報を配信しています。</description>
	<lastBuildDate>Wed, 11 Jan 2012 00:51:56 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://ueblog.natural-wave.com/tag/%e3%82%b5%e3%83%bc%e3%83%90/feed/" />
		<item>
		<title>AWSのS3でコンテンツにIP制限をかける方法</title>
		<link>http://ueblog.natural-wave.com/2012/01/11/how-to-control-ip-range/</link>
		<comments>http://ueblog.natural-wave.com/2012/01/11/how-to-control-ip-range/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 00:51:56 +0000</pubDate>
		<dc:creator>ueblog</dc:creator>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[サーバ]]></category>

		<guid isPermaLink="false">http://ueblog.natural-wave.com/?p=796</guid>
		<description><![CDATA[Amazon Simple Storage Service(S3)に置いているコンテンツにIP制限をかける方法。 S3のBucket(バケット)単位やファイル単位で、Permissionsの「bucket policy」という機能を利用すれば簡単にコントロールが可能だ。 S3のBucketの「Properties」→「Permissions」→「Add bucket policy」を選択すると、テキストエリアだけのWindowが立ち上がるので、]]></description>
			<content:encoded><![CDATA[<p>Amazon Simple Storage Service(S3)に置いているコンテンツにIP制限をかける方法。</p>
<p>S3のBucket(バケット)単位やファイル単位で、Permissionsの「bucket policy」という機能を利用すれば簡単にコントロールが可能だ。</p>
<p>S3のBucketの「Properties」→「Permissions」→「Add bucket policy」を選択すると、テキストエリアだけのWindowが立ち上がるので、そこにルールを記述したJSONを貼りつければよい。</p>
<p>詳しくみていくと、例えば「192.168.1.13」からのIPのみ許可したい場合は下記のようなJSONとなる。</p>
<div class="igBar"><span id="ljavascript-3"><a href="#" onclick="javascript:showPlainTxt('javascript-3'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-3">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #3366CC;">"Version"</span>: <span style="color: #3366CC;">"2008-10-17"</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #3366CC;">"Id"</span>: <span style="color: #3366CC;">"Policy11223344"</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #3366CC;">"Statement"</span>: <span style="color: #66cc66;">&#91;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #3366CC;">"Sid"</span>: <span style="color: #3366CC;">"Stmt11223344"</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #3366CC;">"Effect"</span>: <span style="color: #3366CC;">"Deny"</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #3366CC;">"Principal"</span>: <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #3366CC;">"AWS"</span>: <span style="color: #3366CC;">"*"</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #3366CC;">"Action"</span>: <span style="color: #3366CC;">"s3:*"</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #3366CC;">"Resource"</span>: <span style="color: #3366CC;">"arn:aws:s3:::&lt;bucket-name&gt;/*"</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #3366CC;">"Condition"</span>: <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #3366CC;">"NotIpAddress"</span>: <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #3366CC;">"aws:SourceIp"</span>: <span style="color: #3366CC;">"192.168.1.13/32"</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#93;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>「bucket-name」の部分は制限を掛けたいBucketの名前に置き換える。その後に続く「/*」の部分を指定したファイルを指定できる。</p>
<p>また、複数IPを指定したい場合は、"NotIpAddress"の要素を配列にしてあげればよい。</p>
<div class="igBar"><span id="ljavascript-4"><a href="#" onclick="javascript:showPlainTxt('javascript-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-4">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #3366CC;">"Condition"</span>: <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #3366CC;">"NotIpAddress"</span>: <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #3366CC;">"aws:SourceIp"</span>:</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#91;</span><span style="color: #3366CC;">"192.168.1.13/32"</span>,<span style="color: #3366CC;">"192.168.1.14/32"</span><span style="color: #66cc66;">&#93;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>これらを応用すれば、特定のIPを制限したりなどの指定も可能でしょう。</p>
<p>下記のPolicy GeneratorでWeb上でJSONファイルを作成することも可能。</p>
<p><a title="AWS Policy Generator" href="http://awspolicygen.s3.amazonaws.com/policygen.html" target="_blank">AWS Policy Generator</a></p>
<p>IP制限以外にも、UA,Referer判定などいろんなことができそう。</p>
<p><a title="Using Bucket Policies" href="http://docs.amazonwebservices.com/AmazonS3/latest/dev/UsingBucketPolicies.html" target="_blank">Using Bucket Policies</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ueblog.natural-wave.com/2012/01/11/how-to-control-ip-range/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://ueblog.natural-wave.com/2012/01/11/how-to-control-ip-range/" />
	</item>
		<item>
		<title>ブログの復旧と自宅サーバがお亡くなりに</title>
		<link>http://ueblog.natural-wave.com/2009/11/18/restore-my-blog/</link>
		<comments>http://ueblog.natural-wave.com/2009/11/18/restore-my-blog/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 14:56:38 +0000</pubDate>
		<dc:creator>ueblog</dc:creator>
				<category><![CDATA[Diary]]></category>
		<category><![CDATA[サーバ]]></category>

		<guid isPermaLink="false">http://ueblog.natural-wave.com/?p=543</guid>
		<description><![CDATA[引越しに当たって、自宅サーバの移行をしましたが、HDDがいかれてしまい、OSが立ち上がらなくなりました。 インストールしたFedora CoreのDVDディスクを使い、linux rescueモードで立ち上げ、 ＠IT：壊れたパーティションを修復するには このあたりを参考に]]></description>
			<content:encoded><![CDATA[<p>引越しに当たって、自宅サーバの移行をしましたが、HDDがいかれてしまい、OSが立ち上がらなくなりました。</p>
<p>インストールしたFedora CoreのDVDディスクを使い、linux rescueモードで立ち上げ、</p>
<p><a href="http://www.atmarkit.co.jp/flinux/rensai/linuxtips/728fixpartition.html" target="_blank">＠IT：壊れたパーティションを修復するには</a></p>
<p>このあたりを参考に、fsckを何度も試みたところ、ブートはできるようになったけど、結局マウントすらできず、復旧は困難な状態となってしまいました。。。</p>
<p>原因は引越しの時に急いでいたので、サーバの電源ボタンによる強制終了してしまったこと、もしくは雨の中の引越しで雨に少し濡れてしまい、何度かサーバの電源が入らない状態になりHDDにも影響があったのかと推測してます。</p>
<p>8年ほど前に購入したPCをサーバに利用していたので、サーバはどうでもよかったのですが、やはりデータが消えてしまったのは本当に痛かった。。</p>
<p>幸い10月に一度バックアップを取っていたことと、さくらのレンタルサーバも持っていたので、このブログも10月1日の状態までにはなんとか戻すことが出来ました。</p>
<p>他にもメールサーバやファイルサーバ、他Webサービスとしても利用していたものも、一部を除いて復旧しました。（というか、レンタルサーバで十分じゃない？って感じでした）</p>
<p>本当にバックアップがいかに重要かを思い知らされました。</p>
<p><strong>教訓</strong></p>
<ul>
<li>強制終了はいかなる場合も避けるべし</li>
<li>バックアップはこまめに</li>
</ul>
<p>自宅サーバをもっている方は、ぜひお気をつけを！</p>
]]></content:encoded>
			<wfw:commentRss>http://ueblog.natural-wave.com/2009/11/18/restore-my-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://ueblog.natural-wave.com/2009/11/18/restore-my-blog/" />
	</item>
		<item>
		<title>VMware Player＋CentOS＋EclipseでPHPの開発環境を作る</title>
		<link>http://ueblog.natural-wave.com/2009/04/04/vmware-centos-eclipse-php/</link>
		<comments>http://ueblog.natural-wave.com/2009/04/04/vmware-centos-eclipse-php/#comments</comments>
		<pubDate>Sat, 04 Apr 2009 01:31:59 +0000</pubDate>
		<dc:creator>ueblog</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programing]]></category>
		<category><![CDATA[symfony]]></category>
		<category><![CDATA[サーバ]]></category>

		<guid isPermaLink="false">http://ueblog.natural-wave.com/?p=365</guid>
		<description><![CDATA[いまさら？な感じもするが、快適な開発環境を作るべく、Windows上にLinuxの仮想環境を用意し、PHPの開発環境を作ってみることにした。 利用したソフトウェアとバージョンは下記になる。 VMware Player2.5 Windows Vista(ホスト) Cent OS 5.2（ゲスト） Apache mysql PHP Eclipse3.3 VMware Playerのインストール VMware Playerのインストール自]]></description>
			<content:encoded><![CDATA[<p>いまさら？な感じもするが、快適な開発環境を作るべく、Windows上にLinuxの仮想環境を用意し、PHPの開発環境を作ってみることにした。</p>
<p>利用したソフトウェアとバージョンは下記になる。</p>
<ul>
<li>VMware Player2.5</li>
<li>Windows Vista(ホスト)</li>
<li>Cent OS 5.2（ゲスト）</li>
<li>Apache</li>
<li>mysql</li>
<li>PHP</li>
<li>Eclipse3.3</li>
</ul>
<h3 class="PostLine">VMware Playerのインストール</h3>
<p>VMware Playerのインストール自体はとても簡単。</p>
<p><a href="http://www.vmware.com/jp/products/player/" target="_blank">VMware Player 、仮想マシン、仮想PC - VMware</a></p>
<p>上記からダウンロードしたファイルを実行すればOK。ダウンロードする前にメールアドレスやアンケートがあるので答えておく。</p>
<p>インストール後は再起動を求められるので、再起動しておこう。</p>
<h3 class="PostLine">Cent OSのインストール</h3>
<p>CentOSのインストールする前に、VMwareのディスクイメージを作成する必要があるので、下記サイトで情報を入力しダウンロードする。</p>
<p><a href="http://www.easyvmx.com/">EasyVMX!: Virtual Machine Creator</a></p>
<p>EaxyVMX V2.0というアイコンをクリックし、下記の情報を入力し、「Create Virtual Machine」ボタンを押すとzipファイルをダウンロードできるようになる。</p>
<table style="height: 110px;" border="1" cellspacing="0" cellpadding="2" width="405">
<tbody>
<tr>
<td width="161" valign="top">Virtual Machine Name</td>
<td width="208" valign="top">CentOS5.2　　（なんでもOK）</td>
</tr>
<tr>
<td width="161" valign="top">Select GuestOS</td>
<td width="208" valign="top">Redhat Enterprise Linux 4</td>
</tr>
<tr>
<td width="161" valign="top">Memory Size</td>
<td width="208" valign="top">320MB (適度な値に設定)</td>
</tr>
<tr>
<td width="161" valign="top"># of CPUs</td>
<td width="208" valign="top">1CPU</td>
</tr>
<tr>
<td width="161" valign="top">Disk #1</td>
<td width="208" valign="top">Disk Size 4.7GB(Fits on a DVS)(適度な値に設定)</td>
</tr>
<tr>
<td width="161" valign="top">Shared Folder #</td>
<td width="208" valign="top">ホスト、ゲストOS間でファイル共有したい場合はチェック。</td>
</tr>
</tbody>
</table>
<p>次にCentOSのファイルイメージをミラーサイトからダウンロードする。</p>
<p><a href="http://ftp.riken.jp/Linux/centos/5/isos/i386/" target="_blank">http://ftp.riken.jp/Linux/centos/5/isos/i386/</a></p>
<blockquote><p>CentOS-5.2-i386-bin-DVD.iso</p></blockquote>
<p>EaxyVMXで作成したZIPにある「CentOS5.2.vmx」に上記で落としたCentOSのイメージファイルを指定するように下記の部分をテキストエディタで編集する。</p>
<blockquote><p># Settings for physical CDROM drive<br />
ide1:0.present = "TRUE"<br />
ide1:0.deviceType = "<span style="color: #ff0000;">cdrom-image</span>"<br />
ide1:0.startConnected = "TRUE"<br />
ide1:0.fileName = "<span style="color: #ff0000;">C:\CentOS5.2\CentOS-5.2-i386-bin-DVD.iso</span>"<br />
ide1:0.autodetect = "TRUE"</p></blockquote>
<p>赤色の部分が編集する部分で、fileName部分は落としたファイルの場所を指定する。</p>
<p>ここまでの準備ができればやっとインストールに入ることができる。</p>
<p>上記の「CentOS5.2.vmx」をダブルクリックで実行すると、VMwareが立ち上がり、CentOSのインストールウィザードが表示されるだろう。</p>
<p>詳しいCentOSのインストール方法は下記が詳しい。</p>
<p><a href="http://www.memolica.com/200903/entry160.html" target="_blank">VMwareとCentOSで簡単CMSテスト環境構築(3) - memolica * 小さな会社で働いている人のメモ</a></p>
<p><a href="http://centossrv.com/">CentOSで自宅サーバー構築</a></p>
<p>ポイントとしては、今回Eclipseをインストールするので、GUIのGNOMEかKDEをインストールしてしまおうということくらい。あとはお好みで。</p>
<h3 class="PostLine">VMware Toolsのインストール</h3>
<p>VMware Player2.5からは、VMware Toolsが添付されないということで、共有フォルダやコピーアンドペーストが利用できる、VMware Toolsをインストールしておく。</p>
<p><a href="http://register.vmware.com/content/download-108.html" target="_blank">Download VMware Server</a></p>
<p>tar.gzバイナリの中から、「linux.iso」を抜き出し、またその中から「VMWARETO.TGZ」というファイルを解凍して出てくる、RPMファイルを利用してインストールする。</p>
<p>詳しい説明は下記。</p>
<p><a href="http://homepage3.nifty.com/nasunu-i/VMware/Fedora7.htm#ToolsInstall" target="_blank">VMware Player に Fedora7 をゲストＯＳとしてインストール。VMware Tools (VMwareTools)のインストール</a></p>
<p>コピーアンドペーストを有効にするには、vmware-toolboxを常駐させる必要があるので端末などで下記のコマンドを打つ必要がある。</p>
<blockquote><p># vmware-toolbox &amp;</p></blockquote>
<p>あとはキーボードレイアウトの変更、解像度の設定など最適な環境にしておく。</p>
<h3 class="PostLine">(L)AMP環境のインストール</h3>
<p>PHP、MYSQL、APACHEをyumですべていれてしまう。ついでにsymfonyも。</p>
<blockquote><p># yum install php php-pear php-mbstring php-mysql php-gd php-xml</p>
<p># yum install httpd</p>
<p># yum install mysql-server</p>
<p># pear upgrade PEAR</p>
<p># pear channel-discover pear.symfony-project.com</p>
<p># pear <span id="searchword">install</span> <span id="searchword">symfony</span>/symfony-1.0.20</p></blockquote>
<h3 class="PostLine">Eclipseのインストール</h3>
<p>まずはjdkをインストールするためにrpmをダウンロードしインストール</p>
<p><a href="http://java.sun.com/javase/ja/6/download.html" target="_blank">Java SE ダウンロード - Sun Developer Network (SDN)</a></p>
<p>RPMのJDKを選択しダウンロードしたファイルを実行する。</p>
<blockquote><p># chmod a+x jdk-6u13-linux-i586-rpm.bin</p>
<p># ./jdk-6u13-linux-i586-rpm.bin</p></blockquote>
<p>Eclipseは<a href="http://downloads.zend.com/pdt/all-in-one/" target="_blank">zendのall in one PDT</a>のものを、日本語化は<a href="http://mergedoc.sourceforge.jp/" target="_blank">Plieades</a>からそれぞれダウンロードして展開する。</p>
<blockquote><p># tar xvfz pdt-2.0.0GA_debugger-5.2.15.v20081217-all-in-one-linux-gtk.tar.gz</p>
<p># mv pleiades_1.3.0.zip eclipse/</p>
<p># unzip pleiades_1.3.0.zip</p>
<p># mv /usr/local/src/eclipse /usr/local/</p></blockquote>
<p>eclipseディレクトリにある、eclipse.iniの一番下に下記を追記。</p>
<blockquote><p>-javaagent:plugins/jp.sourceforge.mergedoc.pleiades/pleiades.jar</p></blockquote>
<p>Eclipseを実行</p>
<blockquote><p># /usr/local/eclipse/eclipse -vm /usr/java/jdk1.6.0_13/bin/java</p></blockquote>
<p>あとはEclipseの設定をするだけ。</p>
<p>VMwareというより、CentOSのGNOMEのキーボード設定や日本語環境を整備するのに少し手間取ったが、とても簡単に仮想開発環境を作成できた。</p>
<p>これはとても便利だ。</p>
]]></content:encoded>
			<wfw:commentRss>http://ueblog.natural-wave.com/2009/04/04/vmware-centos-eclipse-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://ueblog.natural-wave.com/2009/04/04/vmware-centos-eclipse-php/" />
	</item>
		<item>
		<title>Subversionをソースからインストール</title>
		<link>http://ueblog.natural-wave.com/2009/03/30/subversion-install/</link>
		<comments>http://ueblog.natural-wave.com/2009/03/30/subversion-install/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 14:28:58 +0000</pubDate>
		<dc:creator>ueblog</dc:creator>
				<category><![CDATA[Programing]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[サーバ]]></category>
		<category><![CDATA[サーバ設定]]></category>

		<guid isPermaLink="false">http://ueblog.natural-wave.com/?p=375</guid>
		<description><![CDATA[自分用のレポジトリを持ちたいという理由で、Subversionをインストールしたときのメモ。 yumでsubversionが既にインストールされているが、Apacheとの連携をする際に、Apacheもyumでインストールしないとうまく連携できないようなので、Subversionもソースからインストー]]></description>
			<content:encoded><![CDATA[<p>自分用のレポジトリを持ちたいという理由で、Subversionをインストールしたときのメモ。</p>
<p>yumでsubversionが既にインストールされているが、Apacheとの連携をする際に、Apacheもyumでインストールしないとうまく連携できないようなので、Subversionもソースからインストールした。</p>
<p>Apache2に関しては、DSOを有効にして既にインストール済みとして進める。</p>
<p><a href="http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=260&amp;expandFolder=74" target="_blank">最新版のSubversion</a>をダウンロードし、Configure。</p>
<blockquote><p># wget "http://subversion.tigris.org/downloads/subversion-1.6.0.tar.gz"<br />
# tar xvfz subversion-1.6.0.tar.gz<br />
# cd subversion-1.6.0<br />
# ./configure --with-apxs=/usr/local/apache2/bin/apxs \<br />
--with-apr=/usr/local/apache2/bin/apr-1-config \<br />
--with-apr-util=/usr/local/apache2/bin/apu-1-config \<br />
--with-ssl</p></blockquote>
<p>すると下記のようにsqliteのバージョンが古いというわけでエラーに</p>
<blockquote><p>An appropriate version of sqlite could not be found.  We recommmend<br />
3.6.11, but require at least 3.4.0.<br />
Please either install a newer sqlite on this system</p>
<p>or</p>
<p>get the sqlite 3.6.11 amalgamation from:</p>
<p>http://www.sqlite.org/sqlite-amalgamation-3.6.11.tar.gz</p>
<p>unpack the archive using tar/gunzip and copy sqlite3.c from the<br />
resulting directory to:<br />
/usr/local/src/subversion-1.6.0/sqlite-amalgamation/sqlite3.c<br />
This file also ships as part of the subversion-deps distribution.</p>
<p>configure: error: Subversion requires SQLite</p></blockquote>
<p>sqliteを入れ直すか、sqlite3.cのソースを配置するかといわれるので、後者を選択。</p>
<p>というか、neonなど依存関係を含めたパッケージがあったのでそちらをあわせてダウンロードして利用する。</p>
<blockquote><p># cd ../<br />
# wget http://subversion.tigris.org/downloads/subversion-deps-1.6.0.tar.gz<br />
# tar xvfz subversion-deps-1.6.0.tar.gz<br />
# cd subversion-1.6.0</p></blockquote>
<p>再度、cofigure、makeを続ける。</p>
<blockquote><p># ./configure --with-apxs=/usr/local/apache2/bin/apxs \<br />
--with-apr=/usr/local/apache2/bin/apr-1-config \<br />
--with-apr-util=/usr/local/apache2/bin/apu-1-config \<br />
--with-ssl<br />
# make<br />
# make install</p></blockquote>
<p>make installすると、下記のようにapacheのhttpd.confにmod_dav_svnなどのモジュールが勝手に追加されている。</p>
<blockquote><p>LoadModule dav_svn_module     modules/mod_dav_svn.so<br />
LoadModule authz_svn_module   modules/mod_authz_svn.so</p></blockquote>
<p>さっそくレポジトリを作成してみる。お決まりの、trunk、tags、brancheseの作成、Apacheから書き込めるように権限の変更もお忘れなく。</p>
<blockquote><p># svnadmin create /var/svn/test<br />
#  svn mkdir file:///var/svn/test/trunk \<br />
file:///var/svn/test/tags \<br />
file:///var/svn/test/branches<br />
# chown -R daemon:daemon /var/svn/test</p></blockquote>
<p>あとは、httpd.confに下記のようなsvnのロケーション設定を加えてApacheを再起動。</p>
<blockquote><p>&lt;Location /svn/test&gt;<br />
DAV svn<br />
SVNPath /var/svn/test<br />
&lt;/Location&gt;</p></blockquote>
<p>あとはcheckoutできるか、試してみる。</p>
<blockquote><p>$ svn co http://localhost/svn/test/trunk</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://ueblog.natural-wave.com/2009/03/30/subversion-install/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://ueblog.natural-wave.com/2009/03/30/subversion-install/" />
	</item>
		<item>
		<title>SubversionのレポジトリをProxy経由で参照する</title>
		<link>http://ueblog.natural-wave.com/2008/12/03/subversion-proxy/</link>
		<comments>http://ueblog.natural-wave.com/2008/12/03/subversion-proxy/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 07:41:46 +0000</pubDate>
		<dc:creator>ueblog</dc:creator>
				<category><![CDATA[Programing]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[サーバ]]></category>

		<guid isPermaLink="false">http://ueblog.natural-wave.com/?p=279</guid>
		<description><![CDATA[外部にあるSubversionのレポジトリなど、プロキシを通してsvnコマンドを利用したいときは、設定ファイルで設定するだけで利用することができる。 ~/.subversion/servers [global] http-proxy-exceptions = *.local, localhost http-proxy-host = proxy.com http-proxy-port = 10000 http-proxy-exceptionsには、proxyを通したくないホスト名を指定できる。 備忘録まで・・・]]></description>
			<content:encoded><![CDATA[<p>外部にあるSubversionのレポジトリなど、プロキシを通してsvnコマンドを利用したいときは、設定ファイルで設定するだけで利用することができる。</p>
<p><strong>~/.subversion/servers</strong></p>
<blockquote><p>[global]<br />
http-proxy-exceptions = *.local, localhost<br />
http-proxy-host = proxy.com<br />
http-proxy-port = 10000</p></blockquote>
<p><strong>http-proxy-exceptions</strong>には、proxyを通したくないホスト名を指定できる。</p>
<p>備忘録まで・・・</p>
]]></content:encoded>
			<wfw:commentRss>http://ueblog.natural-wave.com/2008/12/03/subversion-proxy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://ueblog.natural-wave.com/2008/12/03/subversion-proxy/" />
	</item>
		<item>
		<title>FONを使ってみた</title>
		<link>http://ueblog.natural-wave.com/2008/11/06/fon/</link>
		<comments>http://ueblog.natural-wave.com/2008/11/06/fon/#comments</comments>
		<pubDate>Wed, 05 Nov 2008 15:21:52 +0000</pubDate>
		<dc:creator>ueblog</dc:creator>
				<category><![CDATA[Programing]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[サーバ]]></category>

		<guid isPermaLink="false">http://ueblog.natural-wave.com/?p=248</guid>
		<description><![CDATA[FON La Fonera （ラ・フォネラ） FON機能搭載 無線LANルータ 世界中のFONスポットで無料インターネットが利用可能！フォン・ジャパン株式会社 無線LANサービスである、「FON」を利用してみた。 FONのサービス内容をざっくりいうと、自分が契約しているネット]]></description>
			<content:encoded><![CDATA[<table border="0" cellpadding="5">
<tbody>
<tr>
<td valign="top"><a href="http://www.amazon.co.jp/Fonera-%EF%BC%88%E3%83%A9%E3%83%BB%E3%83%95%E3%82%A9%E3%83%8D%E3%83%A9%EF%BC%89-FON%E6%A9%9F%E8%83%BD%E6%90%AD%E8%BC%89-%E7%84%A1%E7%B7%9ALAN%E3%83%AB%E3%83%BC%E3%82%BF-%E4%B8%96%E7%95%8C%E4%B8%AD%E3%81%AEFON%E3%82%B9%E3%83%9D%E3%83%83%E3%83%88%E3%81%A7%E7%84%A1%E6%96%99%E3%82%A4%E3%83%B3%E3%82%BF%E3%83%BC%E3%83%8D%E3%83%83%E3%83%88%E3%81%8C%E5%88%A9%E7%94%A8%E5%8F%AF%E8%83%BD%EF%BC%81/dp/B0012Z0TPI%3FSubscriptionId%3D0G91FPYVW6ZGWBH4Y9G2%26tag%3Dbonnarooooo-22%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB0012Z0TPI" target="_blank"><img src="http://ecx.images-amazon.com/images/I/41hzcLCzzsL._SL160_.jpg" border="0" alt="B0012Z0TPI" /></a></td>
<td valign="top"><span><a href="http://www.amazon.co.jp/Fonera-%EF%BC%88%E3%83%A9%E3%83%BB%E3%83%95%E3%82%A9%E3%83%8D%E3%83%A9%EF%BC%89-FON%E6%A9%9F%E8%83%BD%E6%90%AD%E8%BC%89-%E7%84%A1%E7%B7%9ALAN%E3%83%AB%E3%83%BC%E3%82%BF-%E4%B8%96%E7%95%8C%E4%B8%AD%E3%81%AEFON%E3%82%B9%E3%83%9D%E3%83%83%E3%83%88%E3%81%A7%E7%84%A1%E6%96%99%E3%82%A4%E3%83%B3%E3%82%BF%E3%83%BC%E3%83%8D%E3%83%83%E3%83%88%E3%81%8C%E5%88%A9%E7%94%A8%E5%8F%AF%E8%83%BD%EF%BC%81/dp/B0012Z0TPI%3FSubscriptionId%3D0G91FPYVW6ZGWBH4Y9G2%26tag%3Dbonnarooooo-22%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB0012Z0TPI" target="_blank">FON La Fonera （ラ・フォネラ） FON機能搭載 無線LANルータ 世界中のFONスポットで無料インターネットが利用可能！</a><img src="http://www.assoc-amazon.jp/e/ir?t=bonnarooooo-22&amp;l=ur2&amp;o=9" border="0" alt="" width="1" height="1" />フォン・ジャパン株式会社 </span></td>
</tr>
</tbody>
</table>
<p>無線LANサービスである、「<a href="http://www.fon.com/jp" target="_blank"><strong>FON</strong></a>」を利用してみた。</p>
<p><a href="http://www.fon.com/jp" target="_blank"><strong>FON</strong></a>のサービス内容をざっくりいうと、自分が契約しているネット回線に上記の無線ルータを設置し、アクセスポイントを開放する代わりに、その他に開放しているユーザのアクセスポイントを無料利用できるというサービス。現在、世界中でユーザを増やしていて、日本でも10万ユーザを超えたといわれている。</p>
<p>私も、<strong>EeePC</strong>を購入したついでにこのルータを設置してみたわけだが、意外と使える。</p>
<p>まず設置はとても簡単。</p>
<p>すでにブロードバンドルータなどを利用していれば、LANケーブルを接続して、ユーザ登録と認証をするだけ。</p>
<p>そしてネットワーク構成に関しては、外部に開放する認証や暗号化のないセグメントのネットワーク（FON_FREE_INTERNET）と、認証、暗号がかかったプライベート用のネットワーク（My Place）が作成される。</p>
<p>セキュリティが気になる方は、こちらの記事が参考になるでしょう。</p>
<p><a href="http://www.tsukumo.co.jp/fon/accesspoint.html" target="_blank">La Foneraのアクセスポイント</a></p>
<p>気になるところとしては、アクセスポイントは住宅街中心で必要なところでなかなか見つからない（というかいままで見つかったことがない・・・）のと、1,900円バージョンのルータでは電波がそんなに強くないことだ。実際に家の外からiPod Touchでアクセスポイントを探したが、家のドアの前とかベランダの周りくらいしか拾えなかった。これはお隣さんくらいしか使えないんじゃないかって感じだ。（一応、FONのマイページから接続履歴が見れるが、自分以外にはまだいない。まあ相当な田舎だけど。。）あとは、FONのログインページが相当重いのもネック。</p>
<p>結論、無線LANの環境を気軽に家で作成したいといった場合に1,900円でできるのは魅力。</p>
<p>ただし、他のアクセスポイントはあまり期待しないほうがよいだろう。</p>
]]></content:encoded>
			<wfw:commentRss>http://ueblog.natural-wave.com/2008/11/06/fon/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://ueblog.natural-wave.com/2008/11/06/fon/" />
	</item>
		<item>
		<title>LinuxでCPUの温度を調べる</title>
		<link>http://ueblog.natural-wave.com/2008/08/03/linux%e3%81%a7cpu%e3%81%ae%e6%b8%a9%e5%ba%a6%e3%82%92%e8%aa%bf%e3%81%b9%e3%82%8b/</link>
		<comments>http://ueblog.natural-wave.com/2008/08/03/linux%e3%81%a7cpu%e3%81%ae%e6%b8%a9%e5%ba%a6%e3%82%92%e8%aa%bf%e3%81%b9%e3%82%8b/#comments</comments>
		<pubDate>Sun, 03 Aug 2008 12:01:39 +0000</pubDate>
		<dc:creator>ueblog</dc:creator>
				<category><![CDATA[Programing]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[サーバ]]></category>
		<category><![CDATA[サーバ設定]]></category>

		<guid isPermaLink="false">http://ueblog.natural-wave.com/?p=198</guid>
		<description><![CDATA[暑い毎日が続いていますが、自宅サーバな方はサーバのCPU温度が気になるものです。 というわけで、本日はLinuxサーバ上でのCPU温度やファンの回転数を計測するlm_sensorsを紹介する。 セットアップ まずはインストールしよう。今回はyumを利用する]]></description>
			<content:encoded><![CDATA[<p>暑い毎日が続いていますが、自宅サーバな方はサーバのCPU温度が気になるものです。</p>
<p>というわけで、本日はLinuxサーバ上でのCPU温度やファンの回転数を計測する<strong>lm_sensors</strong>を紹介する。</p>
<h3 class="PostLine">セットアップ</h3>
<p>まずはインストールしよう。今回はyumを利用する。</p>
<blockquote><p># yum install lm_sensors</p></blockquote>
<p>ソースからインストールしたい場合は下記から。<br />
<a href="http://www.edgedesign.us/about/lm_sensors" target="_blank">Edge Design - lm_sensors</a></p>
<p><strong>sensors-detect</strong>というコマンドでセットアップする。</p>
<blockquote><p># sensors-detect</p></blockquote>
<p>すると、いろんな質問をしてくるんだが、よく意味がわからないので、Enter連打でOK。そして最後のほうに下記のような指示をしてきます。</p>
<div class="igBar"><span id="lcode-6"><a href="#" onclick="javascript:showPlainTxt('code-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-6">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">To make the sensors modules behave correctly, add these lines to</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">/etc/modprobe.<span style="">conf</span>:</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#----cut here----</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># I2C module options</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">alias char-major-<span style="color:#800000;color:#800000;">89</span> i2c-dev</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#----cut here----</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">To load everything that is needed, add this to some /etc/rc* file:</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#----cut here----</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># I2C adapter drivers</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">modprobe i2c-i801</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># Chip drivers</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">modprobe w83781d</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"># sleep <span style="color:#800000;color:#800000;">2</span> # optional</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">/usr/bin/sensors -s # recommended</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#----cut here---- </div>
</li>
</ol>
</div>
</div>
</div>
<p>
上部のcut hereの中身を<strong>/etc/modprobe.conf</strong>ファイルに。そして、下部のcut here部分を<strong>/etc/rc.local</strong>ファイルにそのままコピーして編集してしまおう。</p>
<p>そして、rc.localを実行してする、もしくはサーバを再起動してしまおう。</p>
<h3 class="PostLine">利用方法</h3>
<p>あとは、<strong>sensors</strong>コマンドを打つと下記のような結果が返ってくる。</p>
<blockquote><p># sensors<br />
as99127f-i2c-0-2d<br />
 ERROR: Can't get adapter or algorithm?!?<br />
VCore 1:   +1.71 V  (min =  +1.65 V, max =  +2.05 V)<br />
VCore 2:   +1.81 V  (min =  +1.65 V, max =  +2.05 V)<br />
+3.3V:     +3.30 V  (min =  +2.96 V, max =  +3.63 V)<br />
+5V:       +4.97 V  (min =  +4.49 V, max =  +5.51 V)<br />
+12V:     +11.55 V  (min =  +9.55 V, max = +14.41 V)<br />
-12V:      -2.42 V  (min =  -4.07 V, max =  -0.32 V)<br />
-5V:       -1.30 V  (min =  -1.76 V, max =  -0.82 V)<br />
fan1:     3901 RPM  (min =   -1 RPM, div = 2)<br />
fan2:        0 RPM  (min = 2636 RPM, div = 8)<br />
fan3:        0 RPM  (min =   -1 RPM, div = 8)<br />
M/B Temp:    +41°C  (high =    +0°C, hyst =    +0°C)<br />
CPU Temp:  +51.0°C  (high =  +100°C, hyst =   +90°C)<br />
temp3:      -0.5°C  (high =   +80°C, hyst =   +75°C)<br />
vid:      +1.750 V  (VRM Version 9.0)<br />
alarms:<br />
beep_enable:<br />
          Sound alarm enabled
</p></blockquote>
<p>電圧やファンの回転数、CPUの温度がわかる。</p>
<p>微妙にエラーが出ているが、ここでは気にしないことにした。</p>
<p>詳細は下記の方がかなり詳しくやっています。あとハードディスクの温度も。</p>
<p><a href="http://d.hatena.ne.jp/kakurasan/20070727/p1" target="_blank">hwmonモジュール+lm_sensorsとhddtempで温度を取得 - 試験運用中なLinux備忘録</a></p>
<p>あとは、下記にCPUそれぞれのMAX温度等がのってます。</p>
<p><a href="http://users.erols.com/chare/elec.htm" target="_blank">Processor Electrical Specifications</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ueblog.natural-wave.com/2008/08/03/linux%e3%81%a7cpu%e3%81%ae%e6%b8%a9%e5%ba%a6%e3%82%92%e8%aa%bf%e3%81%b9%e3%82%8b/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://ueblog.natural-wave.com/2008/08/03/linux%e3%81%a7cpu%e3%81%ae%e6%b8%a9%e5%ba%a6%e3%82%92%e8%aa%bf%e3%81%b9%e3%82%8b/" />
	</item>
		<item>
		<title>ClamAVがwarアーカイブを消してしまう</title>
		<link>http://ueblog.natural-wave.com/2008/02/24/clamav-oversized/</link>
		<comments>http://ueblog.natural-wave.com/2008/02/24/clamav-oversized/#comments</comments>
		<pubDate>Sun, 24 Feb 2008 14:31:59 +0000</pubDate>
		<dc:creator>ueblog</dc:creator>
				<category><![CDATA[Programing]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[サーバ]]></category>

		<guid isPermaLink="false">http://ueblog.natural-wave.com/2008/02/24/clamav-oversized/</guid>
		<description><![CDATA[最近、自宅サーバのTomcat上で動いているアプリケーションが、なぜか定期的に消えてしまうという事が判明。Tomcatが自分自身で消しているのか？いやそんなことはしない。 ログと突合せしながら、 調べてみると毎朝定時に消去されてい]]></description>
			<content:encoded><![CDATA[<p>最近、自宅サーバのTomcat上で動いているアプリケーションが、なぜか定期的に消えてしまうという事が判明。Tomcatが自分自身で消しているのか？いやそんなことはしない。</p>
<p>ログと突合せしながら、 調べてみると毎朝定時に消去されていることがわかった。</p>
<p>その定時に動いているのが、 <a href="http://clamav-jp.sourceforge.jp/" target="_blank">Clam Antivirus</a>というウィルス駆除ソフト。圧縮率が高く容量の大きいzipファイルを発見すると、「Oversized.Zip FOUND」というログをはき、消してしまう処理をバッチで仕組んでしまっていたのだ。</p>
<p>Tomcatのwarファイルも実態はzipファイルと同じ。というわけで、warファイルが消去されてしまっていたのだ！</p>
<p>とりあえず、</p>
<blockquote><p> これらのメールが誤ってウィルスメールと判定されないようにするにはclamd.conf内のArchiveMaxCompressionRatioを0（無制限）にしてください。 <a href="http://www.ksknet.net/sendmail/clamav_oversize.html" target="_blank"></a></p></blockquote>
<blockquote><p><a href="http://www.ksknet.net/sendmail/clamav_oversize.html" target="_blank">ClamAV - Oversized Zip FOUND</a></p></blockquote>
<p>で対応した。 正直、あせったよ・・・</p>
]]></content:encoded>
			<wfw:commentRss>http://ueblog.natural-wave.com/2008/02/24/clamav-oversized/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://ueblog.natural-wave.com/2008/02/24/clamav-oversized/" />
	</item>
		<item>
		<title>Tomcatのログローテート</title>
		<link>http://ueblog.natural-wave.com/2008/01/13/tomcat-logrotate/</link>
		<comments>http://ueblog.natural-wave.com/2008/01/13/tomcat-logrotate/#comments</comments>
		<pubDate>Sat, 12 Jan 2008 16:23:51 +0000</pubDate>
		<dc:creator>ueblog</dc:creator>
				<category><![CDATA[Programing]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[サーバ]]></category>

		<guid isPermaLink="false">http://ueblog.natural-wave.com/2008/01/13/tomcat-logrotate/</guid>
		<description><![CDATA[Tomcatのlogsディレクトリにある、catalina.out。 デフォルトだとすぐに肥大化してしまうので、1日1度、ローテーションするように設定を変えましょう。 まずは、Tomcatの起動バッチファイルである、$CATALINA_HOME/bin/catalina.sh を編集する。 #この記述を削除 touch "$CATALINA_BASE"/logs/catalina.out #下記の記述を変更する（変]]></description>
			<content:encoded><![CDATA[<p>Tomcatのlogsディレクトリにある、catalina.out。</p>
<p>デフォルトだとすぐに肥大化してしまうので、1日1度、ローテーションするように設定を変えましょう。</p>
<p>まずは、Tomcatの起動バッチファイルである、$CATALINA_HOME/bin/catalina.sh を編集する。</p>
<blockquote><p>#この記述を削除<br />
touch "$CATALINA_BASE"/logs/catalina.out</p>
<p>#下記の記述を変更する（変更箇所は2箇所）<br />
# rotatelogsの位置は各環境にあわせる。<br />
"$CATALINA_BASE"/logs/catalina.out 2&gt;&amp;1 &amp;<br />
↓<br />
| /usr/local/apache2/bin/rotatelogs "$CATALINA_BASE"/logs/catalina.out.%Y-%m-%d 86400 540 &amp;</p></blockquote>
<p>これで、Tomcatを再起動すれば、catalina.out.[日付]ファイルを作成してくれるようになる。毎日再起動の必要もなく安全だ。</p>
<p>そして、catalina.out.[日付]ファイルを削除するバッチも作成した。</p>
<div class="igBar"><span id="lperl-8"><a href="#" onclick="javascript:showPlainTxt('perl-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PERL:</span>
<div id="perl-8">
<div class="perl">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">#!/usr/bin/perl</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">use</span> strict;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">use</span> Date::<span style="color: #006600;">Simple</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$logdir</span> = <span style="color: #ff0000;">"/usr/local/tomcat/logs"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$store_day</span> = <span style="color: #cc66cc;color:#800000;">60</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$date</span> = Date::<span style="color: #006600;">Simple</span>-&gt;<span style="color: #006600;">new</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$date</span> = <span style="color: #0000ff;">$date</span> - <span style="color: #0000ff;">$store_day</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$deletedate</span> = <a href="http://www.perldoc.com/perl5.6/pod/func/sprintf.html"><span style="color: #000066;">sprintf</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"%04d"</span>,<span style="color: #0000ff;">$date</span>-&gt;<span style="color: #006600;">year</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .<a href="http://www.perldoc.com/perl5.6/pod/func/sprintf.html"><span style="color: #000066;">sprintf</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"%02d"</span>,<span style="color: #0000ff;">$date</span>-&gt;<span style="color: #006600;">month</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; .<a href="http://www.perldoc.com/perl5.6/pod/func/sprintf.html"><span style="color: #000066;">sprintf</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"%02d"</span>,<span style="color: #0000ff;">$date</span>-&gt;<span style="color: #006600;">day</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.perldoc.com/perl5.6/pod/func/opendir.html"><span style="color: #000066;">opendir</span></a><span style="color: #66cc66;">&#40;</span>DIR, <span style="color: #0000ff;">$logdir</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">my</span> <span style="color: #0000ff;">@file</span> = <a href="http://www.perldoc.com/perl5.6/pod/func/readdir.html"><span style="color: #000066;">readdir</span></a><span style="color: #66cc66;">&#40;</span>DIR<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">foreach</span> <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$file</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">@file</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$file</span> =~ /^<span style="color: #66cc66;">&#91;</span>^.<span style="color: #66cc66;">&#93;</span>+\.<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#91;</span>\d\-<span style="color: #66cc66;">&#93;</span>+<span style="color: #66cc66;">&#41;</span>\.<a href="http://www.perldoc.com/perl5.6/pod/func/log.html"><span style="color: #000066;">log</span></a>$/<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$filedate</span> = $<span style="color: #cc66cc;color:#800000;">1</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$filedate</span> =~ <a href="http://www.perldoc.com/perl5.6/pod/func/s.html"><span style="color: #000066;">s</span></a>/\-//g;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$filedate</span> &lt;<span style="color: #0000ff;">$deletedate</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; `/bin/rm -f <span style="color: #0000ff;">$logdir</span>/<span style="color: #0000ff;">$file</span>`;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.perldoc.com/perl5.6/pod/func/closedir.html"><span style="color: #000066;">closedir</span></a> DIR; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
$logdirはTomcatログディレクトリの位置、$store_dayに保存する期間を日数で指定し、後はcrontabに1日1度削除するように設定すれば完了。</p>
]]></content:encoded>
			<wfw:commentRss>http://ueblog.natural-wave.com/2008/01/13/tomcat-logrotate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://ueblog.natural-wave.com/2008/01/13/tomcat-logrotate/" />
	</item>
		<item>
		<title>Load Averageが下がった</title>
		<link>http://ueblog.natural-wave.com/2007/12/28/load-average%e3%81%8c%e4%b8%8b%e3%81%8c%e3%81%a3%e3%81%9f/</link>
		<comments>http://ueblog.natural-wave.com/2007/12/28/load-average%e3%81%8c%e4%b8%8b%e3%81%8c%e3%81%a3%e3%81%9f/#comments</comments>
		<pubDate>Fri, 28 Dec 2007 13:46:17 +0000</pubDate>
		<dc:creator>ueblog</dc:creator>
				<category><![CDATA[Programing]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[サーバ]]></category>

		<guid isPermaLink="false">http://ueblog.natural-wave.com/2007/12/28/load-average%e3%81%8c%e4%b8%8b%e3%81%8c%e3%81%a3%e3%81%9f/</guid>
		<description><![CDATA[自宅サーバ、最近またいろいろと触ってます。 基本安定運用だけど、深夜、妙にLoad Averageが上がっていることが多い。 深夜は基本的にいろんなクーロンが走っているんですが、原因はClamavというUNIX系のアンチウィルスソフトであることが判明]]></description>
			<content:encoded><![CDATA[<p>自宅サーバ、最近またいろいろと触ってます。</p>
<p>基本安定運用だけど、深夜、妙にLoad Averageが上がっていることが多い。</p>
<p>深夜は基本的にいろんなクーロンが走っているんですが、原因は<a href="http://clamav-jp.sourceforge.jp/" target="_blank">Clamav</a>というUNIX系のアンチウィルスソフトであることが判明。さっそく、クーロンを1日1回から週1に変更してみて様子を見てみる。</p>
<p><img src='http://ueblog.natural-wave.com/wp-content/uploads/2007/12/s-cpu-week.jpg' alt='load average' /></p>
<p>土日のぴょこっと上がっているのが、以前の状態。そして月曜日からは穏やかな波に。</p>
<p>これで安心して年を越せる。でもウィルスチェックは週1でいいのか！？</p>
]]></content:encoded>
			<wfw:commentRss>http://ueblog.natural-wave.com/2007/12/28/load-average%e3%81%8c%e4%b8%8b%e3%81%8c%e3%81%a3%e3%81%9f/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://ueblog.natural-wave.com/2007/12/28/load-average%e3%81%8c%e4%b8%8b%e3%81%8c%e3%81%a3%e3%81%9f/" />
	</item>
	</channel>
</rss>

