<?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://tt-house.com/category/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://tt-house.com</link>
	<description>生涯一開発屋</description>
	<lastBuildDate>Fri, 03 Sep 2010 14:01:41 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>WordPressのチューニングをしてみようかと思った</title>
		<link>http://tt-house.com/2009/12/wordpress-performance.html</link>
		<comments>http://tt-house.com/2009/12/wordpress-performance.html#comments</comments>
		<pubDate>Wed, 30 Dec 2009 13:55:26 +0000</pubDate>
		<dc:creator>ハセテツ</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://tt-house.com/?p=150</guid>
		<description><![CDATA[ApacheBenchでこのブログのパフォーマンスを計測したら、
Requests per second:    9.94[#/sec]
という、思っていたより残念な結果でした。うーん、思っていたより低いなぁ。。。
]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ftt-house.com%252F2009%252F12%252Fwordpress-performance.html%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22WordPress%E3%81%AE%E3%83%81%E3%83%A5%E3%83%BC%E3%83%8B%E3%83%B3%E3%82%B0%E3%82%92%E3%81%97%E3%81%A6%E3%81%BF%E3%82%88%E3%81%86%E3%81%8B%E3%81%A8%E6%80%9D%E3%81%A3%E3%81%9F%22%20%7D);"></div>
<p>ApacheBenchでこのブログのパフォーマンスを計測したら、</p>
<blockquote><p>Requests per second:    9.94[#/sec]</p></blockquote>
<p>という、思っていたより残念な結果でした。うーん、思っていたより低いなぁ。。。</p>
<p>で、とりあえずmysql_connectをmysql_pconnectに変えてみたのですが。</p>
<blockquote><p>Requests per second:    10.01 [#/sec]</p></blockquote>
<p>と、大して変わらず。。。</p>
<p>めんどくさいけど、ApacheとMySQLの設定から見直そう。PHPをDSOで使ってるのも影響してるのかなぁ。。。</p>

]]></content:encoded>
			<wfw:commentRss>http://tt-house.com/2009/12/wordpress-performance.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS5.4の64bit版をネットワークインストールする</title>
		<link>http://tt-house.com/2009/12/centos-64bit-networkinstall.html</link>
		<comments>http://tt-house.com/2009/12/centos-64bit-networkinstall.html#comments</comments>
		<pubDate>Sun, 20 Dec 2009 00:57:14 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.tt-house.com//wp/?p=121</guid>
		<description><![CDATA[CentOSをネットワークインストールというエントリーでネットワークインストール...]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ftt-house.com%252F2009%252F12%252Fcentos-64bit-networkinstall.html%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22CentOS5.4%E3%81%AE64bit%E7%89%88%E3%82%92%E3%83%8D%E3%83%83%E3%83%88%E3%83%AF%E3%83%BC%E3%82%AF%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%99%E3%82%8B%22%20%7D);"></div>
<p><a href="http://www.tt-house.com/2008/02/centos.html">CentOSをネットワークインストール</a>というエントリーでネットワークインストールする方法を書いておいたのですが、これは32bit版のやりかた。</p>
<p>といってもほとんど変わりません。FTPで見に行く先が変わるだけです。今回はCentOS5.4の64bit版をCore2Duoのマシンにインストールしました。</p>
<p>ディレクトリが「/Linux/centos/5.4/os/x86_64」に変わるだけでした。あとは32bit版とまったくおんなじ。</p>
<p>初の64bit環境ですが、ちといろいろと試して遊んでみたいと思います。</p>

]]></content:encoded>
			<wfw:commentRss>http://tt-house.com/2009/12/centos-64bit-networkinstall.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LinuxでSSHの接続ホストを制限する</title>
		<link>http://tt-house.com/2008/10/linuxssh.html</link>
		<comments>http://tt-house.com/2008/10/linuxssh.html#comments</comments>
		<pubDate>Fri, 03 Oct 2008 18:47:13 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[CentOS]]></category>

		<guid isPermaLink="false">http://www.tt-house.com//wp/?p=67</guid>
		<description><![CDATA[rootじゃ接続できないようにしてあるし、鍵方式での接続しか許可していないので不...]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ftt-house.com%252F2008%252F10%252Flinuxssh.html%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Linux%E3%81%A7SSH%E3%81%AE%E6%8E%A5%E7%B6%9A%E3%83%9B%E3%82%B9%E3%83%88%E3%82%92%E5%88%B6%E9%99%90%E3%81%99%E3%82%8B%22%20%7D);"></div>
