<?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; CentOS</title>
	<atom:link href="http://ore.saizensen.net/archives/tag/centos/feed" rel="self" type="application/rss+xml" />
	<link>http://ore.saizensen.net</link>
	<description>イェ〜〜ィ。見てる〜〜〜？？</description>
	<lastBuildDate>Fri, 18 Dec 2009 02:55:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>[courier-authlib]vpopmailをSMTP-AUTH対応させる為のcourier-authlibを置いておく[vpopmail]</title>
		<link>http://ore.saizensen.net/archives/467</link>
		<comments>http://ore.saizensen.net/archives/467#comments</comments>
		<pubDate>Wed, 25 Nov 2009 08:47:29 +0000</pubDate>
		<dc:creator>bubbkis</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Postfix]]></category>
		<category><![CDATA[UNIX]]></category>

		<guid isPermaLink="false">http://ore.saizensen.net/?p=467</guid>
		<description><![CDATA[				CentOSで自宅サーバー構築のバーチャルドメイン設定(Postfix&#038;Dovecot+qmail&#038;vpopmail)で、
				２）SMTP-AUTHのvpopmail対応という箇所があり [...]]]></description>
			<content:encoded><![CDATA[				<p><a href="http://centossrv.com/">CentOSで自宅サーバー構築</a>の<a href="http://centossrv.com/postfix-vpopmail.shtml">バーチャルドメイン設定(Postfix&#038;Dovecot+qmail&#038;vpopmail)</a>で、<br />
				２）SMTP-AUTHのvpopmail対応という箇所がありますが、<br />
				そこで使用しているcourier-authlibの配布元からダウンロードできるバージョンでは<strong>「vchkpw認証」</strong>が出来ません。</p>
				<p>ということで、「vchkpw認証」できる古いバージョンのファイルを置いておきます。<br />
				<a href="http://ore.saizensen.net/wp-content/uploads/2009/11/courier-authlib-0.60.2.tar.bz2">http://ore.saizensen.net/wp-content/uploads/2009/11/courier-authlib-0.60.2.tar.bz2</a></p>
				<p>古いバージョンのを使う以外にどうしたらいいんでしょうか・・・vchkpw認証をやめて他の方法にしますかねぇ。</p>
]]></content:encoded>
			<wfw:commentRss>http://ore.saizensen.net/archives/467/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[CentOS]Unisonをインストールして同期バックアップする。[Unison]</title>
		<link>http://ore.saizensen.net/archives/239</link>
		<comments>http://ore.saizensen.net/archives/239#comments</comments>
		<pubDate>Tue, 28 Jul 2009 17:20:01 +0000</pubDate>
		<dc:creator>bubbkis</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[インストールメモ]]></category>
		<category><![CDATA[バックアップ]]></category>

		<guid isPermaLink="false">http://ore.saizensen.net/?p=239</guid>
		<description><![CDATA[				土曜日に1TBのHDを買って来たのでCentOSサーバー(ore.saizensen.net)へ追加するとです。
				今、付いてる古いHDをバックアップ専用として同期バックアップを行うとです。
				
		 [...]]]></description>
			<content:encoded><![CDATA[				<p>土曜日に1TBのHDを買って来たのでCentOSサーバー(ore.saizensen.net)へ追加するとです。<br />
				今、付いてる古いHDをバックアップ専用として同期バックアップを行うとです。</p>
				<ol>
				<li>Yumで<strong>unison</strong>をインストール。
				<pre># yum -y install unison</pre>
</li>
<li>同期設定をつくる。
<pre># vi /root/unison.sh</pre>
				<pre>
#!/bin/bash

LANG=C

unison /backup /storage_1/backup -batch -owner -group -force /backup -fastcheck false
unison /storage_2/develop /storage_1/develop -batch -owner -group -force /storage_2/develop -fastcheck false
</pre>
				<p>こんな感じ。<br />
				一番上の例だと、<strong>/storage_2/develop</strong> を <strong>/storage_1/develop</strong> へ同期します。<br />
				また同期先（この例だと<strong>/storage_1/develop</strong>）のdevelopディレクトリは先に作成しておきます。<br />
				※以下オプション詳細↓<br />
				-batch:バッチ処理します。何も聞かれずに最後まで終了します。<br />
				-owner:オーナー情報も同期します。<br />
				-group:グループ情報も同期します。<br />
				-force xxx:指定したディレクトリを基準にして同期します。ミラーリングのような動作です。<br />
				-fastcheck {true,false,defalut}:trueの場合、ファイルの日付で比較します。unixの場合のデフォルトの動作です。心配ならばfalseでチェックしましょう。</p>
				<pre># chmod 700 /root/unison.sh</pre>
</li>
<li>cronへ登録。
<pre>#crontab -e</pre>
				<pre>00 05 * * * /root/unison.sh</pre>
</li>
</ol>
<p>おわり。<br />
そういや、iphone3GS買いました。発売日の次の日に。<br />
macbookのUSキーボードモデルは買ってもらいました。月曜、うちの社長に。</p>
<p>なにしよーかなーなにしよーかなー</p>
]]></content:encoded>
			<wfw:commentRss>http://ore.saizensen.net/archives/239/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[CentOS]PostfixでSubmissionポート(587番)を使う。[Postfix]</title>
		<link>http://ore.saizensen.net/archives/172</link>
		<comments>http://ore.saizensen.net/archives/172#comments</comments>
		<pubDate>Fri, 28 Nov 2008 04:44:30 +0000</pubDate>
		<dc:creator>bubbkis</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Postfix]]></category>
		<category><![CDATA[UNIX]]></category>

		<guid isPermaLink="false">http://ore.saizensen.net/?p=172</guid>
		<description><![CDATA[				先日のエントリー[CentOS]いつの間にかCentOS4.7サーバーからGmailへメール送信出来なくなってた。[Postfix]で、
				OP25B対策にIPマスカレード対応ルーターで、ルーター外側のポー [...]]]></description>
			<content:encoded><![CDATA[				<p>先日のエントリー<a href="http://ore.saizensen.net/archives/155">[CentOS]いつの間にかCentOS4.7サーバーからGmailへメール送信出来なくなってた。[Postfix]</a>で、<br />
				<strong>OP25B対策</strong>にIPマスカレード対応ルーターで、ルーター外側のポート587を、ルーター内側のポート25に対応させるってっ書いて、一部のサーバーのルーターに設定したのですが全くポートが開かず・・・って感じでハマッってしまった。<br />
				そのルーターが<a href="http://www.mrl.co.jp/product/nwgopt100e.htm">NetGenesis SuperOPT100E</a>なのですが、よく商品詳細ページを見ていると「<strong>静的IPマスカレード対応</strong>」って書いてある・・・・・ポート変換出来んのかい！！</p>
				<p>ということで、587番→25番へポート変換はやめて、587番→587番とそのままで<strong>Postfix側でSubmissionポート(587番)を対応させる</strong>ことにします。</p>
				<ul>
				<li># vi /etc/postfix/master.cf<br />
				以下の行のコメントアウトを外して有効にする。</p>
				<pre>
submission inet n - n - - smtpd
</pre>
				</li>
				<li>/etc/services に以下の行があるか確認。
				<pre>
submission 587/tcp msa # mail message submission
submission 587/udp msa # mail message submission
</pre>
				</li>
				<li>ルーターのIPマスカレード設定（ポート変換）でTCP587→TCP587を開ける。</li>
				<li>iptablesのTCP587ポートも開ける。
				<pre>iptables -A INPUT -p tcp --dport 587 -j ACCEPT</pre>
</li>
</ul>
<p>これで、PostfixがSubmissionポート(587番)で待ち受け開始します。</p>
]]></content:encoded>
			<wfw:commentRss>http://ore.saizensen.net/archives/172/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>[CentOS]CentOS5の「PHP、MySQL、PostgreSQL」のバージョンをYumでアップデートする。</title>
		<link>http://ore.saizensen.net/archives/163</link>
		<comments>http://ore.saizensen.net/archives/163#comments</comments>
		<pubDate>Wed, 26 Nov 2008 16:45:39 +0000</pubDate>
		<dc:creator>bubbkis</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[DB]]></category>
		<category><![CDATA[Lang]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PostGIS]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[インストールメモ]]></category>

		<guid isPermaLink="false">http://ore.saizensen.net/?p=163</guid>
		<description><![CDATA[				なんかサーバーを弄ってたら、PHPとかMySQLとかPostgresのバージョンを無性に上げたくなってきたからバージョンアップした。全部、自前でbuildなんてやってられんので全てYumで管理します。
				C [...]]]></description>
			<content:encoded><![CDATA[				<p>なんかサーバーを弄ってたら、PHPとかMySQLとかPostgresのバージョンを無性に上げたくなってきたからバージョンアップした。全部、自前でbuildなんてやってられんので全てYumで管理します。<br />
				CentOSのリポジトリのPHPなんて5.1.6とかPostgresが8.1とか・・・ねぇ？って感じだったのでつい・・・<br />
				ということでインストールメモ開始。このブログ、インストールメモ専門になってきたな・・・</p>
				<ol>
				<li>まず標準のCentOSのリポジトリからPHP、MySQL、PostgreSQLを除外する.。
				<pre>
# vi /etc/yum.repos.d/CentOS-Base.repo
[base] ## [base]の項目に↓を追加
exclude=postgresql* php* mysql*
[updates] ## [updates]の項目にも↓を追加
exclude=postgresql* php* mysql*
</pre>
				</li>
				<li>PHPとMySQLをアップデートする用にまずリポジトリ追加。
				<pre>
# rpm --import http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
# vi /etc/yum.repos.d/utterramblings.repo ## ←のファイル作って以下の内容で保存。
[utterramblings]
name=Jason's Utter Ramblings Repo
baseurl=http://www.jasonlitka.com/media/EL$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
</pre>
				</li>
				<li>PostgreSQLをアップデートする用にやっぱりまずはリポジトリ追加。
				<pre>
# wget http://yum.pgsqlrpms.org/reporpms/8.3/pgdg-centos-8.3-5.noarch.rpm
# rpm -ivh pgdg-centos-8.3-5.noarch.rpm
</pre>
				</li>
				<li>PHPとMySQLとPostgreSQLをアップデート。
				<pre>
# yum update
</pre>
				<ul>
				<li><strong>※ x86_64な環境の人で、既にMySQLをインストールしている人は一度削除してからインストールしなおしてください。(mysql、mysql-devel、mysql-server)</strong>
				<pre>
# yum -y remove mysql mysql-devel mysql-server
# yum -y install mysql mysql-devel mysql-server
</pre>
				</li>
				<li><strong>※ 既にPostgreSQLをインストール済の人で「古いバージョンの〜〜〜アップグレードする必要があります。」と言われた場合</strong>
				<ol>
				<li>dataを削除、またはリネーム
				<pre># mv /var/lib/pgsql/data /var/lib/pgsql/data.old</pre>
</li>
<li>DB初期化
<pre># /etc/init.d/postgresql initdb</pre>
				</li>
				<li>PostgreSQL再起動
				<pre># /etc/init.d/postgresql restart</pre>
</li>
</ol>
</li>
</ul>
</li>
<li>リポジトリ追加したらyumでXcacheとかPostGISがインストールできるようになってたからインストールした。
<pre># yum -y install php-xcache postgis</pre>
				</li>
				</ol>
				<p>各設定は以下を参考に。Ubuntu用に書いたけどほとんどいっしょなので。</p>
				<ul>
				<li><a href="http://ore.saizensen.net/archives/122">[Ubuntu]Ubuntu8.10へApache、PHP、MySQL、PostgreSQLをインストールする。[LAMP]</a></li>
				<p>php.ini ： /etc/php.ini<br />
				my.cnf ： /etc/my.cnf<br />
				postgresql.conf ： /var/lib/pgsql/data/postgresql.conf<br />
				pg_hba.conf ： /var/lib/pgsql/data/pg_hba.conf</p>
				<li><a href="http://ore.saizensen.net/archives/113">[PHP]CentOSへXCacheをインストールしたメモ。[XCache]</a><br />
				xcache.ini ： /etc/php.d/xcache.ini
				</li>
				<li><a href="http://ore.saizensen.net/archives/160">[Ubuntu]Ubuntu8.10でPostGISを使えるようにする。[PostGIS]</a><br />
				lwpostgis.sql ： /usr/share/pgsql/contrib/lwpostgis.sql<br />
				spatial_ref_sys.sql ： /usr/share/pgsql/contrib/spatial_ref_sys.sql
				</li>
				</ul>
]]></content:encoded>
			<wfw:commentRss>http://ore.saizensen.net/archives/163/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[CentOS]いつの間にかCentOS4.7サーバーからGmailへメール送信出来なくなってた。[Postfix]</title>
		<link>http://ore.saizensen.net/archives/155</link>
		<comments>http://ore.saizensen.net/archives/155#comments</comments>
		<pubDate>Wed, 26 Nov 2008 03:01:58 +0000</pubDate>
		<dc:creator>bubbkis</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Postfix]]></category>
		<category><![CDATA[UNIX]]></category>

		<guid isPermaLink="false">http://ore.saizensen.net/?p=155</guid>
		<description><![CDATA[				昨日、社内に置いているCentOS4.7サーバーから自分のGmailへメール送信してみたら、Undelivered Mail Returned to Senderってメーラーデーモンさんがリターンメール返してきた [...]]]></description>
			<content:encoded><![CDATA[				<p>昨日、社内に置いているCentOS4.7サーバーから自分のGmailへメール送信してみたら、<strong>Undelivered Mail Returned to Sender</strong>ってメーラーデーモンさんがリターンメール返してきた。↓中身。</p>
				<pre>
＜bubbkis ＠ gmail.com＞: host gmail-smtp-in.l.google.com[209.85.143.114] said:
    550-5.7.1 [**.**.**.**] The IP you're using to send mail is not
    authorized 550-5.7.1 to send email directly to our servers. Please use the
    SMTP 550-5.7.1 relay at your service provider instead. Learn more at
    550 5.7.1 http://mail.google.com/support/bin/answer.py?answer=10336
    i6si3435826tid.5 (in reply to end of DATA command)
</pre>
				<p>英語よくわからんけど、「メール送るときはプロバイダーのSMTP使って送ってこい、カス。」と言っとるわけですね。<br />
				はい、分かりましたということで今回は、<br />
				<strong>PostfixのRelayhost設定にプロバイダーのSMTPを指定して、メール送信は全部プロバイダーのSMTP経由で送信する</strong>というメモです。(当方のプロバイダーはアサヒネットなので、アサヒネットじゃない人は適当に変えて下さい。)<br />
				ついでに社外からこのSMTPサーバーを使うときにOP25Bに引っかかる人がいるのでOP25B対策もしました。（IPマスカレード対応ルーターで、ルーター外側のポート587を、ルーター内側のポート25に対応させただけですけど。)</p>
				<ol>
				<li># vi/etc/postfix/main.cf
				<pre>
## relayhostへプロバイダーのSMTPサーバーを指定。
relayhost = [op25b.asahi-net.or.jp]

## SMTP Submission port Setting
## ファイルの最後に追加
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/authinfo
smtp_sasl_security_options = noanonymous
smtp_sasl_mechanism_filter = cram-md5,digest-md5,plain,login
</pre>
				<p>smtp_sasl_mechanism_filter = へ設定する値の調べ方は、</p>
				<pre>
# telnet プロバイダのSMTPサーバー名 25 または 587
Trying 202.224.39.196...
Connected to mail.asahi-net.or.jp (202.224.39.196).
Escape character is '^]'.
220 mail.asahi-net.or.jp ESMTP Postfix
ehlo localhost ## ←タイプする。
250-mail.asahi-net.or.jp
250-PIPELINING
250-SIZE
250-ETRN
250-AUTH PLAIN LOGIN DIGEST-MD5 CRAM-MD5
250-AUTH=PLAIN LOGIN DIGEST-MD5 CRAM-MD5 ## ←これをsmtp_sasl_mechanism_filterへ設定する。
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
quit ## ←タイプする。
221 2.0.0 Bye
Connection closed by foreign host.
</pre>
				</li>
				<li># vi /etc/postfix/master.cf
				<pre>
## 以下の3行のコメントアウトを外す。
submission inet n      -       n       -       -       smtpd
        -o smtpd_etrn_restrictions=reject
        -o smtpd_client_restrictions=permit_sasl_authenticated,reject
</pre>
				</li>
				<li>プロバイダーのSMTPサーバーへの認証情報を設定する。(ユーザー名、パスワードはプロバイダー契約時に設定したもの。)
				<pre>
# echo [SMTPサーバー名]:587 ユーザー名:パスワード > /etc/postfix/authinfo
# postmap /etc/postfix/authinfo
</pre>
				<p>どこかのサイトで
				<pre># chmod 640 /etc/postfix/authinfo</pre>
<p>ってroot以外参照できないようにパーミッション変更してたのを真似たら、一切ログイン出来なくなってしまってハマった。
</li>
<li># /etc/rc.d/init.d/postfix reload でPostfix設定反映</li>
</ol>
<p>以上で、メール送信はプロバイダーのSMTPサーバー経由になりました。</p>
]]></content:encoded>
			<wfw:commentRss>http://ore.saizensen.net/archives/155/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>[PHP]CentOSへXCacheをインストールしたメモ。[XCache]</title>
		<link>http://ore.saizensen.net/archives/113</link>
		<comments>http://ore.saizensen.net/archives/113#comments</comments>
		<pubDate>Fri, 07 Nov 2008 06:24:39 +0000</pubDate>
		<dc:creator>bubbkis</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[インストールメモ]]></category>

		<guid isPermaLink="false">http://ore.saizensen.net/?p=113</guid>
		<description><![CDATA[				またインストールメモ。今後、サーバーを作る時用の自分用メモばっか書いてますな、最近。
				ということで、CentOS5.2へXCacheをインストールしました。
				
				phpizeの為に、php- [...]]]></description>
			<content:encoded><![CDATA[				<p>またインストールメモ。今後、サーバーを作る時用の自分用メモばっか書いてますな、最近。<br />
				ということで、<strong>CentOS5.2</strong>へ<a href="http://xcache.lighttpd.net/">XCache</a>をインストールしました。</p>
				<ol>
				<li>phpizeの為に、php-deveをインストール。
				<pre># yum -y install php-devel</pre>
</li>
<li><strong>Xcache</strong>の取得 &#038;&#038; インストール。
<pre>
# cd /usr/local/src
# wget http://xcache.lighttpd.net/pub/Releases/1.2.2/xcache-1.2.2.tar.gz
# tar zxvf xcache-1.2.2.tar.gz
# cd xcache-1.2.2
# phpize
# ./configure --enable-xcache --enable-xcache-coverager
# make
# make test
# make install
</pre>
				<p>インストール後、表示されるパスをメモしておく。↓みたいな。</p>
				<pre>
Installing shared extensions: /usr/lib64/php/modules/
</pre>
				</li>
				<li><strong>XCache</strong>のWebインタフェースを公開ディレクトリへコピー。
				<pre>
# cp -R admin /var/www/html/
# cp -R coverager /var/www/html/
# mv /var/www/html/admin /var/www/html/xcache
</pre>
				</li>
				<li><strong>XCache</strong>の設定。
				<pre>
# mkdir /tmp/pcov
# chown apache.apache /tmp/pcov ##←Apache実行ユーザーへ
# cat xcache.ini >> /etc/php.ini
# cat /proc/cpuinfo | grep -c processor ##←表示された数値をメモ。
# echo "< ?php echo md5('pass'); ?>" | php ##←表示された文字列をメモ。
# vi /etc/php.ini
</pre>
				<p>以下、/etc/php.ini の<strong>XCache</strong>設定内容。</p>
				<ul>
				<li>zend_extension = インストール後表示されたパスを指定。</li>
				<li>xcache.count = # cat /proc/cpuinfo | grep -c processor で表示された数値。</li>
				<li>xcache.admin.user = &#8220;hoge&#8221; # 適当なユーザーを指定。</li>
				<li>xcache.admin.pass = # echo &#8220;< ?php echo md5('pass'); ?>&#8221; | php で表示された文字列。</li>
				</ul>
				<pre>
[xcache-common]
;; install as zend extension (recommended), normally "$extension_dir/xcache.so"
;zend_extension = /usr/local/lib/php/extensions/non-debug-non-zts-xxx/xcache.so
zend_extension = /usr/lib64/php/modules/xcache.so
; zend_extension_ts = /usr/local/lib/php/extensions/non-debug-zts-xxx/xcache.so
;; For windows users, replace xcache.so with php_xcache.dll
;zend_extension_ts = c:/php/extensions/php_xcache.dll
;; or install as extension, make sure your extension_dir setting is correct
; extension = xcache.so
;; or win32:
; extension = php_xcache.dll

[xcache.admin]
xcache.admin.enable_auth = On
xcache.admin.user = "hoge"
; xcache.admin.pass = md5($your_password)
xcache.admin.pass = "******************************"

[xcache]
; ini only settings, all the values here is default unless explained

; select low level shm/allocator scheme implemenation
xcache.shm_scheme =        "mmap"
; to disable: xcache.size=0
; to enable : xcache.size=64M etc (any size > 0) and your system mmap allows
xcache.size  =                64M
; set to cpu count (cat /proc/cpuinfo |grep -c processor)
xcache.count =                 1
; just a hash hints, you can always store count(items) > slots
xcache.slots =                8K
; ttl of the cache item, 0=forever
xcache.ttl   =                 0
; interval of gc scanning expired items, 0=no scan, other values is in seconds
xcache.gc_interval =           0

; same as aboves but for variable cache
xcache.var_size  =            8M
xcache.var_count =             1
xcache.var_slots =            8K
; default ttl
xcache.var_ttl   =           600
xcache.var_maxttl   =       3600
xcache.var_gc_interval =     300

xcache.test =                Off
; N/A for /dev/zero
xcache.readonly_protection = Off
; for *nix, xcache.mmap_path is a file path, not directory.
; Use something like "/tmp/xcache" if you want to turn on ReadonlyProtection
; 2 group of php won't share the same /tmp/xcache
; for win32, xcache.mmap_path=anonymous map name, not file path
xcache.mmap_path =    "/tmp/xcache"

; leave it blank(disabled) or "/tmp/phpcore/"
; make sure it's writable by php (without checking open_basedir)
xcache.coredump_directory =   ""

; per request settings
xcache.cacher =               On
xcache.stat   =               On
xcache.optimizer =           Off

[xcache.coverager]
; per request settings
; enable coverage data collecting for xcache.coveragedump_directory and xcache_coverager_start/stop/get/clean() functions (will hurt executing performance)
xcache.coverager =          On

; ini only settings
; make sure it's readable (care open_basedir) by coverage viewer script
; requires xcache.coverager=On
xcache.coveragedump_directory = "/tmp/pcov"
</pre>
				</li>
				<li>Apacheを再起動。
				<pre># /etc/rc.d/init.d/httpd restart</pre>
</li>
<li>/var/www/html/coveragerディレクトリへ.htaccessを設置。↓内容。
<pre>
AuthUserFile /etc/httpd/conf/.htpasswd
AuthGroupFile /dev/null
AuthName "XCache Coverage Viewer"
AuthType Basic
#require valid-user
require user hoge
</pre>
				</li>
				</ol>
				<p>以上。</p>
]]></content:encoded>
			<wfw:commentRss>http://ore.saizensen.net/archives/113/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[CentOS]Apacheアクセスログ解析にVisitorsをインストールしたメモ。[Apache]</title>
		<link>http://ore.saizensen.net/archives/111</link>
		<comments>http://ore.saizensen.net/archives/111#comments</comments>
		<pubDate>Fri, 07 Nov 2008 03:36:25 +0000</pubDate>
		<dc:creator>bubbkis</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[インストールメモ]]></category>

		<guid isPermaLink="false">http://ore.saizensen.net/?p=111</guid>
		<description><![CDATA[				このore.saizensen.netでも使ってきてたApacheアクセスログ解析ソフト「Visitors」を別のサーバーにもインストールしたので、ここにメモ書き程度に残しておきます。
				グラフ化しても、た [...]]]></description>
			<content:encoded><![CDATA[				<p>この<a href="http://ore.saizensen.net">ore.saizensen.net</a>でも使ってきてたApacheアクセスログ解析ソフト「<a href="http://www.hping.org/visitors/index_jp.php">Visitors</a>」を別のサーバーにもインストールしたので、ここにメモ書き程度に残しておきます。<br />
				グラフ化しても、たいして見ないのでgraphvizはインストールしません、私は。</p>
				<ol>
				<li>日本語対応の為に、<strong>nkf</strong>をインストール。
				<pre># yum -y install nkf</pre>
</li>
<li><strong>Visitors</strong>の取得 &#038;&#038; インストール。
<pre>
# cd /usr/local/src
# wget http://www.hping.org/visitors/visitors-0.7.tar.gz
# tar zxvf visitors-0.7.tar.gz
# cd visitors_0.7
# make
# cp visitors /usr/bin/
# cd
</pre>
				</li>
				<li>アクセスログ解析結果出力ティレクトリ作成。
				<pre>
# mkdir /var/www/html/log
# chown hoge.hoge /var/www/html/log
</pre>
				</li>
				<li>アクセスログ解析スクリプト作成。
				<pre>
# vi accesslog.sh
#!/bin/bash

# ユーザーネームを記載
username=hoge
# アクセス解析用ディレクトリを記載
addlog=/var/www/html/log/
# このスクリプトのログファイル名を記載
logfile=/var/log/logsearch.log

function logsearch
{
date '+%Y/%m/%d(%a) %T'
for a in `find /var/log/httpd/* -mtime -2`
do
log=`basename $a`
  visitors -A -m 30000 $a -o html > $addlog$log
  nkf -w -m0 $addlog$log > $addlog$log.html
  rm -f $addlog$log
done
}
logsearch >> $logfile 2>&#038;1
echo "" >> $logfile; echo "" >> $logfile;
chown -R $username:$username $addlog
</pre>
				</li>
				<li>作成したaccesslog.shを実行 &#038;&#038; cronへ。
				<pre>
# chmod +x accesslog.sh
# ./accesslog.sh
# mv accesslog.sh /etc/cron.daily/
</pre>
				</li>
				<li>アクセスログ公開ティレクトリへ.htaccess設置。↓中身。
				<pre>
Options Indexes Includes ExecCGI FollowSymLinks MultiViews
AuthUserFile /etc/httpd/conf/.htpasswd
AuthGroupFile /dev/null
AuthName "Apache Logs"
AuthType Basic
require user hoge
</pre>
				</li>
				</ol>
				<p>終了です。hogeって書いてる所は適当に直してね。</p>
]]></content:encoded>
			<wfw:commentRss>http://ore.saizensen.net/archives/111/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[CentOS]CentOS5.2サーバーにTorrentflux-b4rtをインストールした。[BitTorrent]</title>
		<link>http://ore.saizensen.net/archives/108</link>
		<comments>http://ore.saizensen.net/archives/108#comments</comments>
		<pubDate>Thu, 06 Nov 2008 04:17:57 +0000</pubDate>
		<dc:creator>bubbkis</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[BitTorrent]]></category>
		<category><![CDATA[インストールメモ]]></category>

		<guid isPermaLink="false">http://ore.saizensen.net/?p=108</guid>
		<description><![CDATA[				家のCentOS5.2サーバーにTorrentflux-b4rtをインストールして、サーバー上にBitTorrentWEBクライアントを設置しました。
				動作環境は、
				
				A Unix lik [...]]]></description>
			<content:encoded><![CDATA[				<p>家の<strong>CentOS5.2</strong>サーバーに<strong>Torrentflux-b4rt</strong>をインストールして、サーバー上に<strong>BitTorrentWEBクライアント</strong>を設置しました。<br />
				動作環境は、</p>
				<ul>
				<li>A Unix like OS (Win32 not supported) &#8211; current tested OSs include:
				<ul>
				<li>Linux: Debian, Ubuntu, Gentoo, RedHat, Fedora, NSLU2, ClarkConnect &#8211; amongst others!</li>
				<li>BSD: FreeBSD, OpenBSD, NetBSD</li>
				<li>Apple: Mac OS X</li>
				</ul>
				</li>
				<li>A Web Server &#8211; any Unix like webserver that supports PHP should work.  Current supported/tested:
				<ul>
				<li><a href="http://httpd.apache.org" title="Apache HTTP Server" target="_blank">Apache</a></li>
				<li><a href="http://www.lighttpd.net" title="LightTPD" target="_blank">LightTPD</a></li>
				</ul>
				</li>
				<li>An SQL-Database &#8211; current supported db types are:
				<ul>
				<li><a href="http://www.mysql.com" title="MySQL" target="_blank">MySQL</a></li>
				<li><a href="http://www.sqlite.org" title="SQLite" target="_blank">SQLite</a></li>
				<li><a href="http://www.postgresql.org" title="PostgreSQL" target="_blank">PostgreSQL</a></li>
				</ul>
				</li>
				<li><a href="http://www.php.net" title="PHP" target="_blank">PHP</a> 4.3.x or higher.</li>
				<li><a href="http://www.python.org" title="Python" target="_blank">Python</a> 2.2 or higher.</li>
				<li><a href="http://www.perl.org" title="Perl" target="_blank">Perl</a> 5.6 or higher (for the optional fluxd daemon).</li>
				</ul>
				<p>と、なっとります。<br />
				その時のインストールメモ。</p>
				<ol>
				<li>CentOSサーバー上にApache(or Lighttpd)、MySQL(or SQLite or PostgreSQL)、PHPなLAMP環境を整えておきます。今回は既にLAMP環境は構築済ですので省略。PythonもPerlもyumでインストール済。</li>
				<li>
				<ul>
				<li>Torrentflux-b4rtを取って来る。</li>
				<li>展開。</li>
				<li>webrootディレクトリへ移動。</li>
				<li>所有者変更。Apacheユーザーへ</li>
				<li>ダウンロードディレクトリ作成し、Apacheユーザーが書き込めるようにPermission変更。今回はSambaの共有ディレクトリ内へ作りました。</li>
				</ul>
				<pre>
[root@centos ~]# cd /usr/local/src
[root@centos ~]# wget http://download.berlios.de/tf-b4rt/torrentflux-b4rt_1.0-beta2.tar.bz2
[root@centos ~]# tar xjvf torrentflux-b4rt_1.0-beta2.tar.bz2
[root@centos ~]# mv torrentflux-b4rt_1.0-beta2 /var/www/html/torrrentflux
[root@centos ~]# chown -R apache.apache /var/www/html/torrentflux
[root@centos ~]# mkdir /storage_1/downloads
[root@centos ~]# chown -R nobody.nobody /storage_1/downloads
[root@centos ~]# chmod -R 777 /storage_1/downloads
[root@centos ~]# cd
</pre>
				</li>
				<li>ブラウザでsetup.phpへアクセスして指示通りにTorrentfluxのインストール。<br />この時、私の場合だとcksfv、vlc、uudeviewが無いと表示されていたのでyumでインストール。<br />あと、本体のBitTorrentクライアントをインストール。デフォルトのBitTornadoと無いよと表示されていたTransmission。<br />TransmissionはTorrentflux-b4rtのアーカイブ内にTransmission-1.06のパッチファイルが収録されているので、それを使用してインストール。
				<pre>
[root@centos ~]# yum --enablerepo=rpmforge install cksfv
[root@centos ~]# yum --enablerepo=rpmforge install vlc
[root@centos ~]# yum --enablerepo=rpmforge install uudeview
[root@centos ~]# cd /usr/local/src
[root@centos ~]# wget http://download.m0k.org/transmission/files/transmission-1.06.tar.bz2
[root@centos ~]# tar jxvf transmission-1.06.tar.bz2
[root@centos ~]# cd transmission-1.06
[root@centos ~]# tar jxvf /var/www/html/torrentflux/clients/transmission/Transmission-1.06_tfCLI-svn3356.tar.bz2
[root@centos ~]# cp -R /var/www/html/torrentflux/clients/transmission/Transmission-1.06_tfCLI-svn3356/cli ./
[root@centos ~]# ./configure
[root@centos ~]# make
[root@centos ~]# make install
[root@centos ~]# cd /usr/local/src
[root@centos ~]# wget http://download2.bittornado.com/download/BitTornado-0.3.18.tar.gz
[root@centos ~]# tar zxvf BitTornado-0.3.18.tar.gz
[root@centos ~]# cd BitTornado-CVS
[root@centos ~]# python setup.py install
[root@centos ~]# cd
</pre>
				</li>
				<li>iptablesのTCP49160:49300ポートを開ける。</li>
				<li>torrentfluxディレクトリに.htaccessを設置してアクセス制限を掛ける。</li>
				</ol>
				<p>以上です。これでいつでもブラウザ上からtorrentを使ってダウンロード出来るようになりました。</p>
]]></content:encoded>
			<wfw:commentRss>http://ore.saizensen.net/archives/108/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>[CentOS]CentOSへ3ware 9650SE-2LPを差してRAID環境作りましたよ。[RAID]</title>
		<link>http://ore.saizensen.net/archives/106</link>
		<comments>http://ore.saizensen.net/archives/106#comments</comments>
		<pubDate>Wed, 05 Nov 2008 06:11:22 +0000</pubDate>
		<dc:creator>bubbkis</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[RAID]]></category>
		<category><![CDATA[インストールメモ]]></category>

		<guid isPermaLink="false">http://ore.saizensen.net/?p=106</guid>
		<description><![CDATA[				タイトル通り、CentOS5.2-64bit版へ3ware 9650SE-2LPを差してRAID環境作りました。その時のメモ。
				まず用意したのが3ware 9650SE-2LPというRAIDカード。
		 [...]]]></description>
			<content:encoded><![CDATA[				<p>タイトル通り、<strong>CentOS5.2-64bit版</strong>へ<strong>3ware 9650SE-2LP</strong>を差して<strong>RAID環境</strong>作りました。その時のメモ。<br />
				まず用意したのが<a href="http://japan.3ware.com/products/serial_ata2-9650.asp">3ware 9650SE-2LP</a>というRAIDカード。<br />
				お金無いから、RAID0かRAID1のみ可能な2portカードです。とりあえずRAID1のミラーリングが目的だからこれでいいんです。<br />
				で、以下作業。</p>
				<ol>
				<li>まず3wareから<a href="http://www.3ware.com/download/Escalade9690SA-Series/9.5.1/driver-redhat-el5_u2-9.5.1.tgz">最新のドライバー</a>を取ってくる。CentOS5だからRedHatEL5用のを。</li>
				<li>取ってきたファイルを展開する。中にdriverとinstalldiskの２種、x86用とx86_64用のアーキテクチャ別にアーカイブされているので、今回はCentOSの64bitを新規インストールするのでinstalldisk-x86_64を選んでさらに展開する。展開された中身を全部フロッピーへ突っ込む。</li>
				<li>RAIDカードをサーバーへ取り付けSATAのHD２台へケーブル接続。この時、別に取り付けてたHDを床に落としてしまいIOエラーでご臨終してしまいました・・・</li>
				<li>サーバー本体の電源投入し、3wareのBIOS画面になったらAlt-3キーで設定画面へ。マニュアル通り設定すれば簡単なので詳細はめんどいので除きます。マニュアル無くても設定できるくらいです。とまぁRAIDユニットの作成を完了させます。</li>
				<li>CentOSのインストールディスクとさっき作ったRAIDカードのおドライバーフロッピーを入れ、インストール開始画面になったら
				<pre>linux dd</pre>
<p>で起動する。すると、「何かハードウェアのドライバーディスク持ってるか？」と聞いてくるので「YES」を選んでドライバーをロードする。この時、正常にロードすると
<pre>Loading 3w-9xxx driver</pre>
				<p>と表示される。ここでどっぷりとハマってしまいましたんですけどね。最初、CentOS5.0のインストールディスクを使っていたら、<strong>Loading 3w-9xxx driver</strong>と全く表示されませんでした。表示されないけどロードしてそうな雰囲気だったので、そのまま作業進めてHD選択画面まで進むとHDが無いみたいなループを約１日続けてました。試しにCentOS5.2のインストールティスクを落とし直して、同作業をするとあっさり終わりましたよと・・・</li>
				<li>あとは、普通にOSのインストールをして完了です。</li>
				</ol>
				<p>インストール完了後、試しにHD１台抜いて電源投入してOS起動させたり、別のHDを取り付けてRAIDユニットの再構築してみたりと弄くってました。現在、全く問題無く動いてます。</p>
]]></content:encoded>
			<wfw:commentRss>http://ore.saizensen.net/archives/106/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[CentOS4.7]CentOS4.7でKernel panicが起こる件。[Bug]</title>
		<link>http://ore.saizensen.net/archives/93</link>
		<comments>http://ore.saizensen.net/archives/93#comments</comments>
		<pubDate>Tue, 14 Oct 2008 02:00:10 +0000</pubDate>
		<dc:creator>bubbkis</dc:creator>
				<category><![CDATA[CentOS]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[Bug]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[Kernel panic]]></category>

		<guid isPermaLink="false">http://ore.saizensen.net/archives/93</guid>
		<description><![CDATA[				社内サーバーにCentOS4.7(kernel-2.6.9-78.0.1)を置いているのですが、頻繁にKernel panicを起こすようになりました。
				・/var/log/messages 抜粋
			 [...]]]></description>
			<content:encoded><![CDATA[				<p>社内サーバーに<strong>CentOS4.7(kernel-2.6.9-78.0.1)</strong>を置いているのですが、頻繁に<strong>Kernel panic</strong>を起こすようになりました。<br />
				・/var/log/messages 抜粋</p>
				<pre>
Oct 14 10:03:45 centos iptables:  succeeded
Oct 14 10:03:45 centos iptables:  succeeded
Oct 14 10:03:45 centos kernel: Unable to handle kernel paging request at virtual address e09a8168
Oct 14 10:03:45 centos kernel:  printing eip:
Oct 14 10:03:45 centos kernel: c02d4877
Oct 14 10:03:45 centos kernel: *pde = 014ee067
Oct 14 10:03:45 centos kernel: Oops: 0000 [#1]
Oct 14 10:03:45 centos kernel: Modules linked in: loop vga16fb vgastate md5 ipv6 parport_pc lp parport autofs4 tun sunrpc ip_conntrack cpufreq_powersave button battery ac uhci_hcd ehci_hcd i3000_edac edac_mc tg3 dm_snapshot dm_zero dm_mirror ext3 jbd dm_mod ata_piix libata sd_mod scsi_mod
Oct 14 10:03:45 centos kernel: CPU:    0
Oct 14 10:03:45 centos kernel: EIP:    0060:[<c02d4877>]    Not tainted VLI
Oct 14 10:03:45 centos kernel: EFLAGS: 00010212   (2.6.9-78.0.1.EL)
Oct 14 10:03:45 centos kernel: EIP is at nf_unregister_sockopt+0x47/0x81
Oct 14 10:03:45 centos kernel: eax: 00000002   ebx: c03a2020   ecx: de650e80   edx: e09a8160
Oct 14 10:03:45 centos kernel: esi: e0af9380   edi: 00000000   ebp: c8f58000   esp: c8f58f5c
Oct 14 10:03:45 centos kernel: ds: 007b   es: 007b   ss: 0068
Oct 14 10:03:45 centos kernel: Process modprobe (pid: 20703, threadinfo=c8f58000 task=d3d78bd0)
Oct 14 10:03:45 centos kernel: Stack: 00000000 c037d800 e0af0732 e0af9880 c014030d 00000000 635f7069 746e6e6f
Oct 14 10:03:46 centos kernel:        6b636172 00000000 d3ec7b80 b7f85000 b7f86000 c01602d6 d3ec7b80 d406b954
Oct 14 10:03:46 centos kernel:        c016067b d406baf8 d3ec7b80 d3ec7bb0 00000000 c8f58000 089d4820 00000000
Oct 14 10:03:46 centos kernel: Call Trace:
Oct 14 10:03:46 centos kernel:  [<e0af0732>] init_or_cleanup+0x1e6/0x1ea [ip_conntrack]
Oct 14 10:03:46 centos kernel:  [<c014030d>] sys_delete_module+0x139/0x180
Oct 14 10:03:46 centos kernel:  [<c01602d6>] unmap_vma_list+0xe/0x17
Oct 14 10:03:46 centos kernel:  [<c016067b>] do_munmap+0x1a7/0x1b1
Oct 14 10:03:46 centos kernel:  [<c0327973>] syscall_call+0x7/0xb
Oct 14 10:03:46 centos kernel: Code: 17 05 00 89 d9 ff 0d 20 20 3a c0 0f 88 40 0d 00 00 8b 0d 48 20 3a c0 8b 01 0f 18 00 90 81 f9 48 20 3a c0 74 2f 8b 51 08 8b 46 08 &lt;39> 42 08 8b 11 75 1e 8b 41 04 89 42 04 89 10 89 c8 c7 01 00 01
Oct 14 10:03:46 centos kernel:  &lt;0>Fatal exception: panic in 5 seconds
</c0327973></c016067b></c01602d6></c014030d></e0af0732></c02d4877></pre>
				<p>取り敢えず、Google先生に聞いてみたらすぐ見つかりました。</p>
				<ul>
				<li><a href="https://bugzilla.redhat.com/show_bug.cgi?id=456664">Bug 456664 &#8211;  Kernel panic when unloading ip conntrack modules</a></li>
				<li><a href="http://bugs.centos.org/view.php?id=3131">0003131: kernel-2.6.9-78.0.1 panics when unloading iptables (via service iptables stop or shutdown)</a></li>
				</ul>
				<p>どうやら、<strong>kernel-2.6.9-78.0.1</strong> で<strong>iptables</strong>をstopやrestartさせると<strong>Kernel panic</strong>を起こすバグのようです。<br />
				<strong>kernel-2.6.9-78.13.EL</strong>ではバグも治っているようなので、<br />
				<a href="http://people.redhat.com/vgoyal/rhel4/RPMS.kernel/">http://people.redhat.com/vgoyal/rhel4/RPMS.kernel/</a><br />
				から<a href="http://people.redhat.com/vgoyal/rhel4/RPMS.kernel/kernel-2.6.9-78.13.EL.i686.rpm">kernel-2.6.9-78.13.EL.i686.rpm</a><br />
				を取ってきて手動で入れました。</p>
				<pre>
[root@centos ~]# cd /usr/local/src
[root@centos ~]# wget http://people.redhat.com/vgoyal/rhel4/RPMS.kernel/kernel-2.6.9-78.13.EL.i686.rpm
[root@centos ~]# rpm -ivh kernel-2.6.9-78.13.EL.i686.rpm
</pre>
				<p>で再起動して終了。</p>
				<p>もしくは、手動でkernelを入れたくないyumで全て管理したい人は、yumに最新のkernelが来るまで一つ古いkernelを使うというのもアリかと。以下、手順↓</p>
				<pre>
[root@centos ~]# vi /boot/grub/grub.conf
default=0
↓
default=1　←　2.6.9-67(私の環境では一つ古いkernelは2.6.9-67でした。)
</pre>
				<p>で再起動して完了。</p>
]]></content:encoded>
			<wfw:commentRss>http://ore.saizensen.net/archives/93/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
