<?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/"
	>

<channel>
	<title>ひろぽっぽれす &#187; Linux</title>
	<atom:link href="http://hiropo.co.uk/archives/category/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://hiropo.co.uk</link>
	<description>Web系エンジニアの適当なブログです。どうでも酔いものばかり作ってます。</description>
	<lastBuildDate>Sun, 25 Jul 2010 17:09:15 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>まさかの4ヶ月待ち。GuruPlugが届いた！</title>
		<link>http://hiropo.co.uk/archives/491</link>
		<comments>http://hiropo.co.uk/archives/491#comments</comments>
		<pubDate>Mon, 12 Jul 2010 17:46:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[GuruPlug]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://hiropo.co.uk/?p=491</guid>
		<description><![CDATA[ついに念願のアレが届いた。 SekenではiPhone4やらiPadやら話題になりまくってるけど、どんなApple製品よりも手に入りにくくて品薄な商品が世の中にはあるんだぜ…。 それがこちら↓ GuruPlug！電源内蔵のプラグコンピュータとして話題になったSheevaPlugの後継機！ なんと無線LANも使えちゃうんだってばよ。 形はACアダプタと同じ形だけど重さはタバコ2箱分くらいの重さでむちゃくちゃ軽い。 これがパソコンだなんて全然見えないんす。 これも製造元（US）に直接発注して、製造が追いつかず、発注から約4ヶ月の時を経てようやく我が家に届きました。日本には代理店なども特にないので、直接個人輸入しないと手に入らないのです。 これ10台繋いでグリッドコンピューティングしてみたいすな！]]></description>
			<content:encoded><![CDATA[<p>ついに念願のアレが届いた。<br />
SekenではiPhone4やらiPadやら話題になりまくってるけど、どんなApple製品よりも手に入りにくくて品薄な商品が世の中にはあるんだぜ…。</p>
<p>それがこちら↓<br />
<a href="http://hiropo.co.uk/wp-content/uploads/2010/07/IMG_02502.jpg"><img src="http://hiropo.co.uk/wp-content/uploads/2010/07/IMG_02502-225x300.jpg" alt="" title="IMG_0250" width="225" height="300" class="size-medium wp-image-500" /></a></p>
<p>GuruPlug！電源内蔵のプラグコンピュータとして話題になったSheevaPlugの後継機！<br />
なんと無線LANも使えちゃうんだってばよ。 </p>
<div><a href="http://hiropo.co.uk/wp-content/uploads/2010/07/IMG_02521.jpg"><img src="http://hiropo.co.uk/wp-content/uploads/2010/07/IMG_02521-225x300.jpg" alt="" title="IMG_0252" width="225" height="300" class="size-medium wp-image-497" /></a></div>
<div><a href="http://hiropo.co.uk/wp-content/uploads/2010/07/IMG_02541.jpg"><img src="http://hiropo.co.uk/wp-content/uploads/2010/07/IMG_02541-225x300.jpg" alt="" title="IMG_0254" width="225" height="300" class="size-medium wp-image-498" /></a></div>
<p>形はACアダプタと同じ形だけど重さはタバコ2箱分くらいの重さでむちゃくちゃ軽い。<br />
これがパソコンだなんて全然見えないんす。</p>
<p>これも製造元（US）に直接発注して、製造が追いつかず、発注から約4ヶ月の時を経てようやく我が家に届きました。日本には代理店なども特にないので、直接個人輸入しないと手に入らないのです。</p>
<p>これ10台繋いでグリッドコンピューティングしてみたいすな！</p>
]]></content:encoded>
			<wfw:commentRss>http://hiropo.co.uk/archives/491/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS5.xにPostgresqlをyumでインストールする</title>
		<link>http://hiropo.co.uk/archives/487</link>
		<comments>http://hiropo.co.uk/archives/487#comments</comments>
		<pubDate>Tue, 06 Jul 2010 13:57:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://hiropo.co.uk/?p=487</guid>
		<description><![CDATA[MySQLしか使ったことないのですが、案件でPostgresqlを使うことになりまして、CentOS5系にインストールしてみました。 クライアント認証につまづいてなかなか壁を突破できませんでしたがググって頑張りましたよっと。 まず、yumで必要なモジュールをインストール。 PLAIN TEXT CODE: &#91;root@localhost ~&#93;# yum install -y postgresql-tcl postgresql-server postgresql-contrib postgresql php-pgsql 今回はPHPとの連動を行うので、下記もインストール PLAIN TEXT CODE: &#91;root@localhost ~&#93;# yum install -y php-pgsql ひととおりインストールが終わったらpostgresqlを起動。 PLAIN TEXT CODE: &#91;root@localhost ~&#93;# /etc/rc.d/init.d/postgresql start それでは初期設定を行っていく。 MySQLと違って、postgresというユーザーでログインしないと設定が行えない。 PLAIN TEXT CODE: &#91;root@localhost ~&#93;# su - postgres -bash-3.2$ psql -l &#160; &#160; &#160; &#160; List of databases &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>MySQLしか使ったことないのですが、案件でPostgresqlを使うことになりまして、CentOS5系にインストールしてみました。<br />
クライアント認証につまづいてなかなか壁を突破できませんでしたがググって頑張りましたよっと。</p>
<p>まず、yumで必要なモジュールをインストール。</p>
<div class="igBar"><span id="lcode-11"><a href="#" onclick="javascript:showCodeTxt('code-11'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-11">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>root@localhost ~<span style="color:#006600; font-weight:bold;">&#93;</span># yum install -y postgresql-tcl postgresql-server postgresql-contrib postgresql php-pgsql </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>今回はPHPとの連動を行うので、下記もインストール</p>
<div class="igBar"><span id="lcode-12"><a href="#" onclick="javascript:showCodeTxt('code-12'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-12">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>root@localhost ~<span style="color:#006600; font-weight:bold;">&#93;</span># yum install -y php-pgsql </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>ひととおりインストールが終わったらpostgresqlを起動。</p>
<div class="igBar"><span id="lcode-13"><a href="#" onclick="javascript:showCodeTxt('code-13'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-13">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>root@localhost ~<span style="color:#006600; font-weight:bold;">&#93;</span># /etc/rc.<span style="">d</span>/init.<span style="">d</span>/postgresql start </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>それでは初期設定を行っていく。<br />
MySQLと違って、postgresというユーザーでログインしないと設定が行えない。</p>
<div class="igBar"><span id="lcode-14"><a href="#" onclick="javascript:showCodeTxt('code-14'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-14">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>root@localhost ~<span style="color:#006600; font-weight:bold;">&#93;</span># su - postgres</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">-bash-<span style="color:#800000;color:#800000;">3</span>.<span style="color:#800000;color:#800000;">2</span>$ psql -l</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; List of databases</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;Name&nbsp; &nbsp; |&nbsp; Owner&nbsp; &nbsp;| Encoding</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">-----------+----------+----------</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;postgres&nbsp; | postgres | UTF8</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;template0 | postgres | UTF8</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;template1 | postgres | UTF8</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;color:#800000;">3</span> rows<span style="color:#006600; font-weight:bold;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>ユーザー名"test"、パスワード"test" のユーザーを作成する。<br />
権限はデータベースの作成を可能にする。</p>
<div class="igBar"><span id="lcode-15"><a href="#" onclick="javascript:showCodeTxt('code-15'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-15">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">-bash-<span style="color:#800000;color:#800000;">3</span>.<span style="color:#800000;color:#800000;">2</span>$ psql</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Welcome to psql <span style="color:#800000;color:#800000;">8</span>.<span style="color:#800000;color:#800000;">1</span>.<span style="color:#800000;color:#800000;">21</span>, the PostgreSQL interactive terminal.</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="">Type</span>:&nbsp; \copyright for distribution terms</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;\h for help with SQL commands</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;\? for help with psql commands</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;\g or terminate with semicolon to execute query</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;\q to quit</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">postgres=# CREATE USER <span style="color:#CC0000;">"test"</span> CREATEDB PASSWORD <span style="color:#CC0000;">'test'</span> LOGIN;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">CREATE ROLE</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">postgres=# \q</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">-bash-<span style="color:#800000;color:#800000;">3</span>.<span style="color:#800000;color:#800000;">2</span>$ exit</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">logout</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>root@localhost ~<span style="color:#006600; font-weight:bold;">&#93;</span># </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>これで、Linux上のユーザー"test"からPostgresqlを操作できるようになる。<br />
そしたら、"test"ユーザーが使えるデータベース"test"を作成する。<br />
文字コードは"EUC_JP"にする。</p>
<div class="igBar"><span id="lcode-16"><a href="#" onclick="javascript:showCodeTxt('code-16'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-16">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>root@localhost ~<span style="color:#006600; font-weight:bold;">&#93;</span># su - test</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>test@localhost ~<span style="color:#006600; font-weight:bold;">&#93;</span># createdb test -E EUC_JP</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">CREATE DATABASE</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>test@localhost ~<span style="color:#006600; font-weight:bold;">&#93;</span>$ psql -l</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; List of databases</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;Name&nbsp; &nbsp; |&nbsp; Owner&nbsp; &nbsp;| Encoding</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">-----------+----------+----------</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;test&nbsp; &nbsp; &nbsp; | test&nbsp; &nbsp; &nbsp;| EUC_JP</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;postgres&nbsp; | postgres | UTF8</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;template0 | postgres | UTF8</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;template1 | postgres | UTF8</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#800000;color:#800000;">4</span> rows<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>test@localhost ~<span style="color:#006600; font-weight:bold;">&#93;</span>$ </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>ちなみにただ単に "creatdb test" とした場合、文字コードはデフォルトで"utf-8"になる。<br />
データベースを削除する場合は、"drop データベース名" とすれば良い。</p>
<p>最後に、PHPなどと連携する場合は、クライアント認証ファイルを編集する必要がある。</p>
<div class="igBar"><span id="lcode-17"><a href="#" onclick="javascript:showCodeTxt('code-17'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-17">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>root@localhost ~<span style="color:#006600; font-weight:bold;">&#93;</span># vi /var/lib/pgsql/data/pg_hba.<span style="">conf</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#local&nbsp; all&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;all&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ident sameuser&nbsp; #コメントアウト</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">local&nbsp; &nbsp;all&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;all&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;trust</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<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:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#host&nbsp; &nbsp;all&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;all&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">127</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">1</span>/<span style="color:#800000;color:#800000;">32</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ident sameuser&nbsp; #コメントアウト</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">host&nbsp; &nbsp; all&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;all&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#800000;color:#800000;">127</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">1</span>/<span style="color:#800000;color:#800000;">32</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; password </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>postgresqlとapacheを再起動する。</p>
<div class="igBar"><span id="lcode-18"><a href="#" onclick="javascript:showCodeTxt('code-18'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-18">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>root@localhost ~<span style="color:#006600; font-weight:bold;">&#93;</span># /etc/rc.<span style="">d</span>/init.<span style="">d</span>/postgresql restart</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Stopping postgresql service:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#006600; font-weight:bold;">&#91;</span>&nbsp; OK&nbsp; <span style="color:#006600; font-weight:bold;">&#93;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Starting postgresql service:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#006600; font-weight:bold;">&#91;</span>&nbsp; OK&nbsp; <span style="color:#006600; font-weight:bold;">&#93;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<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:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>root@localhost ~<span style="color:#006600; font-weight:bold;">&#93;</span># /etc/rc.<span style="">d</span>/init.<span style="">d</span>/httpd restart</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Stopping httpd:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#91;</span>&nbsp; OK&nbsp; <span style="color:#006600; font-weight:bold;">&#93;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Starting httpd:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#91;</span>&nbsp; OK&nbsp; <span style="color:#006600; font-weight:bold;">&#93;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>phpファイルを書いて、接続テストする。</p>
<div class="igBar"><span id="lphp-19"><a href="#" onclick="javascript:showCodeTxt('php-19'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-19">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<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:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$data</span> = <span style="color:#FF0000;">"host=localhost user=test dbname=test password=test"</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$pg</span> = <a href="http://www.php.net/pg_connect"><span style="color:#000066;">pg_connect</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$data</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span>!<span style="color:#0000FF;">$pg</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'接続できませんでした。'</span>;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">else</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'接続しちゃいました&lt;br /&gt;'</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<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:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span>!<a href="http://www.php.net/pg_close"><span style="color:#000066;">pg_close</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$pg</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">else</span><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> <span style="color:#FF0000;">'接続を閉じました。'</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<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:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>特に問題なく接続できたら下記のように表示される。</p>
<div class="igBar"><span id="lcode-20"><a href="#" onclick="javascript:showCodeTxt('code-20'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-20">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">接続しちゃいました</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">接続を閉じました。 </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>クライアント認証んとこは本当にわかんなくてつまづいたけど、ちゃんと繋がると感動ですね！</p>
]]></content:encoded>
			<wfw:commentRss>http://hiropo.co.uk/archives/487/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spamassassin が動いてない</title>
		<link>http://hiropo.co.uk/archives/477</link>
		<comments>http://hiropo.co.uk/archives/477#comments</comments>
		<pubDate>Wed, 16 Jun 2010 16:27:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Spamassassin]]></category>

		<guid isPermaLink="false">http://hiropo.co.uk/?p=477</guid>
		<description><![CDATA[スパムメールが増えたのかなんなのか、ウチのサーバのログが暴れだしたので、ちょこっと調べてみることにした。 PLAIN TEXT CODE: host spamc&#91;9130&#93;: connect to spamd on 127.0.0.1 failed, retrying &#40;#1 of 3&#41;: Connection refused host spamc&#91;9130&#93;: connect to spamd on 127.0.0.1 failed, retrying &#40;#2 of 3&#41;: Connection refused host spamc&#91;9130&#93;: connect to spamd on 127.0.0.1 failed, retrying &#40;#3 of 3&#41;: Connection refused このようなログがけっこう前からあった。どうも Spamassassin が動いていないようだ。 リブートしてみようと思い下記のコマンドを実行 PLAIN TEXT CODE: &#91;root@host&#93;~# /etc/init.d/spamassassin [...]]]></description>
			<content:encoded><![CDATA[<p>スパムメールが増えたのかなんなのか、ウチのサーバのログが暴れだしたので、ちょこっと調べてみることにした。</p>
<div class="igBar"><span id="lcode-24"><a href="#" onclick="javascript:showCodeTxt('code-24'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-24">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">host spamc<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#800000;color:#800000;">9130</span><span style="color:#006600; font-weight:bold;">&#93;</span>: connect to spamd on <span style="color:#800000;color:#800000;">127</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">1</span> failed, retrying <span style="color:#006600; font-weight:bold;">&#40;</span>#1 of <span style="color:#800000;color:#800000;">3</span><span style="color:#006600; font-weight:bold;">&#41;</span>: Connection refused</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">host spamc<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#800000;color:#800000;">9130</span><span style="color:#006600; font-weight:bold;">&#93;</span>: connect to spamd on <span style="color:#800000;color:#800000;">127</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">1</span> failed, retrying <span style="color:#006600; font-weight:bold;">&#40;</span>#2 of <span style="color:#800000;color:#800000;">3</span><span style="color:#006600; font-weight:bold;">&#41;</span>: Connection refused</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">host spamc<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#800000;color:#800000;">9130</span><span style="color:#006600; font-weight:bold;">&#93;</span>: connect to spamd on <span style="color:#800000;color:#800000;">127</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">1</span> failed, retrying <span style="color:#006600; font-weight:bold;">&#40;</span>#3 of <span style="color:#800000;color:#800000;">3</span><span style="color:#006600; font-weight:bold;">&#41;</span>: Connection refused </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>このようなログがけっこう前からあった。どうも Spamassassin が動いていないようだ。<br />
リブートしてみようと思い下記のコマンドを実行</p>
<div class="igBar"><span id="lcode-25"><a href="#" onclick="javascript:showCodeTxt('code-25'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-25">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>root@host<span style="color:#006600; font-weight:bold;">&#93;</span>~# /etc/init.<span style="">d</span>/spamassassin start</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">spamd を起動中: child process <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#800000;color:#800000;">14793</span><span style="color:#006600; font-weight:bold;">&#93;</span> exited or timed out without signaling production of a PID file: exit <span style="color:#800000;color:#800000;">255</span> at /usr/bin/spamd line <span style="color:#800000;color:#800000;">2588</span>. </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>なんだか調べていったら下記のページにたどり着いた。<br />
<a href="http://www.komine.biz/modules/d3forum/index.php?topic_id=34">http://www.komine.biz/modules/d3forum/index.php?topic_id=34</a><br />
<a href="http://www.komine.biz/modules/d3forum/index.php?topic_id=34">http://www.gossamer-threads.com/lists/spamassassin/users/151177?page=last</a></p>
<p>そこでは、</p>
<blockquote><p>
Hi<br />
Just found the solution: Run the command 'sa-update'<br />
Note: Found the hint, after I tried to run spamd without '--daemonize'<br />
Hope this works also for others!
</p></blockquote>
<p>と書いてあるので、下記コマンドを実行後、改めてSpamassassin を起動してみた。</p>
<div class="igBar"><span id="lcode-26"><a href="#" onclick="javascript:showCodeTxt('code-26'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-26">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>root@host<span style="color:#006600; font-weight:bold;">&#93;</span>~# sa-update</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>root@host<span style="color:#006600; font-weight:bold;">&#93;</span>~# /etc/rc.<span style="">d</span>/init.<span style="">d</span>/spamassassin start</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">spamd を起動中:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#91;</span>&nbsp; OK&nbsp; <span style="color:#006600; font-weight:bold;">&#93;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>おぉ、無事に起動した！あとはこれで様子見である。</p>
]]></content:encoded>
			<wfw:commentRss>http://hiropo.co.uk/archives/477/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>zshでテトリス</title>
		<link>http://hiropo.co.uk/archives/473</link>
		<comments>http://hiropo.co.uk/archives/473#comments</comments>
		<pubDate>Fri, 21 May 2010 04:02:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[zsh]]></category>

		<guid isPermaLink="false">http://hiropo.co.uk/?p=473</guid>
		<description><![CDATA[PLAIN TEXT CODE: zsh autoload -U tetris zle -N tetris bindkey '^T' tetris Control-T を押せばゲーム開始。zsh最強！ しかもちょっとキー操作が難しい。]]></description>
			<content:encoded><![CDATA[<div class="igBar"><span id="lcode-28"><a href="#" onclick="javascript:showCodeTxt('code-28'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-28">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">zsh</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">autoload -U tetris</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">zle -N tetris</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">bindkey <span style="color:#CC0000;">'^T'</span> tetris </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Control-T を押せばゲーム開始。zsh最強！<br />
しかもちょっとキー操作が難しい。</p>
]]></content:encoded>
			<wfw:commentRss>http://hiropo.co.uk/archives/473/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>fedora13 がもうすぐリリース！</title>
		<link>http://hiropo.co.uk/archives/461</link>
		<comments>http://hiropo.co.uk/archives/461#comments</comments>
		<pubDate>Mon, 10 May 2010 02:11:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://hiropo.co.uk/?p=461</guid>
		<description><![CDATA[公式サイトに行ったら上のタグがあったので貼ってみた。]]></description>
			<content:encoded><![CDATA[<p><script id="fedora-banner" type="text/javascript" src="http://fedoraproject.org/static/js/release-counter-ext.js?lang=ja"></script></p>
<p>公式サイトに行ったら上のタグがあったので貼ってみた。</p>
]]></content:encoded>
			<wfw:commentRss>http://hiropo.co.uk/archives/461/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Value too large for defined data type &#8211; Tripwire</title>
		<link>http://hiropo.co.uk/archives/447</link>
		<comments>http://hiropo.co.uk/archives/447#comments</comments>
		<pubDate>Fri, 23 Apr 2010 01:55:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tripwire]]></category>

		<guid isPermaLink="false">http://hiropo.co.uk/?p=447</guid>
		<description><![CDATA[あるサーバを管理しているのだが、Tripwire で、下記のようなエラーが出ていた。 PLAIN TEXT CODE: 1.&#160; &#160;File system error. &#160; &#160; &#160;Filename: /var/lib/xen/images/CentOS5.img &#160; &#160; &#160;Value too large for defined data type ファイルサイズがでかすぎるんだよ！って怒られた。 ググってみたら、ファイルサイズが 2G を越えているのが原因らしい。 UNIX では「2G の壁」というものが存在しているようで、これは lseek() など、ファイル内の読み出し位置を移動する関数に与えるオフセット値が伝統的に signed long であるためらしい（もうよくわからん）。 signed long では 2147483647 、要するに 2G バイトまでしか表現できないので、これを越えると単に fseek()に渡せないだけでなく、 内部の位置計算処理に多大な混乱が起こる（ということらしい）。ちなみに相対位置指定のために負の値も必要（だそうです）。 いろいろとめんどくさいのねー。もう1TBとかが当たり前の時代ですのに。 さて、解決方法である。 Tripwireのファイルチェックをスキップしてしまえばよいのである。 PLAIN TEXT CODE: #ポリシーファイル（テキスト版）の復元 &#91;root@host ~&#93;# twadmin -m p [...]]]></description>
			<content:encoded><![CDATA[<p>あるサーバを管理しているのだが、Tripwire で、下記のようなエラーが出ていた。</p>
<div class="igBar"><span id="lcode-31"><a href="#" onclick="javascript:showCodeTxt('code-31'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-31">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#800000;color:#800000;">1</span>.&nbsp; &nbsp;<span style="">File</span> system error.</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;<span style="">Filename</span>: /var/lib/xen/images/CentOS5.<span style="">img</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp;Value too large for defined data type </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>ファイルサイズがでかすぎるんだよ！って怒られた。</p>
<p>ググってみたら、ファイルサイズが 2G を越えているのが原因らしい。 UNIX では「2G の壁」というものが存在しているようで、これは lseek() など、ファイル内の読み出し位置を移動する関数に与えるオフセット値が伝統的に signed long であるためらしい（もうよくわからん）。<br />
signed long では 2147483647 、要するに 2G バイトまでしか表現できないので、これを越えると単に fseek()に渡せないだけでなく、 内部の位置計算処理に多大な混乱が起こる（ということらしい）。ちなみに相対位置指定のために負の値も必要（だそうです）。</p>
<p>いろいろとめんどくさいのねー。もう1TBとかが当たり前の時代ですのに。</p>
<p>さて、解決方法である。<br />
Tripwireのファイルチェックをスキップしてしまえばよいのである。</p>
<div class="igBar"><span id="lcode-32"><a href="#" onclick="javascript:showCodeTxt('code-32'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-32">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#ポリシーファイル（テキスト版）の復元</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>root@host ~<span style="color:#006600; font-weight:bold;">&#93;</span># twadmin -m p -c /etc/tripwire/tw.<span style="">cfg</span> -p /etc/tripwire/tw.<span style="">pol</span> -S /etc/tripwire/site.<span style="">key</span>&gt; /etc/tripwire/twpol.<span style="">txt</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>root@host ~<span style="color:#006600; font-weight:bold;">&#93;</span># vi /etc/tripwire/twpol.<span style="">txt</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<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:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ##</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">################################################ #</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # #</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; Monitor Filesystems&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# #</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ##</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">################################################</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#40;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; rulename = <span style="color:#CC0000;">"Monitor Filesystems"</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; /&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-&gt; $<span style="color:#006600; font-weight:bold;">&#40;</span>ReadOnly<span style="color:#006600; font-weight:bold;">&#41;</span> ;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; /home&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-&gt; $<span style="color:#006600; font-weight:bold;">&#40;</span>ReadOnly<span style="color:#006600; font-weight:bold;">&#41;</span> ;&nbsp; # Modify as needed</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; /usr&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&gt; $<span style="color:#006600; font-weight:bold;">&#40;</span>ReadOnly<span style="color:#006600; font-weight:bold;">&#41;</span> ;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; /var&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&gt; $<span style="color:#006600; font-weight:bold;">&#40;</span>ReadOnly<span style="color:#006600; font-weight:bold;">&#41;</span> ;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; !/var/lib/xen/images;&nbsp; &nbsp;#&lt;- 追加</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#ポリシーファイル（暗号署名版）を作成</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>root@host ~<span style="color:#006600; font-weight:bold;">&#93;</span># twadmin -m P -c /etc/tripwire/tw.<span style="">cfg</span> -p /etc/tripwire/tw.<span style="">pol</span> -S /etc/tripwire/site.<span style="">key</span> /etc/tripwire/twpol.<span style="">txt</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Please enter your site passphrase:&nbsp; &nbsp; &nbsp;#&lt;- サイトパスフレーズ応答</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#ポリシーファイル（テキスト版）削除</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>root@host ~<span style="color:#006600; font-weight:bold;">&#93;</span># rm -f /etc/tripwire/twpol.<span style="">txt</span></div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<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:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#データベース初期化</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>root@host ~<span style="color:#006600; font-weight:bold;">&#93;</span># tripwire -m i -s -c /etc/tripwire/tw.<span style="">cfg</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">Please enter your local passphrase:&nbsp; &nbsp; &nbsp;#&lt;- ローカルパスフレーズ応答 </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>他にも動画ファイルを保存していたりなどで2GB超えてしまうファイル群を格納しているディレクトリがあったら、そこを登録しておいても良いと思う。</p>
]]></content:encoded>
			<wfw:commentRss>http://hiropo.co.uk/archives/447/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>新「ブラッディ・マンデイ」の藤丸が持ってるUSBメモリの作り方 &#8211; BackTrack4 final 編</title>
		<link>http://hiropo.co.uk/archives/398</link>
		<comments>http://hiropo.co.uk/archives/398#comments</comments>
		<pubDate>Thu, 11 Feb 2010 16:44:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[backtrack]]></category>

		<guid isPermaLink="false">http://hiropo.co.uk/?p=398</guid>
		<description><![CDATA[どもです、ブラッディ・マンデイ、シーズン2がマンガもドラマも始まりましたね。個人的にはドラマ版は人が死にすぎなのであまり好きではありません。断然コミック派です。（どうでもいいですねｗ） 以前に「ブラッディ・マンデイ」の藤丸がもってるUSBメモリの作り方という記事を1年以上前に書きました。質問もたくさんいただきましたが全然返せてなくてすみません。youtubeか何かで実際の作り方を動画にしてくれという要望もありましたので、試みようとしたのですが、BackTrackもOphcrackも新しくなってしまい、仕様が変わったため書いた記事の内容と大きく異なることになりそうでしたのでやめました。それと、2つのLinuxをがっちゃんこするのも結構めんどくさいし若干難しいと思いますので、今回改めてシンプルで簡単な方法を書こうと思います。 まず、ブラッディ・マンデイの藤丸が使っているUSBですが、あれはUSBメモリにUSBブート可能なLinux系OSをつっこんでブートしていると思います。最近で有名なOSはUbuntuやFedoraあたりでしょうか。Knoppixや他にもLiveUSBのLinuxはありますが、特にUbuntuは凄い使い易くて良いですアレ（笑） ただ今回は、あくまで藤丸に近づくために、実際に構築したサーバのセキュリティをペネトレーションテスト（ハッキングやクラック）するためのOS、BackTrack4というOSをUSBメモリからブートできるようにしてみます。 用意するものは4GB以上のUSBメモリとインターネットにつながったWindows環境です。 USBメモリは1,000円前後で購入できます。 そして、BackTrack4 final をダウンロードします。 →BackTrackダウンロードURL ダウンロードが完了したら、USBメモリをWindowsマシンに差してください。 次に、LinuxLive USB Creator というツールを使って藤丸のUSBメモリを作っていきます。 LinuxLive USB Creator をダウンロードします。 →LinuxLive USB CreatorダウンロードURL ダウンロードしたら、LinuxLive USB Creator 2.4.exe を実行して解凍します。 解凍してできたフォルダに入ります。 LiLi USB Creator.exe を実行します。 あとは、インストール先のUSBメモリとダウンロードしたBackTrack4 final のisoを選択して、インストールを実行します。 インストールが完了すると、下記のようなメッセージが出てきます。 これでインストール完了です。とっても簡単！ さて、次は起動するPCのBIOSをUSBメモリをファーストブートに設定して、起動してみてください。 下記は僕のネットブックでの起動画面です。 こんな感じで出来上がりです。 ちなみに今回も、大変お世話になっているatc-500様のブログを参考にしました。 次回があれば、Ubuntu編を書こうかなと思います。それかBackTrack4の藤丸（っぽい）仕様でもつくろうかなと。 それでは、よきハックなライフを送ってくださいませー。]]></description>
			<content:encoded><![CDATA[<p>どもです、ブラッディ・マンデイ、シーズン2がマンガもドラマも始まりましたね。個人的にはドラマ版は人が死にすぎなのであまり好きではありません。断然コミック派です。（どうでもいいですねｗ）</p>
<p>以前に<a href="http://hiropo.co.uk/archives/111">「ブラッディ・マンデイ」の藤丸がもってるUSBメモリの作り方</a>という記事を1年以上前に書きました。質問もたくさんいただきましたが全然返せてなくてすみません。youtubeか何かで実際の作り方を動画にしてくれという要望もありましたので、試みようとしたのですが、BackTrackもOphcrackも新しくなってしまい、仕様が変わったため書いた記事の内容と大きく異なることになりそうでしたのでやめました。それと、2つのLinuxをがっちゃんこするのも結構めんどくさいし若干難しいと思いますので、今回改めてシンプルで簡単な方法を書こうと思います。</p>
<p>まず、ブラッディ・マンデイの藤丸が使っているUSBですが、あれはUSBメモリにUSBブート可能なLinux系OSをつっこんでブートしていると思います。最近で有名なOSはUbuntuやFedoraあたりでしょうか。Knoppixや他にもLiveUSBのLinuxはありますが、特にUbuntuは凄い使い易くて良いですアレ（笑）</p>
<p>ただ今回は、あくまで藤丸に近づくために、実際に構築したサーバのセキュリティをペネトレーションテスト（ハッキングやクラック）するためのOS、BackTrack4というOSをUSBメモリからブートできるようにしてみます。</p>
<p>用意するものは4GB以上のUSBメモリとインターネットにつながったWindows環境です。<br />
USBメモリは1,000円前後で購入できます。<br />
<iframe src="http://rcm-jp.amazon.co.jp/e/cm?lt1=_blank&#038;bc1=FFFFFF&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=funnythingz-22&#038;o=9&#038;p=8&#038;l=as1&#038;m=amazon&#038;f=ifr&#038;asins=B0014B3SK8" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe></p>
<p>そして、BackTrack4 final をダウンロードします。<br />
<img src="http://hiropo.co.uk/wp-content/uploads/2010/02/dl.gif" alt="dl" title="dl" width="398" height="244" class="alignnone size-full wp-image-400" /><br />
→<a href="http://www.backtrack-linux.org/downloads/" target="_blank">BackTrackダウンロードURL</a></p>
<p>ダウンロードが完了したら、USBメモリをWindowsマシンに差してください。<br />
次に、LinuxLive USB Creator というツールを使って藤丸のUSBメモリを作っていきます。</p>
<p>LinuxLive USB Creator をダウンロードします。<br />
<img src="http://hiropo.co.uk/wp-content/uploads/2010/02/click.gif" alt="click" title="click" width="314" height="201" class="alignnone size-full wp-image-401" /></p>
<p>→<a href="http://www.linuxliveusb.com/" target="_blank">LinuxLive USB CreatorダウンロードURL</a></p>
<p>ダウンロードしたら、LinuxLive USB Creator 2.4.exe を実行して解凍します。<br />
<img src="http://hiropo.co.uk/wp-content/uploads/2010/02/icon.gif" alt="icon" title="icon" width="130" height="239" class="alignnone size-full wp-image-402" /></p>
<p>解凍してできたフォルダに入ります。<br />
<img src="http://hiropo.co.uk/wp-content/uploads/2010/02/dir.gif" alt="dir" title="dir" width="652" height="504" class="alignnone size-full wp-image-403" /></p>
<p>LiLi USB Creator.exe を実行します。<br />
<img src="http://hiropo.co.uk/wp-content/uploads/2010/02/tool.gif" alt="tool" title="tool" width="450" height="750" class="alignnone size-full wp-image-404" /></p>
<p>あとは、インストール先のUSBメモリとダウンロードしたBackTrack4 final のisoを選択して、インストールを実行します。<br />
インストールが完了すると、下記のようなメッセージが出てきます。<br />
<img src="http://hiropo.co.uk/wp-content/uploads/2010/02/comp.gif" alt="comp" title="comp" width="386" height="121" class="alignnone size-full wp-image-405" /></p>
<p>これでインストール完了です。とっても簡単！</p>
<p>さて、次は起動するPCのBIOSをUSBメモリをファーストブートに設定して、起動してみてください。<br />
下記は僕のネットブックでの起動画面です。<br />
<img src="http://hiropo.co.uk/wp-content/uploads/2010/02/37e3808047553cedb34daa9b1d7ab2a3.gif" alt="写真" title="写真" width="300" height="400" class="alignnone size-full wp-image-406" /></p>
<p>こんな感じで出来上がりです。</p>
<p>ちなみに今回も、大変お世話になっている<a href="http://royalwin.blog.so-net.ne.jp/" target="_blank">atc-500</a>様の<a href="http://royalwin.blog.so-net.ne.jp/2010-02-10-1" target="_blank">ブログ</a>を参考にしました。</p>
<p>次回があれば、Ubuntu編を書こうかなと思います。それかBackTrack4の藤丸（っぽい）仕様でもつくろうかなと。</p>
<p>それでは、よきハックなライフを送ってくださいませー。</p>
]]></content:encoded>
			<wfw:commentRss>http://hiropo.co.uk/archives/398/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Linux標準コマンドでローレベルフォーマット</title>
		<link>http://hiropo.co.uk/archives/366</link>
		<comments>http://hiropo.co.uk/archives/366#comments</comments>
		<pubDate>Sat, 30 Jan 2010 20:00:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>

		<guid isPermaLink="false">http://hiropo.co.uk/?p=366</guid>
		<description><![CDATA[ローレベルフォーマットって物理フォーマットのことなんだけど、厳密にはローレベルフォーマットって個人レベルじゃできないようです。 ここでいうローレベルフォーマットってのは、データを0の値で上書きすることをさします。0で上書きすることによって実質データの完全削除です。 0と1しかないんだから0で書いちゃえばなんもないじゃんってことです！ ってとこで、ローレベルフォーマットってツール使ったりすることが多いですが、最近はUSBやCDからブートできるubuntuとかLinuxがたくさんあるので、Linux標準のddコマンド使っちゃえばできちゃうようです。 参考サイト http://www.cybernetic-survival.net/dd.htm ウチのDELLノートちゃんのパーティションキレてるDドライブちゃんとキレイに全消ししたかったので、下記のコマンドを実行してみた。 PLAIN TEXT CODE: #dd if=/dev/zero of=/dev/sda2 デバイスは環境によってことなるのでその都度確認しないと大変なことになりますよ！ これでウチのDELLノートちゃんは無事にデータが消えやがってくれましたよ。 dd便利すな！]]></description>
			<content:encoded><![CDATA[<p>ローレベルフォーマットって物理フォーマットのことなんだけど、厳密にはローレベルフォーマットって個人レベルじゃできないようです。<br />
ここでいうローレベルフォーマットってのは、データを0の値で上書きすることをさします。0で上書きすることによって実質データの完全削除です。</p>
<p>0と1しかないんだから0で書いちゃえばなんもないじゃんってことです！</p>
<p>ってとこで、ローレベルフォーマットってツール使ったりすることが多いですが、最近はUSBやCDからブートできるubuntuとかLinuxがたくさんあるので、Linux標準のddコマンド使っちゃえばできちゃうようです。</p>
<p>参考サイト<br />
<a href="http://www.cybernetic-survival.net/dd.htm" target="_blank">http://www.cybernetic-survival.net/dd.htm</a></p>
<p>ウチのDELLノートちゃんのパーティションキレてるDドライブちゃんとキレイに全消ししたかったので、下記のコマンドを実行してみた。</p>
<div class="igBar"><span id="lcode-34"><a href="#" onclick="javascript:showCodeTxt('code-34'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-34">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#dd if=/dev/zero of=/dev/sda2 </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>デバイスは環境によってことなるのでその都度確認しないと大変なことになりますよ！<br />
これでウチのDELLノートちゃんは無事にデータが消えやがってくれましたよ。</p>
<p>dd便利すな！</p>
]]></content:encoded>
			<wfw:commentRss>http://hiropo.co.uk/archives/366/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebookユーザーを標的にしたメール詐欺に対抗してみた2</title>
		<link>http://hiropo.co.uk/archives/326</link>
		<comments>http://hiropo.co.uk/archives/326#comments</comments>
		<pubDate>Thu, 05 Nov 2009 15:36:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[sendmail]]></category>

		<guid isPermaLink="false">http://hiropo.co.uk/?p=326</guid>
		<description><![CDATA[前記事にて、特定ドメインからの受信を拒否してみたんだけど、全然メール拒否できてなかった。 そりゃこれだけ手の込んだフィッシングメールなんだから当然だよね。メールヘッダ見たら全然違ったし、しかもドメイン複数あるし偽造されてるしで結局わからんちんだったので、webmaster宛にメールは届いていたので、webmaster宛のメールをすべて拒否することにした。 PLAIN TEXT CODE: &#91;root@host ~&#93;# vi /etc/aliases webmaster: root 　　↓に変更 #webmaster: root &#160; &#91;root@host ~&#93;# newaliases うん、ばっちり来なくなった。 そもそもwebmasterとかinfoとかrootとか狙われやすいんだから、デフォルトでオフにしとくべきした。]]></description>
			<content:encoded><![CDATA[<p><a href="http://hiropo.co.uk/archives/322">前記事</a>にて、特定ドメインからの受信を拒否してみたんだけど、全然メール拒否できてなかった。<br />
そりゃこれだけ手の込んだフィッシングメールなんだから当然だよね。メールヘッダ見たら全然違ったし、しかもドメイン複数あるし偽造されてるしで結局わからんちんだったので、webmaster宛にメールは届いていたので、webmaster宛のメールをすべて拒否することにした。</p>
<div class="igBar"><span id="lcode-36"><a href="#" onclick="javascript:showCodeTxt('code-36'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-36">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>root@host ~<span style="color:#006600; font-weight:bold;">&#93;</span># vi /etc/aliases</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">webmaster: root</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">　　↓に変更</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#webmaster: root</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>root@host ~<span style="color:#006600; font-weight:bold;">&#93;</span># newaliases </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>うん、ばっちり来なくなった。<br />
そもそもwebmasterとかinfoとかrootとか狙われやすいんだから、デフォルトでオフにしとくべきした。</p>
]]></content:encoded>
			<wfw:commentRss>http://hiropo.co.uk/archives/326/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebookユーザーを標的にしたメール詐欺に対抗してみた</title>
		<link>http://hiropo.co.uk/archives/322</link>
		<comments>http://hiropo.co.uk/archives/322#comments</comments>
		<pubDate>Sat, 31 Oct 2009 07:39:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[sendmail]]></category>

		<guid isPermaLink="false">http://hiropo.co.uk/?p=322</guid>
		<description><![CDATA[最近、フィッシングサイトへの誘導メールがよく来る。なりすましはFacebookである。 ググってみたらどうやら今全世界で流行っているらしいですねー。 ＃ニュース記事 Facebookユーザーを標的にしたメール詐欺--トロイの木馬「Zeus」で個人情報を盗む メールのくる間隔としては、1日に2～3通は来るのでかなり迷惑。 ってことで、送信元ドメインごとメール受信を拒否することにした。 ウチはsendmailなので、まず設定ファイルを修正する。 PLAIN TEXT CODE: &#91;root@host ~&#93;#vi /etc/mail/access #追記↓ facebookmail.com&#160; REJECT "[ドメイン名] REJECT" と記述することで、このドメインのメールはすべて受信拒否にする。 次に、アクセスファイルをデータベースに変換します。変換にはsendmailに付属のmakemapコマンドを使用します。 その後、sendmailを再起動すれば設定が反映されます。 PLAIN TEXT CODE: &#91;root@host ~&#93;# makemap -v hash /etc/mail/access.db &#60;/etc/mail/access &#91;root@host ~&#93;# /etc/rc.d/init.d/sendmail restart これで指定ドメインのメールが拒否できます。 ちなみに受信したい場合は、"RELAY" を使うことでメールを受信することができるようになります。 フィッシング、こわいよ、フィッシング。]]></description>
			<content:encoded><![CDATA[<p>最近、フィッシングサイトへの誘導メールがよく来る。なりすましはFacebookである。<br />
ググってみたらどうやら今全世界で流行っているらしいですねー。</p>
<p>＃ニュース記事<br />
<a href="http://japan.cnet.com/clip/global/story/0,3800097347,20402585,00.htm" target="_blank">Facebookユーザーを標的にしたメール詐欺--トロイの木馬「Zeus」で個人情報を盗む</a></p>
<p>メールのくる間隔としては、1日に2～3通は来るのでかなり迷惑。</p>
<p>ってことで、送信元ドメインごとメール受信を拒否することにした。</p>
<p>ウチはsendmailなので、まず設定ファイルを修正する。</p>
<div class="igBar"><span id="lcode-39"><a href="#" onclick="javascript:showCodeTxt('code-39'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-39">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>root@host ~<span style="color:#006600; font-weight:bold;">&#93;</span>#vi /etc/mail/access</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">#追記↓</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">facebookmail.<span style="">com</span>&nbsp; REJECT </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>"[ドメイン名] REJECT" と記述することで、このドメインのメールはすべて受信拒否にする。<br />
次に、アクセスファイルをデータベースに変換します。変換にはsendmailに付属のmakemapコマンドを使用します。<br />
その後、sendmailを再起動すれば設定が反映されます。</p>
<div class="igBar"><span id="lcode-40"><a href="#" onclick="javascript:showCodeTxt('code-40'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-40">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>root@host ~<span style="color:#006600; font-weight:bold;">&#93;</span># makemap -v hash /etc/mail/access.<span style="">db</span> &lt;/etc/mail/access</div>
</li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#91;</span>root@host ~<span style="color:#006600; font-weight:bold;">&#93;</span># /etc/rc.<span style="">d</span>/init.<span style="">d</span>/sendmail restart </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>これで指定ドメインのメールが拒否できます。<br />
ちなみに受信したい場合は、"RELAY" を使うことでメールを受信することができるようになります。</p>
<p>フィッシング、こわいよ、フィッシング。</p>
]]></content:encoded>
			<wfw:commentRss>http://hiropo.co.uk/archives/322/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
