<?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://blog.cheki.net/archives/category/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.cheki.net</link>
	<description>悲しみの果てに</description>
	<lastBuildDate>Wed, 13 Jul 2011 02:39:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Apacheのリバースプロキシを利用してSERVER_NAMEが取れない時</title>
		<link>http://blog.cheki.net/archives/2339</link>
		<comments>http://blog.cheki.net/archives/2339#comments</comments>
		<pubDate>Thu, 05 May 2011 15:26:36 +0000</pubDate>
		<dc:creator>cockok</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://blog.cheki.net/?p=2339</guid>
		<description><![CDATA[Apacheのリバースプロキシを利用して、SERVER_NAMEがリバースプロキシサーバのIPになっちゃう場合は、リバースプロキシ側のApacheに以下の設定を追加。 ProxyPreserveHost On PHPプロ [...]]]></description>
			<content:encoded><![CDATA[<p>Apacheのリバースプロキシを利用して、SERVER_NAMEがリバースプロキシサーバのIPになっちゃう場合は、リバースプロキシ側のApacheに以下の設定を追加。</p>
<pre>
ProxyPreserveHost On
</pre>
<p>PHPプログラムでSERVER_NAMEの値を超利用しまくりな場合は、問題ないようならぶち込んじゃってもいいかも。</p>
<pre>
$_SERVER['SERVER_NAME'] = isset($_SERVER['X_FORWARDED_HOST']) ? $_SERVER['X_FORWARDED_HOST'] : $_SERVER['SERVER_NAME'];
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.cheki.net/archives/2339/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>そんなfindで大丈夫か？</title>
		<link>http://blog.cheki.net/archives/2319</link>
		<comments>http://blog.cheki.net/archives/2319#comments</comments>
		<pubDate>Thu, 25 Nov 2010 09:02:33 +0000</pubDate>
		<dc:creator>cockok</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blog.cheki.net/?p=2319</guid>
		<description><![CDATA[一番いいのを頼む！ find . -type f -print0 &#124; xargs -0 echo よろしい、ならば+だ find . -type f -exec echo {} + はい、xargs死んだ！]]></description>
			<content:encoded><![CDATA[<p>一番いいのを頼む！</p>
<pre>
find . -type f -print0 | xargs -0 echo
</pre>
<p>よろしい、ならば+だ</p>
<pre>
find . -type f -exec echo {} +
</pre>
<p>はい、xargs死んだ！</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.cheki.net/archives/2319/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ubuntuへvm-toolsのインストール</title>
		<link>http://blog.cheki.net/archives/2303</link>
		<comments>http://blog.cheki.net/archives/2303#comments</comments>
		<pubDate>Mon, 01 Nov 2010 14:38:33 +0000</pubDate>
		<dc:creator>cockok</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://blog.cheki.net/?p=2303</guid>
		<description><![CDATA[vm-toolsのオープンソース実装のものをインストール sudo aptitude install open-vm-tools]]></description>
			<content:encoded><![CDATA[<p>vm-toolsのオープンソース実装のものをインストール</p>
<pre>sudo aptitude install open-vm-tools</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.cheki.net/archives/2303/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ubuntuのIPv6を切る方法</title>
		<link>http://blog.cheki.net/archives/2293</link>
		<comments>http://blog.cheki.net/archives/2293#comments</comments>
		<pubDate>Fri, 22 Oct 2010 05:58:12 +0000</pubDate>
		<dc:creator>cockok</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.cheki.net/?p=2293</guid>
		<description><![CDATA[「/etc/sysctl.conf」に以下を追加 net.ipv6.conf.all.disable_ipv6 = 1 ググって上位にくるサイトでallがなかったり、=の両脇にスペースがなかったりしたので。]]></description>
			<content:encoded><![CDATA[<p>「/etc/sysctl.conf」に以下を追加</p>
<pre>net.ipv6.conf.all.disable_ipv6 = 1</pre>
<p>ググって上位にくるサイトでallがなかったり、=の両脇にスペースがなかったりしたので。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.cheki.net/archives/2293/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>パスワード生成</title>
		<link>http://blog.cheki.net/archives/2290</link>
		<comments>http://blog.cheki.net/archives/2290#comments</comments>
		<pubDate>Fri, 22 Oct 2010 05:48:57 +0000</pubDate>
		<dc:creator>cockok</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blog.cheki.net/?p=2290</guid>
		<description><![CDATA[CentOSでパスワード生成するコマンドmkpasswd debian、ubuntuのmkpasswdとは別物 # yum install expect 大小英数字8文字からなるパスワードの生成 $ mkpasswd - [...]]]></description>
			<content:encoded><![CDATA[<p>CentOSでパスワード生成するコマンドmkpasswd<br />
debian、ubuntuのmkpasswdとは別物</p>
<pre># yum install expect</pre>
<p>大小英数字8文字からなるパスワードの生成</p>
<pre>$ mkpasswd -l 8 -d 1 -c 1 -C 1 -s 0</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.cheki.net/archives/2290/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ヒアドキュメントとリダイレクト</title>
		<link>http://blog.cheki.net/archives/2275</link>
		<comments>http://blog.cheki.net/archives/2275#comments</comments>
		<pubDate>Thu, 16 Sep 2010 19:50:00 +0000</pubDate>
		<dc:creator>cockok</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blog.cheki.net/?p=2275</guid>
		<description><![CDATA[$ cat &#60;&#60; _EOT_ &#124; sudo tee /etc/apache2/sites-available/example.com &#62; /dev/null &#60;VirtualHost *:80&#038;g [...]]]></description>
			<content:encoded><![CDATA[<pre>
$ cat &lt;&lt; _EOT_ | sudo tee /etc/apache2/sites-available/example.com &gt; /dev/null
&lt;VirtualHost *:80&gt;
    ServerName example.com
    DocumentRoot /var/www/example.com
    &lt;Directory /var/www/example.com&gt;
        Order deny,allow
        Deny from all
    &lt;/Directory&gt;
    ErrorLog /var/log/apache2/example.com-error_log
    CustomLog /var/log/apache2/example.com-access_log combined
&lt;/VirtualHost&gt;
_EOT_
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.cheki.net/archives/2275/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sudoでリダイレクト</title>
		<link>http://blog.cheki.net/archives/2259</link>
		<comments>http://blog.cheki.net/archives/2259#comments</comments>
		<pubDate>Sat, 11 Sep 2010 15:27:36 +0000</pubDate>
		<dc:creator>cockok</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://blog.cheki.net/?p=2259</guid>
		<description><![CDATA[sudo echo "hoge" > /path/to とかやった場合、/path/toへの書き込みはroot権限ではなくオーナー権限となるため怒られる場合の対処。 その1 echo "hoge" &#124; sudo tee  [...]]]></description>
			<content:encoded><![CDATA[<pre>
sudo echo "hoge" > /path/to
</pre>
<p>とかやった場合、/path/toへの書き込みはroot権限ではなくオーナー権限となるため怒られる場合の対処。</p>
<h2>その1</h2>
<pre>
echo "hoge" | sudo tee /path/to > /dev/null
</pre>
<p>標準出力が気にならないならリダイレクトは不要。</p>
<h2>その2</h2>
<pre>
sudo sh -c 'echo "hoge" > /path/to'
</pre>
<p>root権限でシェルを実行する。</p>
<p>その2の場合、コマンドによってはエスケープの必要があるので、その1の方がよさげ。<br />
コピペ用に複数行書き込む場合はその2を利用した方がよさそう。</p>
<pre>
sudo sh -c 'cat > /path/to'
hoge
hoge
^D
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.cheki.net/archives/2259/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>nagios + NDOUtils</title>
		<link>http://blog.cheki.net/archives/2228</link>
		<comments>http://blog.cheki.net/archives/2228#comments</comments>
		<pubDate>Tue, 31 Aug 2010 05:20:44 +0000</pubDate>
		<dc:creator>cockok</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[nagios3]]></category>

		<guid isPermaLink="false">http://blog.cheki.net/?p=2228</guid>
		<description><![CDATA[ubuntu 10.04 LTS インストール sudo aptitude install ndoutils-nagios3-mysql nagios他もろもろ追加され、サービス起動。 が、ndoutilsは実行されない [...]]]></description>
			<content:encoded><![CDATA[<p>ubuntu 10.04 LTS</p>
<p>インストール</p>
<pre>
sudo aptitude install ndoutils-nagios3-mysql
</pre>
<p>nagios他もろもろ追加され、サービス起動。<br />
が、ndoutilsは実行されない。</p>
<p>nagiosの停止</p>
<pre>
sudo service nagios3 stop
</pre>
<p>編集<br />
/etc/default/ndoutils</p>
<pre>
ENABLE_NDOUTILS=0
</pre>
<p>↓↓↓</p>
<pre>
ENABLE_NDOUTILS=1
</pre>
<p>/etc/nagios3/nagios.cfg</p>
<pre>
broker_module=/usr/lib/ndoutils/ndomod-mysql-3x.o config_file=/usr/share/ndoutils-nagios3-mysql/tmpl/ndomod.cfg
</pre>
<p>サービス起動</p>
<pre>
sudo service ndoutils start
sudo service nagios3 start
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.cheki.net/archives/2228/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hadoopを試してみる</title>
		<link>http://blog.cheki.net/archives/2223</link>
		<comments>http://blog.cheki.net/archives/2223#comments</comments>
		<pubDate>Mon, 30 Aug 2010 15:58:25 +0000</pubDate>
		<dc:creator>cockok</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blog.cheki.net/?p=2223</guid>
		<description><![CDATA[ubuntu 10.04 LTS via:Hadoop (CDH3) Quick Start Guide &#8211; Documentation &#8211; Cloudera Wiki sun-javaがリポジト [...]]]></description>
			<content:encoded><![CDATA[<p>ubuntu 10.04 LTS</p>
<p>via:<a href="https://docs.cloudera.com/display/DOC/Hadoop+%28CDH3%29+Quick+Start+Guide">Hadoop (CDH3) Quick Start Guide &#8211; Documentation &#8211; Cloudera Wiki</a></p>
<p>sun-javaがリポジトリからなくなったので外部リポジトリを利用</p>
<pre>
sudo aptitude install python-software-properties
sudo add-apt-repository 'deb http://archive.canonical.com/ lucid partner'
sudo apt-get update
sudo aptitude install sun-java6-jdk
</pre>
<p>Cloudera版が楽そうなので利用する。</p>
<pre>
sudo add-apt-repository 'deb http://archive.cloudera.com/debian lucid-cdh3 contrib'
sudo add-apt-repository 'deb-src http://archive.cloudera.com/debian lucid-cdh3 contrib'
wget http://archive.cloudera.com/debian/archive.key
sudo apt-key add archive.key
sudo apt-get update
sudo aptitude install hadoop
</pre>
<p>サービス起動</p>
<pre>
sudo /etc/init.d/hadoop-0.20-namenode start
sudo /etc/init.d/hadoop-0.20-jobtracker start
sudo /etc/init.d/hadoop-0.20-datanode start
sudo /etc/init.d/hadoop-0.20-tasktracker start
</pre>
<p>今すぐ必要ってわけじゃないしと飽きた。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.cheki.net/archives/2223/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>at</title>
		<link>http://blog.cheki.net/archives/2202</link>
		<comments>http://blog.cheki.net/archives/2202#comments</comments>
		<pubDate>Wed, 11 Aug 2010 04:15:04 +0000</pubDate>
		<dc:creator>cockok</dc:creator>
				<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://blog.cheki.net/?p=2202</guid>
		<description><![CDATA[at, batch, atq, atrm &#8211; 後で実行するコマンドジョブをキューに入れたり、そのようなジョブの閲覧・削除を行なう Manpage of AT test.shを1分後に実行 $ at -f ./ [...]]]></description>
			<content:encoded><![CDATA[<p>at, batch, atq, atrm &#8211; 後で実行するコマンドジョブをキューに入れたり、そのようなジョブの閲覧・削除を行なう<br />
<a href="http://www.linux.or.jp/JM/html/at/man1/at.1.html">Manpage of AT</a></p>
<p>test.shを1分後に実行</p>
<pre>
$ at -f ./test.sh now 1minute
</pre>
<p>test.shを13:00に実行</p>
<pre>
$ at -f ./test.sh 13:00
</pre>
<p>パイプでつないで</p>
<pre>
$ echo './test.sh' | at now 1minute
</pre>
<p>シェルから<br />
<EOT>はCtrl+D</p>
<pre>
$ at now + 1minute
warning: commands will be executed using /bin/sh
at> './test.sh'
at> <EOT>
job 11 at Wed Aug 11 13:12:00 2010
</pre>
<p>実行されていないジョブ一覧</p>
<pre>
$ atq
</pre>
<p>実行されていないジョブの削除<br />
atqでジョブIDを取得して指定</p>
<pre>
$ atq
1       Wed Aug 11 13:00:00 2010 a cockok
$ atrm 1
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.cheki.net/archives/2202/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

