<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
		xmlns:xhtml="http://www.w3.org/1999/xhtml"
>

<channel>
	<title>clicktx::Tech::Memo &#187; サーバ管理</title>
	<atom:link href="http://perl.no-tubo.net/category/%e3%82%b5%e3%83%bc%e3%83%90%e7%ae%a1%e7%90%86/feed/" rel="self" type="application/rss+xml" />
	<link>http://perl.no-tubo.net</link>
	<description>perl、 MySQL、オープンソース系、ウェブ系ネタ。なぜか鯖管メモがほとんどを占めている...</description>
	<lastBuildDate>Mon, 23 Jan 2012 10:51:51 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://perl.no-tubo.net/category/%e3%82%b5%e3%83%bc%e3%83%90%e7%ae%a1%e7%90%86/feed/" />
		<item>
		<title>CentOS5.5にZend Optimizerをインストール</title>
		<link>http://perl.no-tubo.net/2011/09/08/centos5-5%e3%81%abzend-optimizer%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab/</link>
		<comments>http://perl.no-tubo.net/2011/09/08/centos5-5%e3%81%abzend-optimizer%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 10:21:41 +0000</pubDate>
		<dc:creator>clicktx</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[インストールメモ]]></category>
		<category><![CDATA[Zend Optimizer]]></category>

		<guid isPermaLink="false">http://perl.no-tubo.net/?p=1939</guid>
		<description><![CDATA[Live Commerceを使うのにはZend Optimizerが必要なのでインストールする。
CentOS5.5(32bit)
PHP 5.2.16
ダウンロード
ダウンロード場所がわかりにくいので注意
※Zend  [...]]]></description>
			<content:encoded><![CDATA[<p>Live Commerceを使うのにはZend Optimizerが必要なのでインストールする。</p>
<p>CentOS5.5(32bit)<br />
PHP 5.2.16</p>
<h3>ダウンロード</h3>
<p>ダウンロード場所がわかりにくいので注意<br />
※Zend OptimizerをダウンロードするにはMyZendに登録する必要がある。<br />
<a href="http://www.zend.co.jp/">ゼンド・ジャパン株式会社</a></p>
<p>ダウンロード＞Zend Guard＞loader＞linux＞ZendOptimizer-3.x.x-linux-glibc23-xxx.tar.gz<br />
※ xの部分はPHPのバージョンやOSによって異なる<br />
当方の環境では ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz だった。</p>
<h3>設置</h3>
<p>ダウンロードしたファイルを解凍する。</p>
<pre>$ tar zxvf ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz</pre>
<p>PHPのバージョンに対応した ZendOptimizer.so を /usr/lib/php/modules へ設置する。<br />
※自分の環境では ZendOptimizer-3.3.9-linux-glibc23-i386/data/5_2_x_comp の中にあるものを使用。</p>
<pre>$ cd ZendOptimizer-3.3.9-linux-glibc23-i386/data/5_2_x_comp
$ sudo mv ZendOptimizer.so /usr/lib/php/modules</pre>
<h3>php.iniの設定</h3>
<pre># vi /etc/php.ini
追記
[Zend]
zend_extension=/usr/lib/php/modules/ZendOptimizer.so
zend_optimizer.optimization_level=15</pre>
<p>Apache再起動</p>
<pre># service httpd restart</pre>
<p>参考：</p>
<li><a href="http://sysdevnote.at.webry.info/201102/article_2.html">【環境構築３】PHPをインストールする のんき者のシステム開発ノート（ってかメモ）/ウェブリブログ </a></li>
<li><a href="http://linuxserver.jp/プログラミング/PHP/ZendOptimizerのインストール.php">Zend Optimizer のインストール | Linuxで自宅サーバ構築 </a></li>
]]></content:encoded>
			<wfw:commentRss>http://perl.no-tubo.net/2011/09/08/centos5-5%e3%81%abzend-optimizer%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://perl.no-tubo.net/2011/09/08/centos5-5%e3%81%abzend-optimizer%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab/" />
	</item>
		<item>
		<title>smtpサーバが迷惑メールサーバと思われないようにする</title>
		<link>http://perl.no-tubo.net/2011/06/30/smtp%e3%82%b5%e3%83%bc%e3%83%90%e3%81%8c%e8%bf%b7%e6%83%91%e3%83%a1%e3%83%bc%e3%83%ab%e3%82%b5%e3%83%bc%e3%83%90%e3%81%a8%e6%80%9d%e3%82%8f%e3%82%8c%e3%81%aa%e3%81%84%e3%82%88%e3%81%86%e3%81%ab/</link>
		<comments>http://perl.no-tubo.net/2011/06/30/smtp%e3%82%b5%e3%83%bc%e3%83%90%e3%81%8c%e8%bf%b7%e6%83%91%e3%83%a1%e3%83%bc%e3%83%ab%e3%82%b5%e3%83%bc%e3%83%90%e3%81%a8%e6%80%9d%e3%82%8f%e3%82%8c%e3%81%aa%e3%81%84%e3%82%88%e3%81%86%e3%81%ab/#comments</comments>
		<pubDate>Thu, 30 Jun 2011 04:47:56 +0000</pubDate>
		<dc:creator>clicktx</dc:creator>
				<category><![CDATA[postfix]]></category>
		<category><![CDATA[メールサーバ]]></category>
		<category><![CDATA[迷惑メール対策]]></category>

		<guid isPermaLink="false">http://perl.no-tubo.net/?p=1805</guid>
		<description><![CDATA[DNSの逆引き設定
今まで逆引き設定していなかったメールサーバから送ったメールには
Received: from sv.domain.com (sv.domain.com [127.0.0.1])
	by mail.do [...]]]></description>
			<content:encoded><![CDATA[<h3>DNSの逆引き設定</h3>
<p>今まで逆引き設定していなかったメールサーバから送ったメールには</p>
<pre>Received: from sv.domain.com (sv.domain.com [127.0.0.1])
	by mail.domain.com (Postfix) with SMTP id…</pre>
<p>のようなヘッダとなっていて、localhost(127.0.0.1)から送られたものだとされていた。</p>
<p>これが迷惑メールとされる一因なので、mail.domain.com はちゃんとしたサーバですよー、と知らせるためにグローバルなIPアドレスをあててあげる。</p>
<p>DNSの逆引きはドメインの管理とは関係ないので、回線業者が提供するサイトなりツールから設定。メールサーバのドメインが mail.domain.com、IPアドレスが111.222.33.4 の場合。<br />
111.222.33.4にmail.domain.comを割り当てる。</p>
<p>逆引きを設定すると</p>
<pre>Received: from 111.222.33.4  (EHLO maildomain.com) (111.222.33.4)
  by mta...</pre>
<p>のようなヘッダとなる。</p>
<p>Gmailではこれだけで迷惑メールと判断されなくなった。</p>
<h3>Yahooメールでの対策</h3>
<p>上記対応をして一時的に改善しても、１日程度経つと再び迷惑メールに振り分けられる場合がある。この場合はメールヘッダに X-YahooFilteredBulk: 111.222.33.4 等と入っている可能性があるので、Yahooに問い合わせる必要がある。</p>
<h4>オープンリレーを許可していないか確認する。</h4>
<p><a href="http://www.rbl.jp/svcheck.php">第三者中継チェック RBL.JP</a></p>
<p>全てが青い文字で no relays accepted. となればおｋ．</p>
<h4>Yahooに問い合わせ</h4>
<p><a href="http://help.yahoo.co.jp/help/jp/ymail/anti-spam/anti-spam-11.html">Yahoo!メール（ベータ版） ヘルプ &#8211; [迷惑メール]フォルダに振り分けられたくないメールがある</a><br />
へ行き、一番下の「解決しましたか？」でいいえを選択すると問い合わせフォームになるのでそこから問い合わせる。</p>
<p>きちんとすれば、予想以上に早い対応をしてもらえる。<br />
対応後にはこんなメールを頂ける。</p>
<pre>◯◯◯◯　◯◯様

Yahoo!メールカスタマーサービス◯◯です。
このたびは、調査および調整に必要な情報をご提供くださいまして、
誠にありがとうございました。

お問い合わせの「Yahoo!メール・迷惑メールフォルダへのメール振り分け」に
ついてご案内いたします。

お知らせいただいた情報をもとに調査を行い、ご利用のメールサーバーに
問題がないことを確認しましたので、弊社にて調整を実施いたしました。
・・・以下（ｒｙ</pre>
<p>まさに <a href="http://d.hatena.ne.jp/rx7/20100319/p1">Amazon EC2のサーバからメール送信をするまでにやるべきこと (スパムメール扱いを回避する！) &#8211; RX-7乗りの適当な日々</a> の</p>
<blockquote><p>DNS逆引き設定<br />
SPFの設定<br />
SPAMメールのブラックリストに対する解除申請</p></blockquote>
<p>のまんまですが。</p>
<h3>SPFについて</h3>
<p>とりあえず逆引き設定で迷惑メールに振り分けられる問題は改善したのだけど、SPF(Sender Policy Framework)を設定しておくともっとよさそう。</p>
<p>SPFは 送信者(from) が taro@domain.com なら domain.com が評価対象となる。メールサーバは関係ないようだ。fromのFQDN部分が使われる様子。</p>
<p>DNSの設定でTXTレコードを設定する。</p>
<p>Yahooでパスしたメールには</p>
<pre>Received-SPF: pass (mail.domain.com: domain of info@domain.com designates 27.....</pre>
<p>のようなヘッダが追記されていた（当然受信側のメールサーバがSPFに対応していることが前提）</p>
<p>チェックするにはこのようなツールも。</p>
<p>Sendmail &#8211; SPFレコードチェック<br />
<a href="http://www.sendmail.co.jp/sa/spfcheck.html">http://www.sendmail.co.jp/sa/spfcheck.html</a></p>
<p>参考：</p>
<li><a href="http://d.hatena.ne.jp/rx7/20100319/p1">Amazon EC2のサーバからメール送信をするまでにやるべきこと (スパムメール扱いを回避する！) &#8211; RX-7乗りの適当な日々</a></li>
<li><a href="http://ms2.seesaa.net/article/210240459.html">サービスから送るメールがスパム扱いされないために。</a></li>
<li><a href="http://www.drk7.jp/MT/archives/001327.html">メール送信者認証技術 SPF/Sender ID についてお勉強 :: drk7jp</a></li>
<li><a href="http://www.atmarkit.co.jp/fsecurity/special/82senderid/sender102.html">Sender ID：送信者側の設定作業 － ＠IT</a></li>
<li><a href="http://salt.iajapan.org/wpmu/anti_spam/admin/operation/information/spf_i01/">間違いから学ぶSPFレコードの正しい書き方 : 迷惑メール対策委員会</a></li>
]]></content:encoded>
			<wfw:commentRss>http://perl.no-tubo.net/2011/06/30/smtp%e3%82%b5%e3%83%bc%e3%83%90%e3%81%8c%e8%bf%b7%e6%83%91%e3%83%a1%e3%83%bc%e3%83%ab%e3%82%b5%e3%83%bc%e3%83%90%e3%81%a8%e6%80%9d%e3%82%8f%e3%82%8c%e3%81%aa%e3%81%84%e3%82%88%e3%81%86%e3%81%ab/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://perl.no-tubo.net/2011/06/30/smtp%e3%82%b5%e3%83%bc%e3%83%90%e3%81%8c%e8%bf%b7%e6%83%91%e3%83%a1%e3%83%bc%e3%83%ab%e3%82%b5%e3%83%bc%e3%83%90%e3%81%a8%e6%80%9d%e3%82%8f%e3%82%8c%e3%81%aa%e3%81%84%e3%82%88%e3%81%86%e3%81%ab/" />
	</item>
		<item>
		<title>CentOS 5.5 php5.3.6からphp5.2.17へyumでダウングレード</title>
		<link>http://perl.no-tubo.net/2011/03/27/centos-5-5-php5-3-6%e3%81%8b%e3%82%89php5-2-17%e3%81%b8yum%e3%81%a7%e3%83%80%e3%82%a6%e3%83%b3%e3%82%b0%e3%83%ac%e3%83%bc%e3%83%89/</link>
		<comments>http://perl.no-tubo.net/2011/03/27/centos-5-5-php5-3-6%e3%81%8b%e3%82%89php5-2-17%e3%81%b8yum%e3%81%a7%e3%83%80%e3%82%a6%e3%83%b3%e3%82%b0%e3%83%ac%e3%83%bc%e3%83%89/#comments</comments>
		<pubDate>Sun, 27 Mar 2011 10:04:36 +0000</pubDate>
		<dc:creator>clicktx</dc:creator>
				<category><![CDATA[CentOS5.x]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[サーバ管理]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://perl.no-tubo.net/?p=1529</guid>
		<description><![CDATA[remiリポジトリでphp5.3をyumでインストールしたけど、php5.2で動いていたスクリプトが動かない。
困るのでphpをダウングレードする。
php関連パッケージを調べる。
# yum list installe [...]]]></description>
			<content:encoded><![CDATA[<p>remiリポジトリでphp5.3をyumでインストールしたけど、php5.2で動いていたスクリプトが動かない。<br />
困るのでphpをダウングレードする。</p>
<h3>php関連パッケージを調べる。</h3>
<pre># yum list installed | grep php*
php.i386                               5.3.6-1.el5.remi                installed
php-cli.i386                           5.3.6-1.el5.remi                installed
php-common.i386                        5.3.6-1.el5.remi                installed
php-gd.i386                            5.3.6-1.el5.remi                installed
php-imap.i386                          5.3.6-1.el5.remi                installed
php-ldap.i386                          5.3.6-1.el5.remi                installed
php-mbstring.i386                      5.3.6-1.el5.remi                installed
php-mcrypt.i386                        5.3.6-1.el5.remi                installed
php-mysql.i386                         5.3.6-1.el5.remi                installed
php-pdo.i386                           5.3.6-1.el5.remi                installed
php-pear.noarch                        1:1.9.2-3.el5.remi              installed
php-pgsql.i386                         5.3.6-1.el5.remi                installed
php-xml.i386                           5.3.6-1.el5.remi                installed</pre>
<p># yum remove php*<br />
だと、全てのパッケージが削除されない？ようなので、手動設定でパッケージを削除。</p>
<pre># yum remove php php-cli php-common php-gd php-imap php-ldap php-mbstring php-mcrypt php-mysql php-pdo php-pear php-pgsql php-xml</pre>
<p>※ /etc/php.ini は /etc/php.ini.rpmsave として保存される。<span id="more-1529"></span></p>
<h3>RPMのバージョンを確認</h3>
<li>32bit <a href="http://rpms.famillecollet.com/enterprise/5/olds/i386/">http://rpms.famillecollet.com/enterprise/5/olds/i386/</a></li>
<li>64bit <a href="http://rpms.famillecollet.com/enterprise/5/olds/x86_64/">http://rpms.famillecollet.com/enterprise/5/olds/x86_64/</a></li>
<p>remiにあるバージョンがphp5.2.17-1でした。<br />
RPMをダウンロードしてインストールする方法が紹介されているのだけれど、php-pdo をインストールする際にlibsqlite.so.0に依存していてインストール出来なかった。<br />
（php-mysql、php-pgsqlもphp-pdoに依存しているので両方インストール出来ない）<br />
という事で、yumのバージョン指定インストールで行ってみた。</p>
<h3>yumでバージョン指定してphpをインストール</h3>
<pre># yum install --enablerepo=remi php-common-5.2.17* php-cli-5.2.17* php-5.2.17*</pre>
<h3>php関連モジュールをインストール</h3>
<pre># yum install --enablerepo=remi php-gd-5.2.17* php-imap-5.2.17* php-ldap-5.2.17* php-mbstring-5.2.17* php-mcrypt-5.2.17* php-mysql-5.2.17* php-pdo-5.2.17* php-pgsql-5.2.17* php-xml-5.2.17*</pre>
<p>すんなりインストール完了。<br />
当然ですが、remiリポジトリが導入されていることが前提です。</p>
<h3>失敗編</h3>
<p>以下はRPMパッケージをダウンロードしてインストールしてみたときのメモです。</p>
<pre>wget http://rpms.famillecollet.com/enterprise/5/olds/i386/php-5.2.17-1.el5.remi.i386.rpm
wget http://rpms.famillecollet.com/enterprise/5/olds/i386/php-cli-5.2.17-1.el5.remi.i386.rpm
wget http://rpms.famillecollet.com/enterprise/5/olds/i386/php-common-5.2.17-1.el5.remi.i386.rpm
wget http://rpms.famillecollet.com/enterprise/5/olds/i386/php-gd-5.2.17-1.el5.remi.i386.rpm
wget http://rpms.famillecollet.com/enterprise/5/olds/i386/php-imap-5.2.17-1.el5.remi.i386.rpm
wget http://rpms.famillecollet.com/enterprise/5/olds/i386/php-ldap-5.2.17-1.el5.remi.i386.rpm
wget http://rpms.famillecollet.com/enterprise/5/olds/i386/php-mbstring-5.2.17-1.el5.remi.i386.rpm
wget http://rpms.famillecollet.com/enterprise/5/olds/i386/php-mcrypt-5.2.17-1.el5.remi.i386.rpm
wget http://rpms.famillecollet.com/enterprise/5/olds/i386/php-mysql-5.2.17-1.el5.remi.i386.rpm
wget http://rpms.famillecollet.com/enterprise/5/olds/i386/php-pdo-5.2.17-1.el5.remi.i386.rpm
wget http://rpms.famillecollet.com/enterprise/5/olds/i386/php-pgsql-5.2.17-1.el5.remi.i386.rpm
wget http://rpms.famillecollet.com/enterprise/5/olds/i386/php-xml-5.2.17-1.el5.remi.i386.rpm</pre>
<pre># rpm -ivh php-common-5.2.17-1.el5.remi.i386.rpm
# rpm -ivh php-cli-5.2.17-1.el5.remi.i386.rpm
# rpm -ivh php-5.2.17-1.el5.remi.i386.rpm
※順番通りにインストールしないと依存関係でインストール出来ない</pre>
<pre># rpm -ivh php-gd-5.2.17-1.el5.remi.i386.rpm
# rpm -ivh php-imap-5.2.17-1.el5.remi.i386.rpm
# rpm -ivh php-ldap-5.2.17-1.el5.remi.i386.rpm
# rpm -ivh php-mbstring-5.2.17-1.el5.remi.i386.rpm
# rpm -ivh php-mcrypt-5.2.17-1.el5.remi.i386.rpm
# rpm -ivh php-xml-5.2.17-1.el5.remi.i386.rpm
※順番はないと思われる</pre>
<pre># rpm -ivh php-pdo-5.2.17-1.el5.remi.i386.rpm
エラー: 依存性の欠如:
	libsqlite.so.0 は php-pdo-5.2.17-1.el5.remi.i386 に必要とされています</pre>
<p>sqliteに入っているらしい。<br />
バージョンを合わせる必要がある。<br />
※yumでインストールした時にsqlite2がインストールされたので、それに入っているのかも。当環境ではsqlite3のみがインストールされていたので。</p>
<p>ここで挫折。yumでのインストールに切り替える。</p>
<p>参考：<br />
<a href="http://www.kencom.biz/archives/2009/0824034550.php">php 5.3.0からphp 5.2.10にダウングレード &#8211; KENCOM.BIZ</a><br />
<a href="http://d.hatena.ne.jp/Loups-garous/20100911/1284213529">CentOS5.5でPHP5.3を5.2にダウングレードする &#8211; 見果てぬ夢</a></p>
]]></content:encoded>
			<wfw:commentRss>http://perl.no-tubo.net/2011/03/27/centos-5-5-php5-3-6%e3%81%8b%e3%82%89php5-2-17%e3%81%b8yum%e3%81%a7%e3%83%80%e3%82%a6%e3%83%b3%e3%82%b0%e3%83%ac%e3%83%bc%e3%83%89/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://perl.no-tubo.net/2011/03/27/centos-5-5-php5-3-6%e3%81%8b%e3%82%89php5-2-17%e3%81%b8yum%e3%81%a7%e3%83%80%e3%82%a6%e3%83%b3%e3%82%b0%e3%83%ac%e3%83%bc%e3%83%89/" />
	</item>
		<item>
		<title>apcupsdのシャットダウン時のログ</title>
		<link>http://perl.no-tubo.net/2011/03/16/apcupsd%e3%81%ae%e3%82%b7%e3%83%a3%e3%83%83%e3%83%88%e3%83%80%e3%82%a6%e3%83%b3%e6%99%82%e3%81%ae%e3%83%ad%e3%82%b0/</link>
		<comments>http://perl.no-tubo.net/2011/03/16/apcupsd%e3%81%ae%e3%82%b7%e3%83%a3%e3%83%83%e3%83%88%e3%83%80%e3%82%a6%e3%83%b3%e6%99%82%e3%81%ae%e3%83%ad%e3%82%b0/#comments</comments>
		<pubDate>Wed, 16 Mar 2011 00:35:51 +0000</pubDate>
		<dc:creator>clicktx</dc:creator>
				<category><![CDATA[サーバ管理]]></category>
		<category><![CDATA[APC]]></category>
		<category><![CDATA[UPS]]></category>

		<guid isPermaLink="false">http://perl.no-tubo.net/?p=1510</guid>
		<description><![CDATA[震災の影響で停電になった時に残っていたログ。
apcupsdのeventsログ
2011-03-11 14:48:20 +0900  Power failure.
2011-03-11 14:48:26 +0900  R [...]]]></description>
			<content:encoded><![CDATA[<p>震災の影響で停電になった時に残っていたログ。</p>
<p>apcupsdのeventsログ</p>
<pre>2011-03-11 14:48:20 +0900  Power failure.
2011-03-11 14:48:26 +0900  Running on UPS batteries.
2011-03-11 15:41:07 +0900  Battery power exhausted.
2011-03-11 15:41:07 +0900  Initiating system shutdown!
2011-03-11 15:41:07 +0900  User logins prohibited
2011-03-11 15:42:22 +0900  apcupsd exiting, signal 15
2011-03-11 15:42:22 +0900  apcupsd shutdown succeeded</pre>
]]></content:encoded>
			<wfw:commentRss>http://perl.no-tubo.net/2011/03/16/apcupsd%e3%81%ae%e3%82%b7%e3%83%a3%e3%83%83%e3%83%88%e3%83%80%e3%82%a6%e3%83%b3%e6%99%82%e3%81%ae%e3%83%ad%e3%82%b0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://perl.no-tubo.net/2011/03/16/apcupsd%e3%81%ae%e3%82%b7%e3%83%a3%e3%83%83%e3%83%88%e3%83%80%e3%82%a6%e3%83%b3%e6%99%82%e3%81%ae%e3%83%ad%e3%82%b0/" />
	</item>
		<item>
		<title>CentOS5.5にmod_fcgidをインストールする(Apache2.2+FastCGI)</title>
		<link>http://perl.no-tubo.net/2011/02/16/centos5-5%e3%81%abmod_fcgid%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e3%81%99%e3%82%8bapache2-2fastcgi/</link>
		<comments>http://perl.no-tubo.net/2011/02/16/centos5-5%e3%81%abmod_fcgid%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e3%81%99%e3%82%8bapache2-2fastcgi/#comments</comments>
		<pubDate>Wed, 16 Feb 2011 00:09:24 +0000</pubDate>
		<dc:creator>clicktx</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[FastCGI]]></category>

		<guid isPermaLink="false">http://perl.no-tubo.net/?p=1350</guid>
		<description><![CDATA[FastCGIをApacheで使うには
mod_fastcgi
mod_fcgid
がある。
$ wget http://jaist.dl.sourceforge.net/sourceforge/mod-fcgid/mo [...]]]></description>
			<content:encoded><![CDATA[<p>FastCGIをApacheで使うには<br />
mod_fastcgi<br />
mod_fcgid<br />
がある。</p>
<pre>$ wget http://jaist.dl.sourceforge.net/sourceforge/mod-fcgid/mod_fcgid.2.2.tgz
$ tar zxvf mod_fcgid.2.2.tgz
$ cd mod_fcgid.2.2
$ make top_dir=/usr/lib/httpd
$ sudo make top_dir=/usr/lib/httpd install</pre>
<p>make 時に top_dir=/usr/lib/httpd を指定することでMakefileの書き換えが必要ない。<br />
<span id="more-1350"></span><br />
<a href="http://kawa.at.webry.info/200811/article_8.html">CentOS で mod_fcgid インストール (Apache+FastCGI) Kawanet Tech Blog/ウェブリブログ</a></p>
<p>必要なモジュール等<br />
<a href="http://nekoit.blog37.fc2.com/blog-entry-211.html">猫ITソリューションズ |  mod_fcgiのインストール &#8211; 猫とLinuxがイノベーションを加速する</a><br />
# yum install perl-FCGI httpd-devel</p>
<p>FCGI::ProcManager<br />
Sub::Override<br />
File::Slurp</p>
<p>検証用スクリプト<br />
<a href="http://yanor.net/wiki/?Perl%2FFastCGI環境でのFCGIスクリプトの実行">Perl/FastCGI環境でのFCGIスクリプトの実行 &#8211; yanor.net/wiki</a>より</p>
<pre>#!/usr/bin/perl

use FCGI;

my $request = FCGI::Request();

my $count = 0;
while ( $request->Accept() >= 0 ) {
    print "content-type: text/html\r\n\r\n";
    print ++$count;
}
</pre>
<p><a href="http://adiary.blog.abk.nu/0210">SpeedyCGI/FastCGI でモジュール動的更新 &#8211; adiary開発日誌</a></p>
]]></content:encoded>
			<wfw:commentRss>http://perl.no-tubo.net/2011/02/16/centos5-5%e3%81%abmod_fcgid%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e3%81%99%e3%82%8bapache2-2fastcgi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://perl.no-tubo.net/2011/02/16/centos5-5%e3%81%abmod_fcgid%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e3%81%99%e3%82%8bapache2-2fastcgi/" />
	</item>
		<item>
		<title>Apache2.2にmod_SpeedyCGIを組込むにはパッチが必要</title>
		<link>http://perl.no-tubo.net/2011/02/07/apache2-2%e3%81%abmod_speedycgi%e3%82%92%e7%b5%84%e8%be%bc%e3%82%80%e3%81%ab%e3%81%af%e3%83%91%e3%83%83%e3%83%81%e3%81%8c%e5%bf%85%e8%a6%81/</link>
		<comments>http://perl.no-tubo.net/2011/02/07/apache2-2%e3%81%abmod_speedycgi%e3%82%92%e7%b5%84%e8%be%bc%e3%82%80%e3%81%ab%e3%81%af%e3%83%91%e3%83%83%e3%83%81%e3%81%8c%e5%bf%85%e8%a6%81/#comments</comments>
		<pubDate>Mon, 07 Feb 2011 04:16:26 +0000</pubDate>
		<dc:creator>clicktx</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[perlモジュール]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[speedyCGI]]></category>

		<guid isPermaLink="false">http://perl.no-tubo.net/?p=1356</guid>
		<description><![CDATA[Apache2.2でSpeedyCGIのperlモジュールを使うのならyumなりで一発インストールできるけど、mod_SpeedyCGIをインストールしようとするとmakeでコケる。
どうやらパッチを当ててからmakeす [...]]]></description>
			<content:encoded><![CDATA[<p>Apache2.2でSpeedyCGIのperlモジュールを使うのならyumなりで一発インストールできるけど、mod_SpeedyCGIをインストールしようとするとmakeでコケる。</p>
<p>どうやらパッチを当ててからmakeする必要があるようだ。<br />
参考：<a href="http://www.maido3.com/server/support/apache2speedy.html">Apache2.2にmod_SpeedyCGIを組み込む方法（パッチファイルのあて方） / レンタルサーバー BIG-server.com</a></p>
<h3>パッチファイルのダウンロード</h3>
<p>パッチファイル：<a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1111235&amp;group_id=2208&amp;atid=302208">CGI::SpeedyCGI with apr-1.0 </a></p>
<p>※パッチファイルはwgetで入手できないのでダウンロードしておいてFTP等でアップロードする必要がある。<span id="more-1356"></span></p>
<h3>SpeedyCGIのインストール</h3>
<pre>$ wget http://www.cpan.org/modules/by-authors/id/H/HO/HORROCKS/CGI-SpeedyCGI-2.22.tar.gz
$ tar zxvf CGI-SpeedyCGI-2.22.tar.gz

<span style="color: #ff9900;">#####
CGI-SpeedyCGI-2.22/mod_speedycgi2 に
ダウンロードしたパッチをFTP等でアップロードする
#####</span>

$ cd CGI-SpeedyCGI-2.22/mod_speedycgi2
$ patch -p1 &lt; patch-mod_speedycgi2.c	<span style="color: #ff9900;">＃パッチをあてる</span>
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- src/mod_speedycgi2.c.orig	Tue Oct  7 13:03:48 2003
|+++ src/mod_speedycgi2.c	Sun Jan 23 20:42:43 2005
--------------------------
File to patch: <span style="color: #ff9900;">../src/mod_speedycgi2.c    # パッチをあてるファイルを指定</span>

$ cd ../
$ perl Makefile.PL

Optional mod_speedycgi support.

Mod_speedycgi increases performance under Apache by avoiding the fork/exec
overhead associated with each request under normal SpeedyCGI.  However, it
requires a working copy of "apxs" in your path, Apache with mod_so
support, and additional Apache configuration.

Compile mod_speedycgi (default no)? <span style="color: #ff9900;">yes    # yesを入力</span>

$ make
$ make test
$ sudo make install</pre>
<h3>・・・エラー。</h3>
<pre>make[1]: apxs: コマンドが見つかりませんでした
make[1]: *** [install] エラー 127

sudo make install -i   # エラーを無視するオプションをつけてインストール。</pre>
<p>mod_SpeedyCGIがインストールされないので、Apacheモジュールディレクトリにコピーする。<br />
README通り、CGI-SpeedyCGI-2.22/mod_speedycgi2/.libs に mod_speedycgi.so が作成されているので /usr/lib/httpd/modules にコピーする（CentOSの場合）</p>
<pre>$ cd mod_speedycgi2/.libs
$ sudo cp mod_speedycgi.so /usr/lib/httpd/modules</pre>
]]></content:encoded>
			<wfw:commentRss>http://perl.no-tubo.net/2011/02/07/apache2-2%e3%81%abmod_speedycgi%e3%82%92%e7%b5%84%e8%be%bc%e3%82%80%e3%81%ab%e3%81%af%e3%83%91%e3%83%83%e3%83%81%e3%81%8c%e5%bf%85%e8%a6%81/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://perl.no-tubo.net/2011/02/07/apache2-2%e3%81%abmod_speedycgi%e3%82%92%e7%b5%84%e8%be%bc%e3%82%80%e3%81%ab%e3%81%af%e3%83%91%e3%83%83%e3%83%81%e3%81%8c%e5%bf%85%e8%a6%81/" />
	</item>
		<item>
		<title>CentOS5.5 ImageMagick インストール関連</title>
		<link>http://perl.no-tubo.net/2011/01/07/centos5-5-imagemagick-%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e9%96%a2%e9%80%a3/</link>
		<comments>http://perl.no-tubo.net/2011/01/07/centos5-5-imagemagick-%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e9%96%a2%e9%80%a3/#comments</comments>
		<pubDate>Fri, 07 Jan 2011 09:29:15 +0000</pubDate>
		<dc:creator>clicktx</dc:creator>
				<category><![CDATA[perlモジュール]]></category>
		<category><![CDATA[インストールメモ]]></category>
		<category><![CDATA[ImageMagick]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://perl.no-tubo.net/?p=1230</guid>
		<description><![CDATA[ImageMagickのインストールはyumで管理するのが一番簡単。
ただし、CentOSのImageMagickはバージョンが古い（v6.2.8）
ImageMagickのperlモジュール（PerlMagick？）は [...]]]></description>
			<content:encoded><![CDATA[<p>ImageMagickのインストールはyumで管理するのが一番簡単。<br />
ただし、CentOSのImageMagickはバージョンが古い（v6.2.8）</p>
<p>ImageMagickのperlモジュール（PerlMagick？）はCPANでインストールすると入らないので、yumでスコッといれる。<span id="more-1230"></span></p>
<pre>yum install ImageMagick
yum install ImageMagick-perl</pre>
<h3>動作確認</h3>
<p>perlで動作確認してみる。</p>
<pre>#!/usr/bin/perl

use Image::Magick;
use strict;

my $i;

# GIF test
$i = Image::Magick-&gt;new;
$i-&gt;Read('test.gif');
$i-&gt;Minify();

$i-&gt;Write('test_s.gif');

# JPEG test
$i = Image::Magick-&gt;new;
$i-&gt;Read('test.jpg');
$i-&gt;Minify();

$i-&gt;Write('test_s.jpg');

# PNG test
$i = Image::Magick-&gt;new;
$i-&gt;Read('test.png');
$i-&gt;Minify();

$i-&gt;Write('test_s.png');

print "Content-type: text/html\n\n";

print &lt;&lt;EOM;
&lt;h2&gt;GIF&lt;/h2&gt;
    &lt;p&gt;
        &lt;img src="test.gif" /&gt;
        &lt;img src="test_s.gif" /&gt;
    &lt;/p&gt;

&lt;h2&gt;JPEG&lt;/h2&gt;
    &lt;p&gt;
        &lt;img src="test.jpg" /&gt;
        &lt;img src="test_s.jpg" /&gt;
    &lt;/p&gt;

&lt;h2&gt;PNG&lt;/h2&gt;
    &lt;p&gt;
        &lt;img src="test.png" /&gt;
        &lt;img src="test_s.png" /&gt;
    &lt;/p&gt;

EOM

exit;</pre>
<p>すぐ忘れるからメモ。</p>
]]></content:encoded>
			<wfw:commentRss>http://perl.no-tubo.net/2011/01/07/centos5-5-imagemagick-%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e9%96%a2%e9%80%a3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://perl.no-tubo.net/2011/01/07/centos5-5-imagemagick-%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e9%96%a2%e9%80%a3/" />
	</item>
		<item>
		<title>メールサーバ構築のまとめ（複数のバーチャルドメイン+Postfix+MySQL+Dovecot+procmail+Clam AntiVirus+spamassassin+postfixadmin）</title>
		<link>http://perl.no-tubo.net/2011/01/06/%e3%83%a1%e3%83%bc%e3%83%ab%e3%82%b5%e3%83%bc%e3%83%90%e6%a7%8b%e7%af%89%e3%81%ae%e3%81%be%e3%81%a8%e3%82%81%ef%bc%88%e8%a4%87%e6%95%b0%e3%81%ae%e3%83%90%e3%83%bc%e3%83%81%e3%83%a3%e3%83%ab%e3%83%89/</link>
		<comments>http://perl.no-tubo.net/2011/01/06/%e3%83%a1%e3%83%bc%e3%83%ab%e3%82%b5%e3%83%bc%e3%83%90%e6%a7%8b%e7%af%89%e3%81%ae%e3%81%be%e3%81%a8%e3%82%81%ef%bc%88%e8%a4%87%e6%95%b0%e3%81%ae%e3%83%90%e3%83%bc%e3%83%81%e3%83%a3%e3%83%ab%e3%83%89/#comments</comments>
		<pubDate>Thu, 06 Jan 2011 02:22:18 +0000</pubDate>
		<dc:creator>clicktx</dc:creator>
				<category><![CDATA[postfix]]></category>
		<category><![CDATA[インストールメモ]]></category>
		<category><![CDATA[postfixadmin]]></category>
		<category><![CDATA[procmail]]></category>
		<category><![CDATA[メールサーバ]]></category>

		<guid isPermaLink="false">http://perl.no-tubo.net/?p=1132</guid>
		<description><![CDATA[設定項目などはほぼコピペ。自分用のメモ。
記事中の各リンク先の通り設定したのではなかなか実現できないので多少アレンジしています。
ローカルのUNIXユーザーはMairdir/方式でメールを使いたい。
バーチャルドメイン複 [...]]]></description>
			<content:encoded><![CDATA[<p>設定項目などはほぼコピペ。自分用のメモ。<br />
記事中の各リンク先の通り設定したのではなかなか実現できないので多少アレンジしています。</p>
<p>ローカルのUNIXユーザーはMairdir/方式でメールを使いたい。<br />
バーチャルドメイン複数の運用、かつ、Web GUIでメールアカウントを管理したい。<br />
スパムメールとウィルスもチェックしたい。</p>
<p>このような要望のもと、メールサーバを立て直した際に以前書いた記事をまとめてみた。<br />
さすがに長文になったので続きを読むにした。</p>
<ul>
<li>CentOS5.5 i386とする</li>
<li> ローカルのUNIXユーザはMaildir方式でメールを利用する。<br />
メールボックスは ~/home/user/Mairdir</li>
<li>複数のドメインをバーチャルドメインで扱う。<br />
メールボックスは /mail/domain.tld/user@domain.tld</li>
<li>PostfixをMTAとしてバーチャルドメインでのメールアカウントはMySQLで管理する。</li>
<li>Clam AntiVirusでウィルスチェックを行う。</li>
<li>SpamAssassinでスパムチェックを行う。このため配送（transport）はprocmailで行う。</li>
</ul>
<p><span id="more-1132"></span></p>
<h2>MySQL対応版Postfixのインストール</h2>
<p>MySQLとPostgreSQLはインストール済みとする。<br />
MySQL対応版のPostfixをRPMでインストールする。</p>
<p><a href="http://perl.no-tubo.net/2009/10/02/centos5-3-postfixをmysql対応にする/">CentOS5.3 PostfixをMySQL対応にする</a>でSRPMを使ってRPMをビルドしてインストールしたが、RPMも提供されている模様。なので、これを使ってインストールしてみる。</p>
<p>MySQLとPostgreSQLに依存しているので両方インストールの必要がある（と思う）</p>
<ul>
<li>32bit(i386)用<br />
http://ftp.riken.jp/Linux/centos/5/centosplus/i386/RPMS/postfix-2.3.3-2.1.centos.mysql_pgsql.i386.rpm</li>
<li>64bit(x86_64)用<br />
http://ftp.riken.jp/Linux/centos/5/centosplus/x86_64/RPMS/postfix-pflogsumm-2.3.3-2.1.centos.mysql_pgsql.x86_64.rpm</li>
</ul>
<h4>yumでインストールされていたらアンインストール</h4>
<pre># yum erase postfix</pre>
<h4>RPMをダウンロードしてインストール</h4>
<pre># wget http://ftp.riken.jp/Linux/centos/5/centosplus/i386/RPMS/postfix-2.3.3-2.1.centos.mysql_pgsql.i386.rpm
# rpm -ivh postfix-2.3.3-2.1.centos.mysql_pgsql.i386.rpm
# rm -f postfix-2.3.3-2.1.centos.mysql_pgsql.i386.rpm        <span style="color: #ffcc00;">←ファイルを削除</span></pre>
<h4>yumの自動アップデートから外す</h4>
<p>yum update で postfix* なパッケージがアップデートされなくなる。これをしないとyumの自動アップデート時にMySQL非対応版に置き換わってしまう。</p>
<pre>vi /etc/yum.conf
exclude=postfix*　<span style="color: #ffcc00;">←最終業に追記</span></pre>
<h4>追記</h4>
<p><a href="http://satospo.sakura.ne.jp/blog_archives/tech/centos/postfix_rpm.html">RPM版Postfixの対応状況 &#8211; satospo</a>によると</p>
<blockquote><p>MySQLとPostgreSQLをCentOS5のRPM以外からインストールしている場合（例えば、ソースからビルドしているなど）は、この手法は使えない。SPECファイルにMySQL対応などを記述してリビルドするべし。</p></blockquote>
<p>とあるので、MySQLをソースからインストールしている場合などは<a href="http://perl.no-tubo.net/2009/10/02/centos5-3-postfixをmysql対応にする/">CentOS5.3 PostfixをMySQL対応にする</a>の方法でないとインストール出来ないかも。</p>
<h2>postfixadmin</h2>
<p>バーチャルドメインでのメールアカウントの管理はブラウザGUIから管理できるPostfixAdminを利用する。</p>
<p>内容はほぼ<a href="http://centos.bungu-do.jp/2008/11/postfix_2_mysqlpostfixadmin.html">Postfixによるメールサーバ構築 その2 (MySQLの設定とpostfixadminのインストール) | CentOSサーバ構築術 文具堂</a> さんのコピペです。</p>
<h3>postfixadminのインストール</h3>
<p>最新版をチェック<br />
<a href="http://sourceforge.net/projects/postfixadmin/">http://sourceforge.net/projects/postfixadmin/</a></p>
<pre># wget http://nchc.dl.sourceforge.net/sourceforge/postfixadmin/postfixadmin-2.3.2.tar.gz
# tar zxvf postfixadmin-2.3.2.tar.gz
# mv postfixadmin-2.3.2/ /var/www/postfixadmin</pre>
<h3>postfixadminの設定</h3>
<pre># cd /var/www/postfixadmin
# cp config.inc.php config.inc.php.copy
# vi config.inc.php

/*****************************************************************
 *  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 * You have to set $CONF['configured'] = true; before the
 * application will run!
 * Doing this implies you have changed this file as required.
 * i.e. configuring database etc; specifying setup.php password etc.
 */
<span style="color: #ff9900;">//$CONF['configured'] = false;
$CONF['configured'] = true;       ←修正 </span>

// In order to setup Postfixadmin, you MUST specify a hashed password here.
// To create the hash, visit setup.php in a browser and type a password into the
 field,
// on submission it will be echoed out to you as a hashed value.
$CONF['setup_password'] = 'changeme';

// Postfix Admin Path
// Set the location of your Postfix Admin installation here.
// YOU MUST ENTER THE COMPLETE URL e.g. http://domain.tld/postfixadmin
$CONF['postfix_admin_url'] = '';

// shouldn't need changing.
$CONF['postfix_admin_path'] = dirname(__FILE__);

// Language config
// Language files are located in './languages', change as required..
<span style="color: #ff9900;">//$CONF['default_language'] = 'en';
$CONF['default_language'] = 'ja';       ←修正</span>
// Database Config
// mysql = MySQL 3.23 and 4.0, 4.1 or 5
// mysqli = MySQL 4.1+
// pgsql = PostgreSQL
<span style="color: #ff9900;">↓適時修正
$CONF['database_type'] = 'mysql';
$CONF['database_host'] = 'localhost';
$CONF['database_user'] = 'postfix';
$CONF['database_password'] = 'pass';
$CONF['database_name'] = 'postfix';
$CONF['database_prefix'] = '';</span>

// Site Admin
// Define the Site Admins email address below.
// This will be used to send emails from to create mailboxes.
<span style="color: #ff9900;">//$CONF['admin_email'] = 'postmaster@change-this-to-your.domain.tld';
$CONF['admin_email'] = 'postmaster@hoge.jp';       ←修正</span>

// Encrypt
// In what way do you want the passwords to be crypted?
// md5crypt = internal postfix admin md5
// md5 = md5 sum of the password
// system = whatever you have set as your PHP system default
// cleartext = clear text passwords (ouch!)
// mysql_encrypt = useful for PAM integration
// authlib = support for courier-authlib style passwords
// dovecot:CRYPT-METHOD = use dovecotpw -s 'CRYPT-METHOD'. Example: dovecot:CRAM-MD5
<span style="color: #ff9900;">//$CONF['encrypt'] = 'md5crypt';
$CONF['encrypt'] = 'cleartext';       ←修正</span>

// Page Size
// Set the number of entries that you would like to see
// in one page.
<span style="color: #ff9900;">//$CONF['page_size'] = '10';
$CONF['page_size'] = '100';       ←修正</span>

// Mailboxes
// If you want to store the mailboxes per domain set this to 'YES'.
// Examples:
//   YES: /usr/local/virtual/domain.tld/username@domain.tld
//   NO:  /usr/local/virtual/username@domain.tld
<span style="color: #ff9900;">$CONF['domain_path'] = 'YES';       ←修正</span>

// Default Domain Values
// Specify your default values below. Quota in MB.
<span style="color: #ff9900;">//$CONF['aliases'] = '10';
//$CONF['mailboxes'] = '10';
//$CONF['maxquota'] = '10';
$CONF['aliases'] = '100';       ←修正
$CONF['mailboxes'] = '100';
$CONF['maxquota'] = '300';</span>

// Quota
// When you want to enforce quota for your mailbox users set this to 'YES'.
<span style="color: #ff9900;">$CONF['quota'] = 'YES';       ←修正</span>

// Backup
// If you don't want backup tab set this to 'NO';
<span style="color: #ff9900;">$CONF['backup'] = 'YES';
$CONF['backup'] = 'NO'       ←修正</span>;

// Send Mail
// If you don't want sendmail tab set this to 'NO';
<span style="color: #ff9900;">//$CONF['sendmail'] = 'YES';
$CONF['sendmail'] = 'NO';       ←修正</span>

// Fetchmail
// If you don't want fetchmail tab set this to 'NO';
<span style="color: #ff9900;">//$CONF['fetchmail'] = 'YES';
$CONF['fetchmail'] = 'NO';       ←修正</span></pre>
<h3>apacheの設定</h3>
<p>必要に応じてIP制限、Basic認証などを行う。</p>
<pre>postfixadmin用コンフィグを新規作成
# vi /etc/httpd/conf.d/postfixadmin.conf

Alias /postfixadmin "/var/www/postfixadmin"

&lt;Directory "/var/www/postfixadmin"&gt;
    Order allow,deny
    Allow from all
&lt;/Directory&gt;</pre>
<h3>postfixadminのセットアップスクリプト実行</h3>
<p>http://hogehoge/postfixadmin/setup.php<br />
へアクセスして下部のフォームにて、セットアップパスワードを設定する。</p>
<blockquote><p>If you want to use the password you entered as setup password, edit config.inc.php and set<br />
$CONF['setup_password'] = &#8216;<span style="color: #ff0000;">xxxxxd9ae95306513xxxxxxxxx:71d063841 xxxx38xxxxxdxx06bcexxxx</span>&#8216;;</p></blockquote>
<p>のコメントが表示されるので、postfixadminのconfig.inc.phpに作成されたsetup_passwordを適用する</p>
<pre>// In order to setup Postfixadmin, you MUST specify a hashed password here.
// To create the hash, visit setup.php in a browser and type a password into the field,
// on submission it will be echoed out to you as a hashed value.
<span style="color: #ff9900;">//$CONF['setup_password'] = 'changeme';
$CONF['setup_password'] = 'xxxxxd9ae95306513xxxxxxxxx:71d063841xxxx38xxxxxdxx06bcexxxx';    ←ここを修正</span></pre>
<h3>postfixadmin管理ユーザーの追加</h3>
<p>先ほど設定したセットアップパスワードを使って管理ユーザーを設定する。<br />
ログインを確認できたらセットアップスクリプトを削除する</p>
<pre># rm -f /var/www/postfixadmin/setup.php
# rm -f /var/www/postfixadmin/motd*</pre>
<h2>MySQLを使うためのPostfixの設定</h2>
<h3>メール保存用ルートディレクトリ</h3>
<p>/mail をメール専用アカウントの保存用ルートディレクトリとする。<br />
各ユーザーのメールボックスは /mail/domain.jp/user@domain.jp となる。</p>
<pre><span style="color: #ff9900;">バーチャルドメインで処理するユーザーの作成</span>
# groupadd -g 10000 vuser
# useradd -g vuser -u 10000 vuser

<span style="color: #ff9900;">メール保存用ルートディレクトリの作成</span>
# mkdir /mail
# chown vuser:vuser /mail
# chmod 771 /mail</pre>
<h3>postfix用の設定ファイル作成</h3>
<p>MySQLのユーザーとパスワードを適時変更すること<br />
（サンプルは ユーザー=postfix パスワード=pass）<br />
/etc/postfix/mysql_virtual_alias_maps.cf<br />
/etc/postfix/mysql_virtual_domains_maps.cf<br />
/etc/postfix/mysql_virtual_mailbox_maps.cf<br />
/etc/postfix/mysql_virtual_mailbox_limit_maps.cf</p>
<pre># vi /etc/postfix/mysql_virtual_alias_maps.cf
user = postfix
password = pass
hosts = localhost
dbname = postfix
table = alias
select_field = goto
where_field = address

# vi /etc/postfix/mysql_virtual_domains_maps.cf
user = postfix
password = pass
hosts = localhost
dbname = postfix
table = domain
select_field = domain
where_field = domain
additional_conditions = and active = '1'

# vi /etc/postfix/mysql_virtual_mailbox_maps.cf
user = postfix
password = pass
hosts = localhost
dbname = postfix
table = mailbox
select_field = maildir
where_field = username

# vi /etc/postfix/mysql_virtual_mailbox_limit_maps.cf
user = postfix
password = pass
hosts = localhost
dbname = postfix
table = mailbox
select_field = quota
where_field = username
#additional_conditions = and active = '1'</pre>
<h3>Postfix設定ファイルの編集</h3>
<p>元のファイルをコピーしてから編集する。</p>
<pre># cp /etc/postfix/main.cf /etc/postfix/main.cf.org
# vi /etc/postfix/main.cf

# INTERNET HOST AND DOMAIN NAMES
#
# The myhostname parameter specifies the internet hostname of this
# mail system. The default is to use the fully-qualified domain name
# from gethostname(). $myhostname is used as a default value for many
# other configuration parameters.
#
#myhostname = host.domain.tld
#myhostname = virtual.domain.tld
<span style="color: #ff9900;">myhostname = mail.example.com    ←追加(自FQDN名を指定)</span>

# The mydomain parameter specifies the local internet domain name.
# The default is to use $myhostname minus the first component.
# $mydomain is used as a default value for many other configuration
# parameters.
#
#mydomain = domain.tld
<span style="color: #ff9900;">mydomain = centossrv.com　←　追加(自ドメイン名を指定)</span>

# SENDING MAIL
#
# The myorigin parameter specifies the domain that locally-posted
# mail appears to come from. The default is to append $myhostname,
# which is fine for small sites.  If you run a domain with multiple
# machines, you should (1) change this to $mydomain and (2) set up
# a domain-wide alias database that aliases each user to
# user@that.users.mailhost.
#
# For the sake of consistency between sender and recipient addresses,
# myorigin also specifies the default domain name that is appended
# to recipient addresses that have no @domain part.
#
#myorigin = $myhostname
#myorigin = $mydomain
<span style="color: #ff9900;">myorigin = $myhostname    ←　追加(ローカルからのメール送信時の送信元メールアドレス@以降にドメイン名を付加)</span>

#inet_interfaces = all
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost
#inet_interfaces = localhost
<span style="color: #ff9900;">inet_interfaces = all    ←変更(外部からのメール受信を許可)</span>

#mydestination = $myhostname, localhost.$mydomain, localhost
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
#       mail.$mydomain, www.$mydomain, ftp.$mydomain
<span style="color: #ff9900;">mydestination = $myhostname, localhost.$mydomain, localhost     ←修正</span>

# NOTE: Postfix will not automatically forward mail for domains that
# list this system as their primary or backup MX host. See the
# permit_mx_backup restriction description in postconf(5).
#
#relay_domains = $mydestination
<span style="color: #ff9900;">relay_domains = $mydestination     ←コメント削除
</span>

# DELIVERY TO MAILBOX
#
# The home_mailbox parameter specifies the optional pathname of a
# mailbox file relative to a user's home directory. The default
# mailbox file is /var/spool/mail/user or /var/mail/user.  Specify
# "Maildir/" for qmail-style delivery (the / is required).
#
#home_mailbox = Mailbox
#home_mailbox = Maildir/
<span style="color: #ff9900;">home_mailbox = Maildir/　←　追加(メールボックス形式をMaildir形式にする)</span>

# SHOW SOFTWARE VERSION OR NOT
#
# The smtpd_banner parameter specifies the text that follows the 220
# code in the SMTP server's greeting banner. Some people like to see
# the mail version advertised. By default, Postfix shows no version.
#
# You MUST specify $myhostname at the start of the text. That is an
# RFC requirement. Postfix itself does not care.
#
#smtpd_banner = $myhostname ESMTP $mail_name
#smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)
<span style="color: #ff9900;">smtpd_banner = $myhostname ESMTP unknown　←　追加(メールサーバーソフト名の隠蔽化)</span>

<span style="color: #ff9900;">以下を最終行に追記
local_transport = local
virtual_transport = virtual
virtual_mailbox_base = /mail
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_alias_domains = $virtual_alias_maps
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 10000
virtual_uid_maps = static:10000
virtual_gid_maps = static:10000

maximal_backoff_time = 800s
minimal_backoff_time = 100s
bounce_queue_lifetime = 60m
maximal_queue_lifetime = 60m

#mailbox_size_limit = 1024000000
message_size_limit = 20480000

#virtual_mailbox_limit = 51200000
virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_overquota_bounce = yes
virtual_mailbox_limit_inbox = yes

smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_local_domain = $myhostname
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
</span></pre>
<p>ローカルユーザーのメールが配信されない（root宛のメールなど）対策として、</p>
<pre>mydestination = $myhostname, localhost.$mydomain, localhost     <span style="color: #ff9900;">※ローカル配送の最終到達ドメイン。</span>

relay_domains = $mydestination

local_transport = local</pre>
<p>としている。<br />
他の対処法としては/etc/aliases に転送先を設定する方法などもある。</p>
<p>また、LAN(192.168.0.0/16)内の他サーバからのリレーのみ許可するので以下の設定も追加する。</p>
<pre># Specify "mynetworks_style = host" when Postfix should "trust"
# only the local machine.
#
#mynetworks_style = class
<span style="color: #ffcc00;">mynetworks_style = subnet</span>
#mynetworks_style = host

# Alternatively, you can specify the mynetworks list by hand, in
# which case Postfix ignores the mynetworks_style setting.
#
# Specify an explicit list of network/netmask patterns, where the
# mask specifies the number of bits in the network part of a host
# address.
#
# You can also specify the absolute pathname of a pattern file instead
# of listing the patterns here. Specify type:table for table-based lookups
# (the value on the table right-hand side is not used).
#
#mynetworks = 168.100.189.0/28, 127.0.0.0/8
#mynetworks = $config_directory/mynetworks
#mynetworks = hash:/etc/postfix/network_table
<span style="color: #ffcc00;">mynetworks = 192.168.0.0/16, 127.0.0.0/8</span></pre>
<h3>新規ローカルユーザー対策</h3>
<p>新規ユーザーが追加されたらホームディレクトリに Mairdir/ を自動で作成されるようにする。</p>
<pre># mkdir -p /etc/skel/Maildir/{new,cur,tmp}
# chmod -R 700 /etc/skel/Maildir/</pre>
<p>既に運用中で既存ユーザーの対策をする場合は<a href="http://centossrv.com/postfix.shtml">メールサーバー構築(Postfix+Dovecot) &#8211; CentOSで自宅サーバー構築</a>の「（３）Maildir形式メールボックス作成  メールデータ移行」を参考に対処する。</p>
<h3>サブミッションポート587番ポートを開く</h3>
<p>master.cfのsubmissionの行のコメントを外すだけ。</p>
<pre># vi /etc/postfix/master.cf
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp      inet  n       -       n       -       -       smtpd
#submission inet n       -       n       -       -       smtpd
<span style="color: #ff9900;">submission inet n       -       n       -       -       smtpd    ←コメント削除</span></pre>
<h2>Dovecotの設定</h2>
<h3>Dovecotのインストール</h3>
<pre># yum install dovecot</pre>
<h3>Dovecotの設定</h3>
<pre># cp /etc/dovecot.conf /etc/dovecot.conf.org
# vi /etc/dovecot.conf

# Protocols we want to be serving: imap imaps pop3 pop3s
# If you only want to use dovecot-auth, you can set this to "none".
#protocols = imap imaps pop3 pop3s
<span style="color: #ff9900;">protocols = imap imaps pop3 pop3s    ←コメント削除
</span>
#   mail_location = maildir:~/Maildir
#   mail_location = mbox:~/mail:INBOX=/var/mail/%u
#   mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n
#
#
#
#mail_location =
<span style="color: #ff9900;">mail_location = maildir:/mail/%d/%u   ←追記
</span>
# Valid UID range for users, defaults to 500 and above. This is mostly
# to make sure that users can't log in as daemons or other system users.
# Note that denying root logins is hardcoded to dovecot binary and can't
# be done even if first_valid_uid is set to 0.
#first_valid_uid = 500
<span style="color: #ff9900;">first_valid_uid = 10000   ←追記
</span>
# Valid GID range for users, defaults to non-root/wheel. Users having
# non-valid GID as primary group ID aren't allowed to log in. If user
# belongs to supplementary groups with non-valid GIDs, those groups are
# not set.
#first_valid_gid = 1
<span style="color: #ff9900;">first_valid_gid = 10000   ←追記
</span>
<span style="color: #ff9900;">#passdb pam {    ←コメントアウト
</span>    # [blocking=yes] [session=yes] [setcred=yes]
    # [cache_key=] []
    #
    〜略〜
    # Some examples:
    #   args = session=yes *
    #   args = cache_key=%u dovecot
    #args = dovecot
<span style="color: #ff9900;">  #}    ←コメントアウト
</span>
  # SQL database
<span style="color: #ff9900;">  passdb sql {    ←コメント削除
</span>    # Path for SQL configuration file, see doc/dovecot-sql-example.conf
    #args =
<span style="color: #ff9900;">    args = /etc/dovecot-mysql.conf    ←追記
</span><span style="color: #ff9900;">  }    ←コメント削除
</span>
  # System users (NSS, /etc/passwd, or similiar). In many systems nowadays this
  # uses Name Service Switch, which is configured in /etc/nsswitch.conf.
  #
<span style="color: #ff9900;">  #userdb passwd {    ←コメントアウト
</span>    # [blocking=yes] - By default the lookups are done in the main dovecot-auth
    # process. This setting causes the lookups to be done in auth worker
    # proceses. Useful with remote NSS lookups that may block.
    # NOTE: Be sure to use this setting with nss_ldap or users might get
    # logged in as each others!
    #args =
<span style="color: #ff9900;"> # }    ←コメントアウト
</span>
  # SQL database
<span style="color: #ff9900;">  userdb sql {    ←コメント削除
</span>    # Path for SQL configuration file, see doc/dovecot-sql-example.conf
    #args =
<span style="color: #ff9900;">   args = /etc/dovecot-mysql.conf    ←追記
  }    ←コメント削除</span>

auth default {
  # Space separated list of wanted authentication mechanisms:
  #   plain login digest-md5 cram-md5 ntlm rpa apop anonymous gssapi
  # NOTE: See also disable_plaintext_auth setting.
  #mechanisms = plain
<span style="color: #ff9900;">  mechanisms = plain login digest-md5 cram-md5    ←追記
</span>
##
## POP3 specific settings
##

protocol pop3 {
  # Login executable location.
  #login_executable = /usr/libexec/dovecot/pop3-login
  〜略〜
<span style="color: #ff9900;">  #pop3_uidl_format = %08Xu%08Xv
  pop3_uidl_format = %08Xu%08Xv    ←コメント削除</span>
}

  # It's possible to export the authentication interface to other programs:
<span style="color: #ff9900;">  socket listen {    ←コメント削除
</span>    #master {
      # Master socket provides access to userdb information. It's typically
      # used to give Dovecot's local delivery agent access to userdb so it
      # can find mailbox locations.
      #path = /var/run/dovecot/auth-master
      #mode = 0600
      # Default user/group is the one who started dovecot-auth (root)
      #user =
      #group =
    #}
<span style="color: #ff9900;">    client {    ←コメント削除
</span>      # The client socket is generally safe to export to everyone. Typical use
      # is to export it to your SMTP server so it can do SMTP AUTH lookups
      # using it.
      #path = /var/run/dovecot/auth-client
      #mode = 0660
<span style="color: #ff9900;">      path = /var/spool/postfix/private/auth    ←追記
      mode = 0660
      user = postfix
      group = postfix</span>
<span style="color: #ff9900;">    }    ←コメント削除
</span><span style="color: #ff9900;">  }    ←コメント削除
</span>
<span style="color: #ff0000;">x86_64環境の場合は以下をコメント削除する。i386の場合は大丈夫。
</span># Set max. process size in megabytes. If you don't use
# login_process_per_connection you might need to grow this.
<span style="color: #ff9900;">login_process_size = 64    ←コメント削除</span></pre>
<h3>/etc/dovecot-mysql.conf を新規作成</h3>
<p>userやpasswordは適時変更すること</p>
<pre># vi /etc/dovecot-mysql.conf

driver = mysql
default_pass_scheme = PLAIN
connect = dbname=postfix user=<span style="color: #ffcc99;">postfix</span> host=/var/lib/mysql/mysql.sock password=<span style="color: #ffcc99;">pass</span>
password_query = SELECT password FROM mailbox WHERE username = '%u' AND active = '1'
user_query = SELECT concat('/mail/', maildir) as home, 10000 as uid, 10000 as gid FROM mailbox WHERE username = '%u' AND active = '1'</pre>
<p>認証用ライブラリをインストール</p>
<pre># yum install cyrus-sasl-plain cyrus-sasl-md5</pre>
<p>saslauthdは利用しないので念のため停止しておく。</p>
<pre># /etc/rc.d/init.d/saslauthd stop
# chkconfig saslauthd off</pre>
<h3>PostfixとDovecotを起動する</h3>
<p>/var/log/maillogにエラーなどがでていないか確認。<br />
なお、sendmail等他のMTAで運営していた場合は切り替えが必要。</p>
<pre><span style="color: #ff9900;">#sendmailから切り替える場合</span>
# /etc/rc.d/init.d/sendmail stop  <span style="color: #ff9900;">←sendmail停止</span>
sm-client を停止中:                                        [  OK  ]
sendmail を停止中:                                         [  OK  ]

# chkconfig sendmail off  <span style="color: #ff9900;">←sendmail自動起動off</span>
# chkconfig --list sendmail  <span style="color: #ff9900;">←自動起動off確認</span>
sendmail       	0:off	1:off	2:off	3:off	4:off	5:off	6:off

# alternatives --config mta  <span style="color: #ff9900;">←MTA切り替え</span>
2 プログラムがあり 'mta'を提供します。

  選択       コマンド
-----------------------------------------------
*+ 1           /usr/sbin/sendmail.sendmail
   2           /usr/sbin/sendmail.postfix

Enterを押して現在の選択[+]を保持するか、選択番号を入力します:<span style="color: #ff9900;">2 ←2を選択</span>
</pre>
<pre># /etc/init.d/dovecot start    <span style="color: #ff9900;">←dovecot起動</span>
chkconfig dovecot on    <span style="color: #ff9900;">←自動起動設定</span>
# /etc/init.d/postfix start    <span style="color: #ff9900;">←postfix起動</span>
chkconfig postfix on    <span style="color: #ff9900;">←自動起動設定</span></pre>
<h3>ルーターの設定</h3>
<p>ファイアウォールなどのフィルタがある場合、25番,110番(popの場合),143番(IMAPの場合),587番ポートを通すように設定する。<br />
25番は要らない？？</p>
<h3>クライアントのメーラーの設定</h3>
<p>クライアントのメーラーの設定でSMTP認証を使う必要がある。（postfixadminで作成したuser@domain.tldと設定したパスワード）<br />
また、smtpサーバ（メール送信サーバ）のポートを587に指定する必要がある。</p>
<p>ここまでで、とりあえずのメールサーバ運用はできる。</p>
<hr />
<h2>ウィルスとスパムメール対策</h2>
<p>つづいてウィルスチェックとスパムチェックを導入する。<br />
スパムチェックとしてSpamAssassinを導入するが、メール配送（local_transport や virtual_transport）をprocmailで行わないとスパムチェックが有効にならない。<br />
このため、procmailを導入する。<br />
バーチャルドメインでのメールアカウントが主に使用するものなので、virtual_transport のみprocmailにまかせ、あまり使わない local_transport はlocalで行う（SpamAssassinは無効）。</p>
<h3>ウィルス対策</h3>
<p><a href="http://centossrv.com/clamav.shtml">アンチウィルスソフト導入(Clam AntiVirus) – CentOSで自宅サーバー構築</a>を参考にClam AntiVirusをインストールする。</p>
<p>ウィルススキャンテストまで行い、ウィルススキャン定期自動実行設定は行わない（ウィルススキャン実行スクリプトも作成しない）<br />
下記スパムメール対策のリンク先にあるが、Clam AntiVirusとPostfixが連携するように設定が必要。</p>
<h3>ウィルス対策2・スパムメール対策</h3>
<p><a href="http://centossrv.com/postfix-clamav-spamassassin.shtml">メールサーバーでウィルス&amp;スパムチェック(Postfix+Clam AntiVirus+SpamAssassin) – CentOSで自宅サーバー構築</a>を参考にClam AntiVirusとPostfixの連携、及び、SpamAssassinの設定を行う。</p>
<h3>procmailの設定</h3>
<p>/etc/procmailrcを新規作成する。<br />
バーチャルドメインでのメールアカウント保存ディレクトリは<br />
/mail/domain.tld/user@domain.tld</p>
<pre># vi /etc/procmailrc

SHELL=/bin/bash
PATH=/usr/bin:/bin
DEFAULT=/mail/$DOMAIN/$USER\@$DOMAIN/
LOCKFILE=/mail/procmail.lock
LOGFILE=/mail/procmail.log   # ログ出力先
#VERBOSE=ON   # 詳細ログ出力

# SpamAssassinによるスパムチェック
:0fw
|/usr/bin/spamc</pre>
<p>ログの肥大化を防ぐため、ログローテーション設定ファイル新規作成する。</p>
<pre># vi /etc/logrotate.d/procmail

/mail/procmail.log {
    missingok
    nocreate
    notifempty
}</pre>
<h3>Postfixとprocmailを連携させる</h3>
<h5>main.cfの設定</h5>
<p>該当箇所のみ更新</p>
<pre># vi /etc/postfix/main.cf

<span style="color: #ff9900;"># virtual_transport = virtual  ←コメントアウト
virtual_transport = procmail  ←追記

content_filter=smtp-amavis:[127.0.0.1]:10024 ←最終行に追記
</span></pre>
<h5>master.cfの設定</h5>
<pre># vi /etc/postfix/master.cf

最終行に追記
<span style="color: #ff9900;">procmail unix - n n - - pipe
  flags=R user=vuser argv=/usr/bin/procmail -t -m USER=${user} DOMAIN=${nexthop} /etc/procmailrc</span></pre>
<p>Postfixを再起動して設定を有効化</p>
<pre>/etc/rc.d/init.d/postfix restart</pre>
<h3>テストする</h3>
<p>メールを配信してみてヘッダ情報を見る。<br />
spamasassinが有効なら</p>
<blockquote><p>X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on xxx.xxxx.jp<br />
X-Spam-Level:<br />
X-Spam-Status: No, score=-0.1 required=13.0 tests=AWL,CONTENT_TYPE_PRESENT, ISO2022JP_BODY,ISO2022JP_CHARSET,X_MAILER_PRESENT autolearn=ham version=3.2.5</p></blockquote>
<p>Clam AntiVirusが有効なら</p>
<blockquote><p>X-Virus-Scanned: amavisd-new at xxxx.jp</p></blockquote>
<p>がヘッダ情報に挿入されているはず。</p>
<h3>自動メールボックス作成</h3>
<p>PostfixAdminを使ってバーチャルドメインでメールサーバを運営する場合、procmailを使うと自動でメールボックスが作成されなくなってしまう。</p>
<p>以前書いた<a href="http://perl.no-tubo.net/2009/10/15/postfixadmin-procmailな環境でメールディレクトリの作成・削除/">postfixadmin +procmailな環境でメールディレクトリの作成・削除</a>でメールディレクトリの作成、及び、削除を自動化するスクリプトを作成する。</p>
]]></content:encoded>
			<wfw:commentRss>http://perl.no-tubo.net/2011/01/06/%e3%83%a1%e3%83%bc%e3%83%ab%e3%82%b5%e3%83%bc%e3%83%90%e6%a7%8b%e7%af%89%e3%81%ae%e3%81%be%e3%81%a8%e3%82%81%ef%bc%88%e8%a4%87%e6%95%b0%e3%81%ae%e3%83%90%e3%83%bc%e3%83%81%e3%83%a3%e3%83%ab%e3%83%89/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://perl.no-tubo.net/2011/01/06/%e3%83%a1%e3%83%bc%e3%83%ab%e3%82%b5%e3%83%bc%e3%83%90%e6%a7%8b%e7%af%89%e3%81%ae%e3%81%be%e3%81%a8%e3%82%81%ef%bc%88%e8%a4%87%e6%95%b0%e3%81%ae%e3%83%90%e3%83%bc%e3%83%81%e3%83%a3%e3%83%ab%e3%83%89/" />
	</item>
		<item>
		<title>CentOS5.5に MySQL5.1 &amp;&amp; php5.3 をyumでインストール</title>
		<link>http://perl.no-tubo.net/2010/12/27/centos5-5%e3%81%ab-mysql5-1-php5-3-%e3%82%92yum%e3%81%a7%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab/</link>
		<comments>http://perl.no-tubo.net/2010/12/27/centos5-5%e3%81%ab-mysql5-1-php5-3-%e3%82%92yum%e3%81%a7%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab/#comments</comments>
		<pubDate>Mon, 27 Dec 2010 08:11:56 +0000</pubDate>
		<dc:creator>clicktx</dc:creator>
				<category><![CDATA[インストールメモ]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://perl.no-tubo.net/?p=1125</guid>
		<description><![CDATA[remiリポジトリの導入
MySQL5.1、PHP5.3 をインストール
# yum --enablerepo=remi install mysql
phpMyAdminで必要な php-mcrypt 等をインストール
 [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://perl.no-tubo.net/2010/12/27/remi-リポジトリを追加する/">remiリポジトリの導入</a></p>
<p>MySQL5.1、PHP5.3 をインストール</p>
<pre># yum --enablerepo=remi install mysql</pre>
<p>phpMyAdminで必要な php-mcrypt 等をインストール</p>
<pre># yum --enablerepo=remi install php-mcrypt php-xml</pre>
<p>httpd-devel が必要だったのでインストール</p>
<pre># yum --enablerepo=remi install httpd-devel</pre>
]]></content:encoded>
			<wfw:commentRss>http://perl.no-tubo.net/2010/12/27/centos5-5%e3%81%ab-mysql5-1-php5-3-%e3%82%92yum%e3%81%a7%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://perl.no-tubo.net/2010/12/27/centos5-5%e3%81%ab-mysql5-1-php5-3-%e3%82%92yum%e3%81%a7%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab/" />
	</item>
		<item>
		<title>remi リポジトリを追加する</title>
		<link>http://perl.no-tubo.net/2010/12/27/remi-%e3%83%aa%e3%83%9d%e3%82%b8%e3%83%88%e3%83%aa%e3%82%92%e8%bf%bd%e5%8a%a0%e3%81%99%e3%82%8b/</link>
		<comments>http://perl.no-tubo.net/2010/12/27/remi-%e3%83%aa%e3%83%9d%e3%82%b8%e3%83%88%e3%83%aa%e3%82%92%e8%bf%bd%e5%8a%a0%e3%81%99%e3%82%8b/#comments</comments>
		<pubDate>Mon, 27 Dec 2010 07:56:50 +0000</pubDate>
		<dc:creator>clicktx</dc:creator>
				<category><![CDATA[インストールメモ]]></category>
		<category><![CDATA[remi]]></category>
		<category><![CDATA[リポジトリ]]></category>

		<guid isPermaLink="false">http://perl.no-tubo.net/?p=1114</guid>
		<description><![CDATA[最新版に近いパッケージをインストール出来るようにremiリポジトリを導入する
GPGキーをインポート
# rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-re [...]]]></description>
			<content:encoded><![CDATA[<p>最新版に近いパッケージをインストール出来るようにremiリポジトリを導入する</p>
<h3>GPGキーをインポート</h3>
<pre># rpm --import http://rpms.famillecollet.com/RPM-GPG-KEY-remi</pre>
<h3>リポジトリファイルを追加</h3>
<pre># cd /etc/yum.repos.d
# wget http://rpms.famillecollet.com/remi-enterprise.repo</pre>
<h3>remi リポジトリファイルを編集</h3>
<p>常時有効（enabled=1）になっていないかチェックする。</p>
<pre># vi /etc/yum.repos.d/remi-enterprise.repo

[remi]
name=Les RPM de remi pour Enterprise Linux $releasever - $basearch
#baseurl=http://rpms.famillecollet.com/enterprise/$releasever/remi/$basearch/
mirrorlist=http://rpms.famillecollet.com/enterprise/$releasever/remi/mirror
<span style="color: #ff9900;">enabled=0        ←1なら0に変更</span>
gpgcheck=1
gpgkey=http://rpms.famillecollet.com/RPM-GPG-KEY-remi
failovermethod=priority

[remi-test]
name=Les RPM de remi en test pour Enterprise Linux $releasever - $basearch
#baseurl=http://rpms.famillecollet.com/enterprise/$releasever/test/$basearch/
mirrorlist=http://rpms.famillecollet.com/enterprise/$releasever/test/mirror
<span style="color: #ff9900;">enabled=0        ←1なら0に変更</span>
gpgcheck=1
gpgkey=http://rpms.famillecollet.com/RPM-GPG-KEY-remi</pre>
<h3>remi レポジトリを使用するには</h3>
<p><code>--enablerepo=remi</code> オプションをつけてyumを実行する</p>
<pre># yum --enablerepo=remi update</pre>
]]></content:encoded>
			<wfw:commentRss>http://perl.no-tubo.net/2010/12/27/remi-%e3%83%aa%e3%83%9d%e3%82%b8%e3%83%88%e3%83%aa%e3%82%92%e8%bf%bd%e5%8a%a0%e3%81%99%e3%82%8b/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://perl.no-tubo.net/2010/12/27/remi-%e3%83%aa%e3%83%9d%e3%82%b8%e3%83%88%e3%83%aa%e3%82%92%e8%bf%bd%e5%8a%a0%e3%81%99%e3%82%8b/" />
	</item>
	</channel>
</rss>