<p>rootじゃ接続できないようにしてあるし、鍵方式での接続しか許可していないので不正ログインされる危険性はとても低いと思っているのですが、それでもせっせとログインしようとしてくる怪しげなプログラム君たちがいます。</p>
<p>ログがひたすら増えるだけでも若干気分が悪いので、SSHで接続できるホストをごりっと制限してしまいました。e-mobile等で外からメンテナンスすることができなくなってしまうので不便ではありますが、まぁレアケースだし、そもそもe-mobile持ってないので気にしないことにしましょう。</p>
<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
<p>/etc/hosts.allow</p>
</blockquote>
<p>に接続できるホストのIPアドレスを記載します。ここはホスト名でもいいみたいなんですが、IPにしておきました。</p>
<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
<p>sshd:xxx.xxx.xxx.xxx　xxx.xxx.xxx.xxx</p>
</blockquote>
<p>複数ある場合は半角スペースで区切るようです。これで、上記ＩＰアドレスからの接続は許可されます。次は禁止ホストの設定です。</p>
<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
<p>/etc/hosts.deny</p>
</blockquote>
<p>に</p>
<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
<p>sshd: ALL</p>
</blockquote>
<p>と記述します。</p>
<p>「hosts.allow」→「hosts.deny」の順で解釈するそうです。「hosts.allow」に当該IPアドレスがあればそのまま接続を許可。「hosts.allow」にないIPは次に「hosts.deny」を参照し、そっちにあったら禁止。どっちにもなければ許可になります。</p>
<p>SCP使えばFTPもいらないし、MySQL等もローカル接続のみを許可にして、外部からつなぎたい場合はSSHでポートフォワードすればOK。無駄なポートは空けないことが重要かと。</p>

]]></content:encoded>
			<wfw:commentRss>http://tt-house.com/2008/10/linuxssh.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linuxで時刻を設定する（ntpdは使わない）</title>
		<link>http://tt-house.com/2008/10/linuxntpd.html</link>
		<comments>http://tt-house.com/2008/10/linuxntpd.html#comments</comments>
		<pubDate>Fri, 03 Oct 2008 11:55:34 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.tt-house.com//wp/?p=66</guid>
		<description><![CDATA[社内にあるCentOSはntpで時刻同期ができません。「そんなntpdサーバいね...]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ftt-house.com%252F2008%252F10%252Flinuxntpd.html%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Linux%E3%81%A7%E6%99%82%E5%88%BB%E3%82%92%E8%A8%AD%E5%AE%9A%E3%81%99%E3%82%8B%EF%BC%88ntpd%E3%81%AF%E4%BD%BF%E3%82%8F%E3%81%AA%E3%81%84%EF%BC%89%22%20%7D);"></div>
<p>社内にあるCentOSはntpで時刻同期ができません。「そんなntpdサーバいねーよ」と怒られてしまいます。うーん、自宅では見えてるサーバなんだけどなぁ。。。ポート閉じられてて外に出れないのかなぁ。（←確認してない）</p>
<p>ということで、地道に手動で設定。なんというアナログ。</p>
<blockquote style="margin-right: 0px;" dir="ltr"><p>date mmddhhmmyyyy</p></blockquote>
<p>めんどくさくなったら調べよう。それまで放置しよう。</p>
<p>月2桁、日2桁、24時で2桁、分2桁、年4桁、ですね。</p>

]]></content:encoded>
			<wfw:commentRss>http://tt-house.com/2008/10/linuxntpd.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>困ったときには原点に戻ろう</title>
		<link>http://tt-house.com/2008/07/post_24.html</link>
		<comments>http://tt-house.com/2008/07/post_24.html#comments</comments>
		<pubDate>Mon, 21 Jul 2008 12:26:09 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.tt-house.com//wp/?p=61</guid>
		<description><![CDATA[まぁたいしたことではないのですが、 「トラブル時にはログをみる」 これが如何に大...]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ftt-house.com%252F2008%252F07%252Fpost_24.html%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22%E5%9B%B0%E3%81%A3%E3%81%9F%E3%81%A8%E3%81%8D%E3%81%AB%E3%81%AF%E5%8E%9F%E7%82%B9%E3%81%AB%E6%88%BB%E3%82%8D%E3%81%86%22%20%7D);"></div>
