<?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>Regen Press &#187; メモ</title>
	<atom:link href="http://rp.exadge.com/category/memo/feed/" rel="self" type="application/rss+xml" />
	<link>http://rp.exadge.com</link>
	<description>WordPressやPHPなどを主とするブログ</description>
	<lastBuildDate>Sun, 21 Feb 2010 14:16:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</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://rp.exadge.com/category/memo/feed/" />
		<item>
		<title>Dell Inspiron Mini 9 or 12 Ubuntu版で役にたちそうなこと</title>
		<link>http://rp.exadge.com/2009/04/21/dell-inspiron-mini-9-12-ubuntu-tips/</link>
		<comments>http://rp.exadge.com/2009/04/21/dell-inspiron-mini-9-12-ubuntu-tips/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 09:56:31 +0000</pubDate>
		<dc:creator>Regen</dc:creator>
				<category><![CDATA[メモ]]></category>
		<category><![CDATA[Dell]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://rp.exadge.com/?p=197</guid>
		<description><![CDATA[知人が Ubuntu モデルの Dell Inspiron Mini 12 を買って、ちょっと使わせてもらったときに気づいたことをメモ。
動画の音が出ない
参考：デジタルギア－奮戦記: Ubuntu音声問題の発生
「/e [...]]]></description>
			<content:encoded><![CDATA[<p>知人が Ubuntu モデルの Dell Inspiron Mini 12 を買って、ちょっと使わせてもらったときに気づいたことをメモ。</p>
<h3>動画の音が出ない</h3>
<p>参考：<a href="http://kannsai-fusimi.seesaa.net/article/107017875.html">デジタルギア－奮戦記: Ubuntu音声問題の発生</a></p>
<p>「/etc/modprobe.d/alsa-base」の「options snd-usb-caiaq index=-2」の下に「options snd-hda-intel model=dell」を追加。</p>
<h3>無線LANが認識されなくなった</h3>
<p>参考：<a href="http://ubuntuforums.org/showthread.php?t=948431">[ubuntu] Broadcom Corporation BCM4312 802.11b/g funny problem &#8211; Ubuntu Forums</a></p>
<p>echo wl | sudo tee -a /etc/modules</p>
<h3>無線LANに接続するとフリーズ(5/5 追加)</h3>
<p>参考：<a href="https://forums.ubuntulinux.jp/viewtopic.php?id=3554" class="broken_link">Ubuntu日本語フォーラム / 無線LANフリーズします</a></p>
<p>無線LANの共有キーが長すぎるとドライバのバグでシステムがフリーズしてしまう。キーを短くするとOK。</p>
<h3>その他</h3>
<p>Inspiron Mini は光学ドライブがないのでOS再インストール時に外付け光学ドライブを持ってないと厄介なわけだが、実はOS再インストール用のDVDのなかにUSBメモリ用のイメージも入っている。<br />
DVDルートにある「belmont-ym-stable-install-usb-20081121-0.img」がそれ。<br />
これを使えばUSBメモリで再インストールできる。</p>

	Tags: <a href="http://rp.exadge.com/tag/dell/" title="Dell" rel="tag">Dell</a>, <a href="http://rp.exadge.com/tag/ubuntu/" title="Ubuntu" rel="tag">Ubuntu</a><br />
]]></content:encoded>
			<wfw:commentRss>http://rp.exadge.com/2009/04/21/dell-inspiron-mini-9-12-ubuntu-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://rp.exadge.com/2009/04/21/dell-inspiron-mini-9-12-ubuntu-tips/" />
	</item>
		<item>
		<title>FirefoxでJavaがフリーズする問題の解消法</title>
		<link>http://rp.exadge.com/2008/08/06/solution-for-java-on-firefox/</link>
		<comments>http://rp.exadge.com/2008/08/06/solution-for-java-on-firefox/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 09:28:34 +0000</pubDate>
		<dc:creator>Regen</dc:creator>
				<category><![CDATA[メモ]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://rp.exadge.com/?p=93</guid>
		<description><![CDATA[実は Firefox3 にアップグレードしてから Java が含まれているページを開くと、フリーズしたりタブが閉じられなくなったりといった問題が起きていたんですが、FirefoxがJAVA実行できない &#8211; 覚 [...]]]></description>
			<content:encoded><![CDATA[<p>実は Firefox3 にアップグレードしてから Java が含まれているページを開くと、フリーズしたりタブが閉じられなくなったりといった問題が起きていたんですが、<a href="http://d.hatena.ne.jp/teiiz/20071223/1198429603">FirefoxがJAVA実行できない &#8211; 覚え書き</a>に解決法がありました。</p>
<p>about:config を開いてplugin.scan.SunJRE という名前で文字列形の設定を作り、値を 1.3 にします。後は再起動。</p>
<p>コメント欄を見ると結構同じような問題に出くわしている人多いのかも。</p>

	Tags: <a href="http://rp.exadge.com/tag/firefox/" title="Firefox" rel="tag">Firefox</a>, <a href="http://rp.exadge.com/tag/java/" title="Java" rel="tag">Java</a><br />
]]></content:encoded>
			<wfw:commentRss>http://rp.exadge.com/2008/08/06/solution-for-java-on-firefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://rp.exadge.com/2008/08/06/solution-for-java-on-firefox/" />
	</item>
		<item>
		<title>WordPress.orgへプラグインの公開の仕方</title>
		<link>http://rp.exadge.com/2008/07/15/how-to-releasewp-plugin/</link>
		<comments>http://rp.exadge.com/2008/07/15/how-to-releasewp-plugin/#comments</comments>
		<pubDate>Tue, 15 Jul 2008 10:45:35 +0000</pubDate>
		<dc:creator>Regen</dc:creator>
				<category><![CDATA[メモ]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://rp.exadge.com/?p=73</guid>
		<description><![CDATA[自分用もあって忘れないために WordPress.org へプラグインの公開の仕方をメモ。プラグインの作り方ではなく公開の仕方限定。
必要な知識

PHP &#8211; WordPress 自体が PHP なのでこれは [...]]]></description>
			<content:encoded><![CDATA[<p>自分用もあって忘れないために WordPress.org へプラグインの公開の仕方をメモ。プラグインの作り方ではなく公開の仕方限定。</p>
<h3>必要な知識</h3>
<ul>
<li>PHP &#8211; WordPress 自体が PHP なのでこれは必須</li>
<li>WordPress &#8211; WordPress のプラグインを書くためには WordPress の内部構造などを知っていないと難しい</li>
<li>Subversion &#8211; WordPress.org は各種プラグインを SVN で管理している</li>
</ul>
<h3>プラグイン作った。次は？</h3>
<ol>
<li>WordPress.org のアカウントを持っていなければ取得</li>
<li><a href="http://wordpress.org/extend/plugins/add/">WordPress › Requests</a> にて、プラグインの名前と説明と任意でプラグインのアドレスを書いてリクエスト送信</li>
<li>リクエストが承認されると Subversion のアドレスが送られてくるので、そのリポジトリにプラグインをインポート</li>
<li>適切な readme.txt を作り、プラグインの本体ファイルに適切なコメントをつける（後述）</li>
<li>リリースバーションごとに readme.txt などを編集し、SVN のタグ付けをする（後述）</li>
<li>WordPress.org が15分毎に巡回してくれて、正しくコメントが付けられていればプラグインディレクトリーに掲載される</li>
</ol>
<h3>readme.txt とコメントとは？</h3>
<p>WordPress.org はプラグインの更新のチェックに trunk/readme.txt と本体ファイルのコメントを使用する。<br />
readme.txt は書式が決まっていて、<a href="http://wordpress.org/extend/plugins/about/readme.txt">readme.txt の例</a>を参照。<a href="http://wordpress.org/extend/plugins/about/validator/">WordPress/BBPress Plugin readme.txt Validator</a> を使用すればバリデートできる。<br />
本体ファイルのコメントは、PHPファイルの先頭に次のようなコメントを書く。</p>
<div class="php" style="font-family: 'Courier New', Courier, monospace, mono;"><span class="coMULTI">/*<br />
Plugin Name: Example Plugin<br />
Plugin URI: http://example.com/foo<br />
Description: This plugin is an example.<br />
Version: 1.0<br />
Author: Bar<br />
Author URI: http://example.com<br />
*/</span></div>
<p>他のプラグインを参考にすれば大体OK。</p>
<h3>プラグインをリリースしたい</h3>
<p>プラグインのリリースは SVN のタグ付けを使う。<br />
readme.txt と 本体ファイルのコメントのそれぞれ Stable tag と Version の項目をリリースするバージョンにあわせる。<br />
必要なファイルを編集したら SVN でタグ付け。タグ名は数字とピリオドのみを使ったほうが良いと公式のドキュメントには書いてある（1.2.3はOK、ver1.2RC1などはNG← 実際は可能）。<br />
あとは巡回で更新が認識されればプラグインディレクトリーに載る。</p>
<h3>参考になるドキュメント</h3>
<ul>
<li><a href="http://wordpress.org/extend/plugins/about/">WordPress › WordPress Plugins</a> 以下のドキュメント</li>
</ul>

	Tags: <a href="http://rp.exadge.com/tag/subversion/" title="Subversion" rel="tag">Subversion</a>, <a href="http://rp.exadge.com/tag/wordpress/" title="WordPress" rel="tag">WordPress</a><br />
]]></content:encoded>
			<wfw:commentRss>http://rp.exadge.com/2008/07/15/how-to-releasewp-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://rp.exadge.com/2008/07/15/how-to-releasewp-plugin/" />
	</item>
		<item>
		<title>trac-post-commit-hookをDreamHostで使う</title>
		<link>http://rp.exadge.com/2008/06/08/trac-hook-at-dreamhost/</link>
		<comments>http://rp.exadge.com/2008/06/08/trac-hook-at-dreamhost/#comments</comments>
		<pubDate>Sun, 08 Jun 2008 06:12:27 +0000</pubDate>
		<dc:creator>Regen</dc:creator>
				<category><![CDATA[メモ]]></category>
		<category><![CDATA[DreamHost]]></category>
		<category><![CDATA[Trac]]></category>

		<guid isPermaLink="false">http://rp.exadge.com/?p=70</guid>
		<description><![CDATA[SVNのログでチケットの操作ができるとっても便利なtrac-post-commit-hookですが、DreamHostで使うには難がありました。
最大の難点は post-commit が dhapacheというユーザーで [...]]]></description>
			<content:encoded><![CDATA[<p>SVNのログでチケットの操作ができるとっても便利なtrac-post-commit-hookですが、DreamHostで使うには難がありました。<br />
最大の難点は post-commit が dhapacheというユーザーで実行されるということで、これが数々の問題を引き起こします。<br />
色々と実験して解決策を見つけたのでポストします。<br />
なお、解決策は SQLite を使っている場合と MySQL を使っている場合で異なります。</p>
<h3>SQLite と MySQL の共通 post-commit</h3>
<p>コミット後にスクリプトを実行するため、/home/***/svn/<em>projectid</em>/hooks に post-commit という名前のファイルを作成します。<br />
このファイルがコミット後に実行されるわけですが、dhapache によって実行されるため環境変数の再設定が必要になります。<br />
それなので、.bash_profile などから必要な変数をコピーします。<br />
そして、trac のソースの contrib ディレクトリから trac-post-commit-hook を post-commit と同じディレクトリにコピーします。<br />
さらに<a href="http://vimrc.hp.infoseek.co.jp/svn_commit_jp.html">svn_commit_jp.md</a>から svnlog2utf8 を取得してパスの通るところに置いて実行権を与えます。</p>
<p>post-commitの例(パスなどは適宜変えてください):</p>
<div class="bash" style="font-family: 'Courier New', Courier, monospace, mono;"><span class="re3">#!/bin/sh</span></p>
<p><span class="re2">HOME=</span><span class="st0">&#8216;/home/***&#8217;</span><br />
<span class="kw3">export</span> <span class="re2">PYTHONPATH=</span><span class="st0">&quot;$HOME/local/lib/python: $HOME/local/lib/python/site-packages&quot;</span><br />
<span class="kw3">export</span> <span class="re2">LD_LIBRARY_PATH=</span><span class="st0">&quot;$HOME/local/lib&quot;</span><br />
<span class="kw3">export</span> <span class="re2">PYTHON_EGG_CACHE=</span><span class="st0">&quot;$HOME/tmp&quot;</span><br />
<span class="kw3">export</span> <span class="re2">PATH=</span><span class="st0">&quot;$HOME/local/bin:$PATH&quot;</span></p>
<p><span class="re2">REPOS=</span><span class="st0">&quot;$1&quot;</span><br />
<span class="re2">REV=</span><span class="st0">&quot;$2&quot;</span></p>
<p><span class="re2">LOG=</span>`svnlook log -r <span class="re1">$REV</span> <span class="re1">$REPOS</span> | svnlog2utf8`<br />
<span class="re2">AUTHOR=</span>`svnlook author -r <span class="re1">$REV</span> <span class="re1">$REPOS</span> | svnlog2utf8`<br />
<span class="re2">TRAC_ENV=</span><span class="st0">&quot;$HOME/trac_sites/projectid/&quot;</span><br />
<span class="re2">TRAC_URL=</span><span class="st0">&quot;http://trac.example.com/projectid/&quot;</span></p>
<p>python <span class="re1">$REPOS</span>/hooks/trac-post-commit-hook \<br />
&nbsp; -p <span class="st0">&quot;$TRAC_ENV&quot;</span> &nbsp;\<br />
&nbsp; -r <span class="st0">&quot;$REV&quot;</span> &nbsp; &nbsp; &nbsp; \<br />
&nbsp; -u <span class="st0">&quot;$AUTHOR&quot;</span> &nbsp; &nbsp;\<br />
&nbsp; -m <span class="st0">&quot;$LOG&quot;</span> &nbsp; &nbsp; &nbsp; \<br />
&nbsp; -s <span class="st0">&quot;$TRAC_URL&quot;</span></div>
<h3>SQLiteの場合</h3>
<p>SQLiteの場合は dhapache が trac のディレクトリの /db/trac.db(デフォルト) へアクセスする権限を持っていないため、エラーになります。<br />
この場合は trac.db　に「chmod o+rw」するしか方法がないと思います。書き込み権限を与えるのはやだなと思うときはMySQLの移行も考えてください(MySQLへのパスワードも dhapache が読み取れる必要があるので同じっていえば同じですが)。</p>
<h3>MySQLの場合</h3>
<p>MySQLの場合は、上で設定した「PYTHON_EGG_CACHE」の値が dhapache が書き込みできるディレクトリを指定していて、trac.ini を読み込めればOKです。</p>
<h3>SQLite から MySQLへの移行</h3>
<p>SQLite から MySQLへの移行は <a href="http://trac-hacks.org/wiki/SqliteToPgScript">SqliteToPgScript</a> を使うと便利です。<br />
SqliteToPgScript でMySQLインポートしたら、trac.ini の database の指定を「mysql://user:password@host/database」のようにすればOKです。</p>

	Tags: <a href="http://rp.exadge.com/tag/dreamhost/" title="DreamHost" rel="tag">DreamHost</a>, <a href="http://rp.exadge.com/tag/trac/" title="Trac" rel="tag">Trac</a><br />
]]></content:encoded>
			<wfw:commentRss>http://rp.exadge.com/2008/06/08/trac-hook-at-dreamhost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://rp.exadge.com/2008/06/08/trac-hook-at-dreamhost/" />
	</item>
		<item>
		<title>ffdshowでデインターレース</title>
		<link>http://rp.exadge.com/2008/04/14/ffdshow-deinterlacing/</link>
		<comments>http://rp.exadge.com/2008/04/14/ffdshow-deinterlacing/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 13:44:29 +0000</pubDate>
		<dc:creator>Regen</dc:creator>
				<category><![CDATA[メモ]]></category>
		<category><![CDATA[ffdshow]]></category>
		<category><![CDATA[MediaPlayerClassic]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://rp.exadge.com/2008/04/14/ffdshow-deinterlacing/</guid>
		<description><![CDATA[普段動画の再生にはffdshow+MediaPlayerClassicを利用しているのですが、新しいPCでDVDを見たらインターレースかかりまくりで酷かったのでデインターレースしようと思ったのですが、予想外に苦戦したので [...]]]></description>
			<content:encoded><![CDATA[<p>普段動画の再生にはffdshow+MediaPlayerClassicを利用しているのですが、新しいPCでDVDを見たらインターレースかかりまくりで酷かったのでデインターレースしようと思ったのですが、予想外に苦戦したのでメモしておきます。</p>
<p>まずはビデオデコーダーの設定画面を出します。そしてCodecsのmpeg2の項目のコーデックをlibmpeg2へ変更。<ins datetime="2008-04-17T13:24:07+00:00">追記：下のDVD decodingにチェックを入れないとDVDを処理してくれないみたいです。</ins></p>
<p>そしてDeinterlacingの設定画面に移動してDeinterlacingにチェックを入れます。ここで手こずったのですが、Methodを「ffmpeg deinterlacer」にしておきます。コレにしたらうまくいきました。<img src="/wordpress/wp-content/uploads/2008/04/ffdshow_option.jpg" alt="ffdshow option window" title="ffdshow option window" width="454" height="382" /></p>
<p>前のPCじゃ特別いじってないのにデインターレースされていたのは何でだろう？</p>

	Tags: <a href="http://rp.exadge.com/tag/ffdshow/" title="ffdshow" rel="tag">ffdshow</a>, <a href="http://rp.exadge.com/tag/mediaplayerclassic/" title="MediaPlayerClassic" rel="tag">MediaPlayerClassic</a>, <a href="http://rp.exadge.com/tag/windows/" title="Windows" rel="tag">Windows</a><br />
]]></content:encoded>
			<wfw:commentRss>http://rp.exadge.com/2008/04/14/ffdshow-deinterlacing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://rp.exadge.com/2008/04/14/ffdshow-deinterlacing/" />
	</item>
		<item>
		<title>DreamHost移行メモ part4(WordPress)</title>
		<link>http://rp.exadge.com/2008/03/03/dreamhost-memo-4/</link>
		<comments>http://rp.exadge.com/2008/03/03/dreamhost-memo-4/#comments</comments>
		<pubDate>Mon, 03 Mar 2008 07:17:27 +0000</pubDate>
		<dc:creator>Regen</dc:creator>
				<category><![CDATA[メモ]]></category>
		<category><![CDATA[DreamHost]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://rp.exadge.com/2008/03/03/dreamhost-memo-4/</guid>
		<description><![CDATA[さて、4ポスト目でやっとWordPressの引越しです（WordPressのエンコードはUTF-8を想定しています）。
まずはWordPressの本体ファイルの移動です。これは元ディレクトリを圧縮してDreamHost側 [...]]]></description>
			<content:encoded><![CDATA[<p>さて、4ポスト目でやっとWordPressの引越しです（WordPressのエンコードはUTF-8を想定しています）。</p>
<p>まずはWordPressの本体ファイルの移動です。これは元ディレクトリを圧縮してDreamHost側で展開しました。新しくDreamHostの方でインストールしたものに上書きしてもよかったのですが、コアファイルに色々と手を加えていて面倒くさいので元のデータをそのまま送っちゃいました。</p>
<p>次は、データベース。これが厄介で苦労しました。まず、コントロールパネルでデータベースを作成します。そうしたら、phpMyAdminかMySQLクライアントを使い、作成したデータベースに以下のSQLを発行します。</p>
<div class="sql" style="font-family: 'Courier New', Courier, monospace, mono;"><span class="kw1">ALTER</span> <span class="kw1">DATABASE</span> database_name CHARACTER <span class="kw1">SET</span> utf8;</div>
<p>database_nameは置き換えてください。そして、元のWordPressのデータベースをダンプします。その後、ダンプしたSQLファイルの先頭に次の分を追加します。コレ重要。</p>
<div class="php" style="font-family: 'Courier New', Courier, monospace, mono;">set names utf8;</div>
<p>この文を入れないと復元した時に文字化けを起こします。修正したSQLを新しいデータベースに適応します。</p>
<p>次にphpMyAdminを使って復元したデータベースのwp_optionsテーブルのoption_nameカラムのsiteurlとhome（option_idは1と40）のoption_valueを新しいURLにセットします。</p>
<p>最後にwp-config.phpのデータベースの設定を新しいものに書き換えれば終了です。これでWordPressの管理画面にアクセスできます。</p>
<p>私の場合はこの作業だけで正常に動いたため、問題ありませんでしたが、プラグインが問題を起こす場合もあるので、そのときはプラグインをはずして1つずつ調べていく必要があるかもしれません。</p>
<p>また、プラグインや外部サービスの設定で前のURLを引きずっているものがある場合は新しいURLにセットしなおす必要があります。私が修正したものを挙げておきます。</p>
<ul>
<li>XML Sitemap Generatorの設定変更</li>
<li>WP-SlimStat-ExのGeo SlimStat（APIキー変更）</li>
<li>FeedBurnerのURL変更</li>
<li>ImageManagerのパス変更</li>
<li>ダウンロード系プラグイン</li>
<li>QRコード</li>
</ul>
<p>その他、前の環境の設定のままのものは変更しておきます。これでWordPressの引越しは完了です。</p>

	Tags: <a href="http://rp.exadge.com/tag/dreamhost/" title="DreamHost" rel="tag">DreamHost</a>, <a href="http://rp.exadge.com/tag/mysql/" title="MySQL" rel="tag">MySQL</a>, <a href="http://rp.exadge.com/tag/wordpress/" title="WordPress" rel="tag">WordPress</a><br />
]]></content:encoded>
			<wfw:commentRss>http://rp.exadge.com/2008/03/03/dreamhost-memo-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://rp.exadge.com/2008/03/03/dreamhost-memo-4/" />
	</item>
		<item>
		<title>DreamHost移行メモ part3</title>
		<link>http://rp.exadge.com/2008/03/01/dreamhost-memo-3/</link>
		<comments>http://rp.exadge.com/2008/03/01/dreamhost-memo-3/#comments</comments>
		<pubDate>Sat, 01 Mar 2008 08:44:51 +0000</pubDate>
		<dc:creator>Regen</dc:creator>
				<category><![CDATA[メモ]]></category>
		<category><![CDATA[DreamHost]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://rp.exadge.com/2008/03/01/dreamhost-memo-3/</guid>
		<description><![CDATA[今回はPHP5 FastCGI &#038; PHP.ini のための設定です。WikiではCustom PHP.iniとPHP FastCGIに分かれていますが一緒にやっちゃいます。もちろん、パネルでFastCGIをオ [...]]]></description>
			<content:encoded><![CDATA[<p>今回はPHP5 FastCGI &#038; PHP.ini のための設定です。Wikiでは<a href="http://wiki.dreamhost.com/Custom_PHP.ini">Custom PHP.ini</a>と<a href="http://wiki.dreamhost.com/PHP_FastCGI">PHP FastCGI</a>に分かれていますが一緒にやっちゃいます。もちろん、パネルでFastCGIをオンにしておきます。</p>
<p>最初にPHPのコピーを置くフォルダを作ります。WikiのCustom PHP.ini ではドメインのディレクトリの下に置いてますが、複数サイトで共有しようとおもうのでホームに作ります。</p>
<div class="bash" style="font-family: 'Courier New', Courier, monospace, mono;"><span class="kw2">mkdir</span> <span class="re1">$HOME</span>/cgi-bin</div>
<p>そして関連ファイルをコピーします。</p>
<div class="bash" style="font-family: 'Courier New', Courier, monospace, mono;"><span class="kw2">cp</span> /dh/cgi-system/php5.cgi <span class="re1">$HOME</span>/cgi-bin/php5.cgi<br />
<span class="kw2">cp</span> /etc/php5/cgi/php.ini <span class="re1">$HOME</span>/cgi-bin/php.ini</div>
<p>コピーした先のphp.iniを編集します。編集内容はお好みで。そして、ファイルの最後の方にでも「<strong>date.timezone=&#8221;Asia/Tokyo&#8221;</strong>」の記述を入れます。これでPHPがタイムゾーンを日本と認識してくれます。</p>
<p>ここからFastCGIの設定です。まずはFastCGIのラッパーを作ります。php5-wrapper.fcgiという名前でドメインのディレクトリごとに配置します。Wikiではdispatch.fcgiにするとメモリーを多く使ってもkillされなくなると書いてあります（このWordPessはphp5-wrapper.fcgiでもkillされません。よほどのことがないとkillされない模様。）。中身は以下のようにします。</p>
<div class="bash" style="font-family: 'Courier New', Courier, monospace, mono;"><span class="re3">#!/bin/sh</span><br />
<span class="kw3">export</span> <span class="re2">PHP_FCGI_CHILDREN=</span><span class="nu0">2</span><br />
<span class="kw3">exec</span> /home/username/cgi-bin/php5.cgi</div>
<p>usernameは置き換えてください。作成したら実行権を与えます。</p>
<div class="bash" style="font-family: 'Courier New', Courier, monospace, mono;"><span class="kw2">chmod</span> u+x php5-wrapper.fcgi</div>
<p>そしてドメインのディレクトリのルートに以下の.htaccessを用意します。</p>
<div class="apache" style="font-family: 'Courier New', Courier, monospace, mono;"><span class="kw1">AddHandler</span> fastcgi-<span class="kw1">script</span> fcg fcgi fpl<br />
<span class="kw1">AddHandler</span> php5-fastcgi .php<br />
<span class="kw1">Action</span> php5-fastcgi /php5-wrapper.fcgi</div>
<p>これでPHP5&#038;FastCGIで動くようになります。</p>
<p>最後にPHPのバイナリをアップデートするcronを回します。適当な場所にphp-copy.shとでもして以下のファイルを作成します。</p>
<div class="bash" style="font-family: 'Courier New', Courier, monospace, mono;"><span class="re3">#!/bin/sh</span><br />
<span class="re2">CGIFILE=</span><span class="st0">&quot;$HOME/cgi-bin/php5.cgi&quot;</span><br />
rsync -a /dh/cgi-system/php5.cgi <span class="st0">&quot;$CGIFILE&quot;</span></div>
<p>あとは crontab -e で「@weekly /home/username/php-copy.sh」などとしておきます。</p>
<p>これでPHPに関する設定は完了です。次はWordPressの引越しをメモします。</p>

	Tags: <a href="http://rp.exadge.com/tag/dreamhost/" title="DreamHost" rel="tag">DreamHost</a>, <a href="http://rp.exadge.com/tag/php/" title="PHP" rel="tag">PHP</a><br />
]]></content:encoded>
			<wfw:commentRss>http://rp.exadge.com/2008/03/01/dreamhost-memo-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://rp.exadge.com/2008/03/01/dreamhost-memo-3/" />
	</item>
		<item>
		<title>DreamHost移行メモ part2</title>
		<link>http://rp.exadge.com/2008/02/25/dreamhost-memo-2/</link>
		<comments>http://rp.exadge.com/2008/02/25/dreamhost-memo-2/#comments</comments>
		<pubDate>Mon, 25 Feb 2008 11:00:01 +0000</pubDate>
		<dc:creator>Regen</dc:creator>
				<category><![CDATA[メモ]]></category>
		<category><![CDATA[DreamHost]]></category>

		<guid isPermaLink="false">http://rp.exadge.com/2008/02/25/dreamhost-memo-2/</guid>
		<description><![CDATA[さてpart1に続いてサイトの設定を行っていきます。
まず私がやったのは、管理パネルで Domains -&#62; Manage Domains -&#62; Add New Domain / Sub-Domain からサ [...]]]></description>
			<content:encoded><![CDATA[<p>さて<a href="http://rp.exadge.com/2008/02/23/dreamhost-memo-1/">part1</a>に続いてサイトの設定を行っていきます。</p>
<p>まず私がやったのは、管理パネルで Domains -&gt; Manage Domains -&gt; Add New Domain / Sub-Domain からサブドメインを追加しました。最初は申し込み時に指定したドメインがリストに入っていると思います。初期設定はPHPのバーションが4になっているので注意してください。</p>
<p>次にSSHアカウントを設定します。Users -&gt; Manage Users でユーザーを選択または作成して設定画面に入り、User Account Type:の項目をShell accountに変えます。<br />
<img src="/wordpress/wp-content/uploads/2008/02/user_setting.png" alt="Change user setting" title="Change user setting" width="480" height="93" border="0" /><br />
シェルはお好みで。</p>
<p>これで、SSHでアクセスできるようになるのでSSHでの設定を行います。管理パネルにはメールやMySQLなど他の設定もありますので、一通り見ておくといいでしょう。</p>
<p>私はbashを使っていますのでbash固有の設定になるところもあるかと思いますが、SSHで行ったことをメモしておきます。</p>
<p>まずは.bash_profileを書き換え。.bashrc、.aliasは使えないみたい？です。</p>
<div class="bash" style="font-family: 'Courier New', Courier, monospace, mono;"><span class="kw3">export</span> <span class="re2">TZ=</span><span class="st0">&#8216;Asia/Tokyo&#8217;</span><br />
<span class="kw3">export</span> <span class="re2">LANG=</span><span class="st0">&#8216;ja_JP&#8217;</span><br />
<span class="kw3">export</span> <span class="re2">EDITOR=</span><span class="st0">&#8216;/usr/bin/vim&#8217;</span></div>
<p>こんな感じにしました。LANGは効果があるのか不明ですが、TZはタイムゾーンをあわせるのに重要です（php.iniのところでも設定します）。WordPress移行のところで後述しますが、<strong>サーバーがアメリカにあるため、タイムゾーンを日本に正しく設定しておかなければなりません</strong>。EDITORは crontab -e でvimを起動するためのものです。</p>
<p>次はDreamHost Wikiに書いてあることを行っていきますが、記事が長くなるのでポストを分けます。</p>

	Tags: <a href="http://rp.exadge.com/tag/dreamhost/" title="DreamHost" rel="tag">DreamHost</a><br />
]]></content:encoded>
			<wfw:commentRss>http://rp.exadge.com/2008/02/25/dreamhost-memo-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://rp.exadge.com/2008/02/25/dreamhost-memo-2/" />
	</item>
		<item>
		<title>DreamHost移行メモ part1</title>
		<link>http://rp.exadge.com/2008/02/23/dreamhost-memo-1/</link>
		<comments>http://rp.exadge.com/2008/02/23/dreamhost-memo-1/#comments</comments>
		<pubDate>Sat, 23 Feb 2008 04:37:56 +0000</pubDate>
		<dc:creator>Regen</dc:creator>
				<category><![CDATA[メモ]]></category>
		<category><![CDATA[DreamHost]]></category>

		<guid isPermaLink="false">http://rp.exadge.com/2008/02/23/dreamhost-memo-1/</guid>
		<description><![CDATA[DreamHost移行メモっていうことで、移行の過程をまとめていきます。
まずは、新しくドメインを取りました。これはVALUE DOMAINで取得。今までダイナミックDNSでやっていたので新しくドメインを取る必要があった [...]]]></description>
			<content:encoded><![CDATA[<p>DreamHost移行メモっていうことで、移行の過程をまとめていきます。</p>
<p>まずは、新しくドメインを取りました。これはVALUE DOMAINで取得。今までダイナミックDNSでやっていたので新しくドメインを取る必要があったのと、自分のドメインを持ちたかったからです。ドメインの取得の過程は割愛します。</p>
<p>そしていよいよDreamHost。9.95$/月（1年契約）で</p>
<ul>
<li>ストレージ500GB</li>
<li>月間転送量制限 5TB</li>
<li>ドメイン1個無料、サブドメイン無制限・・・</li>
<li>PHP、SSH、MySQL、メール･･･</li>
<li>ストリーミング対応、Jabberサーバー･･･</li>
</ul>
<p>というかなり豪華なメニューになっています。これ以外にもかなり機能があるのでチェックしてみてください。</p>
<p>さて、DreamHostの申し込み手順は<a href="http://iisaba.com/">DreamHostのカタチ　～良い鯖．com～</a>さんが詳しく解説されています。それなので、申し込み後の注意点をメモしていきます。</p>
<p>まず、申し込み直後からコントロールパネルに入れますが、お金関係やユーザーの登録が完了していないときは設定を変えたりなどはできません。***のユーザーが使えるようになったよなど、順次メールがきます。私が受信したのは、受信順に、</p>
<ul>
<li>DreamHost Account Approval Notification!（アカウントが承認されたよ！）</li>
<li>DreamHost Google Checkout Payment Receipt（Google Checkoutのレシート）</li>
<li>DreamHost Shell Account Activated（シェルアカウントが有効化されたよ）（シェル機能を有効にした時のみの様子）</li>
<li>DreamHost Mail Account Activated（メールアカウントが有効化されたよ）</li>
</ul>
<p>です。無事に承認されれば設定をいじれるようになります。</p>
<p>次は具体的な設定をメモします。</p>

	Tags: <a href="http://rp.exadge.com/tag/dreamhost/" title="DreamHost" rel="tag">DreamHost</a><br />
]]></content:encoded>
			<wfw:commentRss>http://rp.exadge.com/2008/02/23/dreamhost-memo-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://rp.exadge.com/2008/02/23/dreamhost-memo-1/" />
	</item>
	</channel>
</rss>
