<?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>pblo</title>
	<atom:link href="http://blog.playispeace.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.playispeace.com</link>
	<description>ぴーぶろ</description>
	<lastBuildDate>Tue, 01 May 2012 13:21:17 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>大阪node学園三時限目に参加してきた</title>
		<link>http://blog.playispeace.com/634/node_gakuen_3genme/</link>
		<comments>http://blog.playispeace.com/634/node_gakuen_3genme/#comments</comments>
		<pubDate>Sat, 28 Apr 2012 16:06:40 +0000</pubDate>
		<dc:creator>papettoTV</dc:creator>
				<category><![CDATA[イベント]]></category>

		<guid isPermaLink="false">http://blog.playispeace.com/?p=634</guid>
		<description><![CDATA[こちらのイベントに参加してきました。大阪node学園三時限目。(ハッシュタグ #ong3) 今回のテーマはSocket.IO ハンズオン形式のイベントで、実際に手を動かしながらものを作っていく形です。時系列でつらつら作業ログを残していきます。 Socket.IO を使ってみるハンズオン 事前準備 atndに書かれている状態まで準備していきました。 いろいろとインストール方法はあるようですが、私は、ここからpkgファイルをDLしてインストールしました。 あと、nodebrewというのも入れておきました。 curl https://raw.github.com/hokaccha/nodebrew/master/nodebrew &#124; perl &#45; setup まずは 今回チャットアプリを作るので、その作業用のディレクトリを作成して、そこから mkdir chat cd chat npm install socket.io supervisorというものをインストール。環境によってはsudoで実行する必要があるようです。 npm install -g supervisor で、ここを参考にhttp://socket.io/#how-to-use app.jsとindex.html　を作成 supervisor app.js を叩きます。で、画面の出力が止まればいいのですが、 DEBUG: Starting child process with &#8216;node app.js&#8217; info: socket.io started warn: error raised: Error: listen EACCES DEBUG: Program app.js exited <a href='http://blog.playispeace.com/634/node_gakuen_3genme/'>[...]</a>]]></description>
		<wfw:commentRss>http://blog.playispeace.com/634/node_gakuen_3genme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>サーバのリプレースが上手くいくおまじない</title>
		<link>http://blog.playispeace.com/586/incantation_of_server_replac/</link>
		<comments>http://blog.playispeace.com/586/incantation_of_server_replac/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 09:31:49 +0000</pubDate>
		<dc:creator>papettoTV</dc:creator>
				<category><![CDATA[tips]]></category>
		<category><![CDATA[サーバ]]></category>

		<guid isPermaLink="false">http://blog.playispeace.com/?p=586</guid>
		<description><![CDATA[昨日の深夜のサーバリプレースを一人でやりきったpapettoTVです。こんにちわ。 結局、昼過ぎまで落ち着かず、リプレースには魔物が棲んでたということで、もう魔物に襲われないようおまじないを唱えておきます。 リプレースって？ サーバAで動いてたwebサービスをサーバBに移すこと。新規でサービスを公開するのとは違って、既にユーザもいるしコンテンツも貯まった状態でのサーバの切り替えなので、いかにユーザに迷惑をかけずに（＝止める時間を短くするか）が勝負です。 止めずに出来るのがもちろん理想ですが、なかなか難しいところ。 リプレース作業 まずリプレースでやることを大まかに リプレースによるサービス一時停止の告知 リプレース先のサーバ環境構築 メンテナンス画面作成 ソースの移行（プログラム、htmlやcss等のコンテンツ、生成されたデータを含む） DBサーバの移行 動作検証 DNS切り替え（新サーバで公開） リプレースによるサービス一時停止の告知 ついついリプレース作業そのもののに集中しがちですが、こちらも大事。 慌てて思い出してバタバタしないように、リプレースの話があがったらまず意識する。 リプレース先のサーバ環境構築 新しいサーバBは何のアクセスも無いので、事前に準備する 可能な限りサーバAと同じ環境（特にソフトウェアのversion）にする バージョンアップさせたい気持ちは、、、分かる、、、分かるけど、、、ぐっ！！とこらえる。軽い気持ちでversionあげたら、はい、それでメンテ時間延びたー リプレースの要件等でどうしてもバージョン違いをインストールする場合は、事前に同じ動作できるか要検証サイト全体を見直すつもりで要検証 httpd.confは同じにした？ GDは入ってる？jpegだけ抜けてない？実はImageMagic入ってた・・・とか無い？ APCは？ DBの文字コード、エンジンは同じにした？ メールサーバの設定はOK？プログラムとの連携とれてる？ メンテナンス画面作成 サーバBにコンテンツを移して動作検証するまで、コンテンツの更新を止めないとデータの移行が出来ません。その間ユーザはサーバAのメンテナンス画面で耐えてもらいます。 メンテナンス終了時刻も書いておきましょう。安心してまた来てもらうために。（作業側としてはプレッシャーですけどね！ ソースの移行を済ませる rsync が使えるとパーミションもそのままでコマンド一発で移行完了するので非常に楽。 rsync -avz -e ssh remote_user@remote_host:/path/to/dir_or_file/ /path/to/host_dir_or_file/ remote側の指定が「/」無しで終わってるとそのディレクトリ毎同期する sshでremoteサーバに接続するので、事前に鍵認証しておくと、パスワード聞かれないので楽 ユーザは、元サーバと同じIDになるだけなので、同じ（名前の）ユーザになるとは限らないので注意 予め環境構築時にこの辺を意識しておくと吉 当然移行後はあらたなソースの更新は、リプレースが終わるまでしない。しないようスケジュールしておく。 さ、ここまではメンテナンス入る前に準備できるので、きっちり確実にすること。 ここでの作業の漏れは、メンテ時間の延長にもろに響くので非常に大事。 ただし、ここからはメンテ中にしかできない作業なので、事前に作業をきっちり詳細まで妄想して分単位でスケジュールを立てて置くこと。 DBサーバの移行 メンテタイムに入ったら、さっさとdumpして突っ込む。 mysqldump -u username -ppassword &#45;&#45;databases db_name <a href='http://blog.playispeace.com/586/incantation_of_server_replac/'>[...]</a>]]></description>
		<wfw:commentRss>http://blog.playispeace.com/586/incantation_of_server_replac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>titanium mobile1.8.0.1 でandroid2.2 だとファイルアップロードできない件</title>
		<link>http://blog.playispeace.com/562/file_upload_error_occured_titanium-mobile1-8-0-1_andandroid2-2/</link>
		<comments>http://blog.playispeace.com/562/file_upload_error_occured_titanium-mobile1-8-0-1_andandroid2-2/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 08:01:56 +0000</pubDate>
		<dc:creator>papettoTV</dc:creator>
				<category><![CDATA[Titanium]]></category>

		<guid isPermaLink="false">http://blog.playispeace.com/?p=562</guid>
		<description><![CDATA[ファイルを単純にPOSTするのができなかったので、調べた内容をメモ 結論 色々調べて結果から言うと、現状1.8.0.1のバグとして認識されているようです。 http://jira.appcelerator.org/browse/TIMOB-6411 Fix Version/s:Sprint 2012-02 って書いてあるから、2月にはfix予定かな？ でも2月の頭なのか末なのか・・・気になるところ。 調べたこと まず、android実機で赤い画面でエラーが発生。iOSでは出ない。その内容は Uncaught Error: org.apache.http.entity.mime.content.FileBody で、これでググって見つかったのが、以下のページ http://developer.appcelerator.com/question/130194/httpclient&#45;&#45;send-file-on-android-problem で、TIMOB-6973にログしたよって書いてあるのに、それに気づかず、その下にtry catchしてみ？って書いてたので、実施。 var xhr = Ti.Network.createHTTPClient(); xhr.open('POST', url); try{ xhr.send({media:image}); }catch(e){ alert(e.message); } sendのところをtry catchして出たメッセージが org.apache.http.entity.mime.content.FileBody と、ここで、TIMOB-6973この存在に気づいて見てみる。 すると今度は TIMOB-6411と重複してまっせって書いてあるので、そこでようやく結論に書いたリンクにたどり着きました。 うーん、今月中にリリースしたいんやけど、どうするべ。。。Titanium mobile1.7.5はTIMOB-6973によると大丈夫っぽいので、SDKのversion下げるのが現実的かなー。。。]]></description>
		<wfw:commentRss>http://blog.playispeace.com/562/file_upload_error_occured_titanium-mobile1-8-0-1_andandroid2-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>postfixでランダムなアカウントに対応させる</title>
		<link>http://blog.playispeace.com/554/postfix_random_mailaddress_setup/</link>
		<comments>http://blog.playispeace.com/554/postfix_random_mailaddress_setup/#comments</comments>
		<pubDate>Wed, 14 Dec 2011 12:04:35 +0000</pubDate>
		<dc:creator>papettoTV</dc:creator>
				<category><![CDATA[サーバ]]></category>

		<guid isPermaLink="false">http://blog.playispeace.com/?p=554</guid>
		<description><![CDATA[postfixを使っている環境で、（ランダムな英数字）-test@mail.server.com　というアドレスで受信させる設定方法です。 実はほぼこのページ（【postfix】aiaseでのランダムメールアカウント設定）で完結していますが、改めて残しておきます。 設定ファイルを編集します。 # vi main.cf pcreの部分を追記します。 alias_database = hash:/etc/aliases, pcre:/etc/postfix/aliases.pcre alias_maps = hash:/etc/aliases, pcre:/etc/postfix/aliases.pcre postfix 再起動して設定変更を反映？させます # postfix reload # postmap /etc/postfix/aliases.pcre システム要件 どんなときにこのシステムが求められるかというと、 携帯（ガラケー）会員サービスを運営しており、ログインせず写真をアップロードする専用アドレスが必要 このような場合で、システム的には、以下の要求が発生します。 ユーザごとの専用アドレスの発行 他のユーザのアドレスが知られないようなアドレス そのアドレスから写真貼付メールが送られるので、受信後、ユーザと写真を紐づけた状態で保存 動作検証 適当なphpスクリプトを用意して、メール受信→プログラム起動、を確認します。 検証用php /tmp/test.php をこのように用意します。 &#60;?php $fp&#160;=&#160;fopen(&#34;/tmp/test.php.log&#34;,&#34;w+&#34;); fwrite($fp,date(&#34;His&#34;)); ?&#62; ファイルとログに実行権限を与えて、実行してみます。 # echo 123 &#124; mail -s subject aaa-test@mail.server.com　 /tmp/test.php.logに時間が記述されてたらOK！ こんなんとかも試してみる。 # echo 123 &#124; mail <a href='http://blog.playispeace.com/554/postfix_random_mailaddress_setup/'>[...]</a>]]></description>
		<wfw:commentRss>http://blog.playispeace.com/554/postfix_random_mailaddress_setup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>さくらVPSにAPCをインストール</title>
		<link>http://blog.playispeace.com/546/sakura_vps_apc_install/</link>
		<comments>http://blog.playispeace.com/546/sakura_vps_apc_install/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 13:00:57 +0000</pubDate>
		<dc:creator>papettoTV</dc:creator>
				<category><![CDATA[サーバ]]></category>

		<guid isPermaLink="false">http://blog.playispeace.com/?p=546</guid>
		<description><![CDATA[phpがインストールされた状態を前提にソースからビルドします。 APCインストール 最新版をここから探します。http://pecl.php.net/package/apc 解凍後のディレクトリ内のINSTALLファイルを参考にしました。 $ wget http://pecl.php.net/get/APC-3.1.9.tgz $ tar xzvf APC-3.1.9.tgz $ cd APC-3.1.9 $ phpize $ ./configure &#45;&#45;with-php-config=/usr/local/php5/bin/php-config $ make $ export TEST_PHP_ARGS=&#8217;-n&#8217; $ make test # make install ここにインストールされたようなので、 /usr/local/php5/lib/php/extensions/no-debug-non-zts-20090626/ php.iniに追記します。 $ vi /usr/local/php5/lib/php.ini vi /usr/local/php5/lib/php.ini extension_dir = &#8220;/usr/local/php5/lib/php/extensions/no-debug-non-zts-20090626/&#8221; extension=&#8221;apc.so&#8221; apache を再起動してphpinfoを確認。 apcが表示されればOK]]></description>
		<wfw:commentRss>http://blog.playispeace.com/546/sakura_vps_apc_install/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>さくらVPSで（ソースからビルドする）LAMP環境構築しました</title>
		<link>http://blog.playispeace.com/528/sakura_vps_lamp_setup/</link>
		<comments>http://blog.playispeace.com/528/sakura_vps_lamp_setup/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 10:54:47 +0000</pubDate>
		<dc:creator>papettoTV</dc:creator>
				<category><![CDATA[日記]]></category>

		<guid isPermaLink="false">http://blog.playispeace.com/?p=528</guid>
		<description><![CDATA[最近新たにさくらVPS借りたので、LAMP環境をソースから構築してみたそのログです。 さくらVPSでLAMP構築 ※前提として、一般ユーザを作成済みとして、主にそのユーザで作業しています。 さくらVPSにLAMP環境構築〜apache編 さくらVPSにLAMP環境構築〜mysql編 ちょっと寄り道、さくらVPSにLAMP環境構築〜GD編 さくらVPSにLAMP環境構築〜php入れるまで編 さくらVPSにLAMP環境構築〜php編 おまけ、さくらVPSにopensslインストールしてphpからhttps接続させる おまけその2、さくらVPSにAPCをインストール 今後もアプリケーション側で新たなライブラリが必要になる場合もあるかと思いますので、それは随時各エントリー内か新たなエントリーとして追記してく予定です。 環境構築での課題 今回、環境構築の課題として「yumに頼らない」という課題で取り組んでみました。 何故か。 昨今のIaaSの普及に伴い、環境自体をイメージとしてあたかもコピペで作っていけるような便利な時代になっており、毎回1から各ソフトウェアごとに構築していくのと比べると格段に時間の短縮が可能になります。 そこで生産性向上のためにも、このようなサービスを利用すべきと考えていたのですが、いざ自分の構築スキルを振り返るとyumに頼った状態でした。 yumは環境構築には非常に強力なので、つい頼ってしまうのですが、他のソフトとの連携等を行う際にyumだとconfigureオプションを変えれなかったり、ソフトのversionの指定が出来ない（しにくい？）などの不便な点があります。 そこで、これではいかんと思い、今回このような課題で取り組んでみました。 結果的に、それほど大きくハマることも無く、環境構築できました。 まだやりたいことはあるのですが、LAMPとしてはこれで十分と思いますので、それはまた別でまとめたいと思います。 IaaSへの挑戦 これで納得のいく形でIaaSに取り組めそうです！ さて、使うとしたらどれがいいですかねー。少し前はEC2を触ってたのですが、さくらVPSずっと使ってたので、さくらクラウドかなー・・・]]></description>
		<wfw:commentRss>http://blog.playispeace.com/528/sakura_vps_lamp_setup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>さくらVPSにopensslインストールしてphpからhttps接続させる</title>
		<link>http://blog.playispeace.com/521/sakura_vps_openssl_install/</link>
		<comments>http://blog.playispeace.com/521/sakura_vps_openssl_install/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 09:55:18 +0000</pubDate>
		<dc:creator>papettoTV</dc:creator>
				<category><![CDATA[サーバ]]></category>

		<guid isPermaLink="false">http://blog.playispeace.com/?p=521</guid>
		<description><![CDATA[phpのfile_get_contens()関数で引数のURLがhttpsの場合、以下のエラーが出る環境があります。 Warning: file_get_contents() [function.file-get-contents]: Unable to find the wrapper &#8220;https&#8221; &#45; did you forget to enable it when you configured PHP? in ssl.php on line 2 その対応としてopensslをインストールしたので、そのメモです。 opensslのインストール 参考）http://memorva.jp/memo/linux/openssl.php ここからソースをDL http://www.openssl.org/ $ wget http://www.openssl.org/source/openssl-1.0.0e.tar.gz $ tar xzvf openssl-1.0.0e.tar.gz $ cd openssl-1.0.0e # ./config -fPIC shared # make # make test # make install なぜか./configもmakeも permisionで怒られたので、以降rootで実行しました。 <a href='http://blog.playispeace.com/521/sakura_vps_openssl_install/'>[...]</a>]]></description>
		<wfw:commentRss>http://blog.playispeace.com/521/sakura_vps_openssl_install/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>さくらVPSにLAMP環境構築〜php編</title>
		<link>http://blog.playispeace.com/514/sakura_vps_php_install/</link>
		<comments>http://blog.playispeace.com/514/sakura_vps_php_install/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 08:50:06 +0000</pubDate>
		<dc:creator>papettoTV</dc:creator>
				<category><![CDATA[サーバ]]></category>

		<guid isPermaLink="false">http://blog.playispeace.com/?p=514</guid>
		<description><![CDATA[apache,mysqlにGDやその他ライブラリが準備が整ったとこでいよいよphpインストールしていきます。 phpインストール ここからソースをDL http://www.php.net/downloads.php cd /usr/local/src/ $wget http://jp2.php.net/get/php-5.3.8.tar.gz/from/jp.php.net/mirror $tar xzvf php-5.3.8.tar.gz $cd php-5.3.8 #./configure &#45;&#45;prefix=/usr/local/php5 &#45;&#45;with-apxs2=/usr/local/apache2/bin/apxs &#45;&#45;disable-all &#45;&#45;enable-libxml &#45;&#45;with-libxml-dir=/usr/local &#45;&#45;enable-zend-multibyte &#45;&#45;with-regex=php &#45;&#45;enable-filter &#45;&#45;with-pcre-regex=yes &#45;&#45;with-mysql=/usr/local/mysql &#45;&#45;with-gd $make $make test 今回configure時に一部権限でエラーを吐いたので、rootで実行しました。 &#45;&#45;disable-allオプションを指定してから必要なものだけを入れるようにしてます。 また、オプションは暫定ですので、今後のサービスにより、変更する可能性はあります。 ※追記2012/1/27 configureオプション変更がありました。 $./configure &#45;&#45;prefix=/usr/local/php5 &#45;&#45;with-apxs2=/usr/local/apache2/bin/apxs &#45;&#45;disable-all &#45;&#45;enable-libxml &#45;&#45;with-libxml-dir=/usr/local &#45;&#45;enable-zend-multibyte &#45;&#45;with-regex=php &#45;&#45;enable-filter &#45;&#45;with-pcre-regex=yes &#45;&#45;with-mysql=/usr/local/mysql &#45;&#45;with-gd &#45;&#45;with-jpeg-dir &#45;&#45;enable-session &#45;&#45;enable-mbstring &#45;&#45;enable-xml &#45;&#45;enable-json &#45;&#45;enable-sockets また、make testでいくつかエラー出たようなので、メモ ===================================================================== EXPECTED <a href='http://blog.playispeace.com/514/sakura_vps_php_install/'>[...]</a>]]></description>
		<wfw:commentRss>http://blog.playispeace.com/514/sakura_vps_php_install/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>さくらVPSにLAMP環境構築〜php入れるまで編</title>
		<link>http://blog.playispeace.com/510/sakura_vps_libraries_install/</link>
		<comments>http://blog.playispeace.com/510/sakura_vps_libraries_install/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 06:50:43 +0000</pubDate>
		<dc:creator>papettoTV</dc:creator>
				<category><![CDATA[サーバ]]></category>

		<guid isPermaLink="false">http://blog.playispeace.com/?p=510</guid>
		<description><![CDATA[前回GDをインストールしましたが、その他phpをインストールする際に必要なライブラリのインストールログです。 libxml2インストール ここから最新版を探します。 $wget ftp://xmlsoft.org/libxml2/libxml2-2.7.8.tar.gz $tar xzvf libxml2-2.7.8.tar.gz $cd libxml2-2.7.8 $./configure $make #make install 今後アプリケーション側で必要なライブラリがあれば、随時こちらに追記予定 いよいよphp ようやくphpいきます。]]></description>
		<wfw:commentRss>http://blog.playispeace.com/510/sakura_vps_libraries_install/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>さくらVPSにLAMP環境構築〜GD編</title>
		<link>http://blog.playispeace.com/488/sakura_vps_gd_install/</link>
		<comments>http://blog.playispeace.com/488/sakura_vps_gd_install/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 06:07:43 +0000</pubDate>
		<dc:creator>papettoTV</dc:creator>
				<category><![CDATA[サーバ]]></category>

		<guid isPermaLink="false">http://blog.playispeace.com/?p=488</guid>
		<description><![CDATA[さくらVPSにLAMP環境構築で、apacheとmysqlが動いてたのでphp行きます。 ・・・の前にこの環境で動かすサービス上必要なGDを入れます。 GDのインストール GD入れる前に色々必要なlibpng,libjpeg,freetypeを入れていきます。 主な参考先）GD等のインストール libpng ここからDL http://sourceforge.net/projects/libpng/files/latest/download tar.bz2でローカルにDLしちゃうので、サーバアップ後 $tar jxfv libpng-1.2.37.tar.bz2 $cd libpng-1.2.37 $./configure すると configure: error: zlib not installed zlibが無いですよって怒られたので、 zlibインストール $wget http://prdownloads.sourceforge.net/libpng/zlib-1.2.5.tar.gz?download $tar xvzf zlib-1.2.5.tar.gz $cd zlib-1.2.5 $./configure $make #make install 再びチャレンジ $cd libpng-1.2.37 $./configure $make #make install いけました。 libjpegのインストール $wget http://www.ijg.org/files/jpegsrc.v8c.tar.gz $tar xvzf jpegsrc.v8c.tar.gz $cd jpeg-8c $./configure $make #make install freetypeのインストール <a href='http://blog.playispeace.com/488/sakura_vps_gd_install/'>[...]</a>]]></description>
		<wfw:commentRss>http://blog.playispeace.com/488/sakura_vps_gd_install/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