<p>まぁたいしたことではないのですが、</p>
<p>「トラブル時にはログをみる」</p>
<p>これが如何に大事かというのを痛感しました。設定ファイルを見直す前に、ログを見直す。tailコマンド大活躍！</p>
<p>当然のこと過ぎて、ついつい忘れてしまう今日この頃です。油断大敵。</p>

]]></content:encoded>
			<wfw:commentRss>http://tt-house.com/2008/07/post_24.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>シンボリックリンクの張り方</title>
		<link>http://tt-house.com/2008/06/post_23.html</link>
		<comments>http://tt-house.com/2008/06/post_23.html#comments</comments>
		<pubDate>Mon, 30 Jun 2008 11:33:43 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.tt-house.com//wp/?p=60</guid>
		<description><![CDATA[ln -s リンク先パス リンク名 /home/www/hogeへ/home/...]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ftt-house.com%252F2008%252F06%252Fpost_23.html%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22%E3%82%B7%E3%83%B3%E3%83%9C%E3%83%AA%E3%83%83%E3%82%AF%E3%83%AA%E3%83%B3%E3%82%AF%E3%81%AE%E5%BC%B5%E3%82%8A%E6%96%B9%22%20%7D);"></div>
<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
<p dir="ltr">ln -s リンク先パス リンク名</p>
</blockquote>
<p dir="ltr" style="MARGIN-RIGHT: 0px">/home/www/hogeへ/home/www/hoge2という名前でシンボリックリンクを張るには、</p>
<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
<p dir="ltr">ln -s /home/www/hoge /home/www/hoge2</p>
</blockquote>
<p dir="ltr">となる。これを知っているのと知らないのとので、運用負荷が大きく違う、と思っている。</p>

]]></content:encoded>
			<wfw:commentRss>http://tt-house.com/2008/06/post_23.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>コマンドでCVSモジュールのチェックアウトを行う</title>
		<link>http://tt-house.com/2008/06/cvs.html</link>
		<comments>http://tt-house.com/2008/06/cvs.html#comments</comments>
		<pubDate>Tue, 17 Jun 2008 16:06:12 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[CVS]]></category>

		<guid isPermaLink="false">http://www.tt-house.com//wp/?p=58</guid>
		<description><![CDATA[cvs -d:pserver:ユーザ名@CVSサーバの場所:/var/cvs ...]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ftt-house.com%252F2008%252F06%252Fcvs.html%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E3%81%A7CVS%E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB%E3%81%AE%E3%83%81%E3%82%A7%E3%83%83%E3%82%AF%E3%82%A2%E3%82%A6%E3%83%88%E3%82%92%E8%A1%8C%E3%81%86%22%20%7D);"></div>
<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
<p>cvs -d:pserver:ユーザ名@CVSサーバの場所:/var/cvs checkout モジュール名</p>
</blockquote>
<p dir="ltr">クライアントで開発、CVSにコミット。で、そのソースコードをサーバ上にチェックアウトするときに使う。</p>
<p dir="ltr">いちいちクライアントからFTPやSCPでアップするのもよいが、さすがにめんどくさいのでこれ一発。で、あとは随時アップデートを行えば修正箇所の本番への反映もコマンド一発。</p>
<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
<p>cvs -d:pserver:ユーザ名@CVSサーバの場所:/var/cvs&nbsp;update -d&nbsp;モジュール名</p>
</blockquote>
<p>環境設定ファイルなんかは更新対象外としたいが、そのやり方はまた後日調べておこう。</p>

]]></content:encoded>
			<wfw:commentRss>http://tt-house.com/2008/06/cvs.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>perlの実行ファイルへのパスを確認する</title>
		<link>http://tt-house.com/2008/04/perl.html</link>
		<comments>http://tt-house.com/2008/04/perl.html#comments</comments>
		<pubDate>Tue, 01 Apr 2008 11:40:13 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://www.tt-house.com//wp/?p=53</guid>
		<description><![CDATA[手を抜いてyumでperlをインストールしたらどこにインストールされたのかわから...]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ftt-house.com%252F2008%252F04%252Fperl.html%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22perl%E3%81%AE%E5%AE%9F%E8%A1%8C%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%B8%E3%81%AE%E3%83%91%E3%82%B9%E3%82%92%E7%A2%BA%E8%AA%8D%E3%81%99%E3%82%8B%22%20%7D);"></div>
<p>手を抜いてyumでperlをインストールしたらどこにインストールされたのかわからんようになってしまいました。ちゃんとソースコード落としてきてmakeしろっていうことなんですよね。</p>
<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
<p>whereis perl</p>
</blockquote>
<p>これでperlの実行ファイルへのパスが表示されます。</p>
<p>いやいや、いい加減学習しないとね。（←MySQLで前科アリ）</p>

]]></content:encoded>
			<wfw:commentRss>http://tt-house.com/2008/04/perl.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOSでネットワーク設定</title>
		<link>http://tt-house.com/2008/03/centos_1.html</link>
		<comments>http://tt-house.com/2008/03/centos_1.html#comments</comments>
		<pubDate>Sat, 01 Mar 2008 06:50:02 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[CentOS]]></category>

		<guid isPermaLink="false">http://www.tt-house.com//wp/?p=51</guid>
		<description><![CDATA[/etc/sysconfig/network-scripts/ifcfg-eth...]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ftt-house.com%252F2008%252F03%252Fcentos_1.html%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22CentOS%E3%81%A7%E3%83%8D%E3%83%83%E3%83%88%E3%83%AF%E3%83%BC%E3%82%AF%E8%A8%AD%E5%AE%9A%22%20%7D);"></div>
<p>/etc/sysconfig/network-scripts/ifcfg-eth0</p>
<p>NICが2枚あったらeth1になるんでしょうね。</p>
<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
<p dir="ltr" style="MARGIN-RIGHT: 0px">ONBOOT=yes<br />BOOTPROTO=none<br />IPADDR=192.168.0.99<br />GATEWAY=192.168.1.1</p>
</blockquote>
<p dir="ltr" style="MARGIN-RIGHT: 0px">上から、起動時に有効にするか。「none」で固定IP、「dhcp」でまんまDHCP、あとはIPとゲートウェイ。</p>
<p dir="ltr" style="MARGIN-RIGHT: 0px">その他、MACアドレスも記載されてますが、それはOSインストール時に勝手に書かれます。</p>

]]></content:encoded>
			<wfw:commentRss>http://tt-house.com/2008/03/centos_1.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOSをネットワークインストール</title>
		<link>http://tt-house.com/2008/02/centos.html</link>
		<comments>http://tt-house.com/2008/02/centos.html#comments</comments>
		<pubDate>Wed, 27 Feb 2008 06:51:59 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[CentOS]]></category>

		<guid isPermaLink="false">http://www.tt-house.com//wp/?p=50</guid>
		<description><![CDATA[いまどきのLinuxってディスクが5～6枚あるので、焼くのが大変だ...]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin-left: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ftt-house.com%252F2008%252F02%252Fcentos.html%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22CentOS%E3%82%92%E3%83%8D%E3%83%83%E3%83%88%E3%83%AF%E3%83%BC%E3%82%AF%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%22%20%7D);"></div>
<p>いまどきのLinuxってディスクが5～6枚あるので、焼くのが大変だったんですよね。まぁ全部焼かなくてもいいのですが、つい全部焼いておいてしまう。</p>
<p>で、今回CentOSのマシンをセットアップするのにネットワークインストールなるものを試してみました。これがもうカンタンラクチン。</p>
<p>CentOSのisoをダウンロードする際に「CentOS-5.1-i386-netinstall.iso」（今回はCentOS5を使用）を選択してダウンロード。このISOをCDに焼きます。</p>
<p>あとはCDブート、途中まではいつもとおんなじです。</p>
<p>「Installation Method」、インストール方法の選択画面で「http」か「ftp」を選択するだけ。今回はftpを利用しました。</p>
<p>ネットワークの設定は自動にしちゃって、ftpサーバの指定は「ftp.riken.jp」（理研さん、ありがとうございます）。ディレクトリは「/Linux/centos/5/os/i386」、「Use non-anonymouse ftp」にはチェックを入れません。</p>
<p>ここ以降は通常のインストールのまんま。変わりはありません。勝手にファイルをダウンロードしてインストールしてくれます。</p>
<p>OSのメディアなんて何度も使うものじゃないから、これはすっごく便利です。</p>

]]></content:encoded>
			<wfw:commentRss>http://tt-house.com/2008/02/centos.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
