<?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>ITめもりーにょ &#187; Linux／FreeBSD</title>
	<atom:link href="http://itblog.posifeel.com/archives/category/os/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://itblog.posifeel.com</link>
	<description>プログラミングの技術メモなど、備考録として使用しています。</description>
	<lastBuildDate>Mon, 06 Sep 2010 03:45:21 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://itblog.posifeel.com/archives/category/os/linux/feed" />
		<item>
		<title>Apache　mod_rewriteをDSOで有効化</title>
		<link>http://itblog.posifeel.com/archives/497.html</link>
		<comments>http://itblog.posifeel.com/archives/497.html#comments</comments>
		<pubDate>Fri, 03 Sep 2010 11:41:55 +0000</pubDate>
		<dc:creator>ましぇたん</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux／FreeBSD]]></category>
		<category><![CDATA[apxs]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[DSO]]></category>
		<category><![CDATA[mod_rewrite]]></category>

		<guid isPermaLink="false">http://itblog.posifeel.com/?p=497</guid>
		<description><![CDATA[				
				　Apache2.2のmod_rewriteをDSOモジュールとして追加する。
				環境
				
					CentOS 5
					Apache 2.2.15
				
				
				
	 [...]]]></description>
			<content:encoded><![CDATA[				<p>
				　Apache2.2のmod_rewriteをDSOモジュールとして追加する。<br />
				<h3>環境</h3>
				<ul>
					<li>CentOS 5</li>
					<li>Apache 2.2.15</li>
				</ul>
				<span id="more-497"></span><br />
				<ol>
					<li>拡張ツール (apxs)を使用してmod_rewriteをコンパイル</li>
				<pre><code>$ cd /usr/local/src/httpd-2.2.15/modules/mappers
$ /usr/local/apache2/bin/apxs -i -a -c ./mod_rewrite.c</code></pre>
					<li>mod_rewrite.soが作成されたことと、httpd.confが変更されていることを確認</li>
				<pre><code>$ ls /usr/local/apache2/modules
mod_rewrite.so
$ grep rewrite /usr/local/apache2/conf/httpd.conf
LoadModule rewrite_module     modules/mod_rewrite.so</code></pre>
					<li>Apache再起動</li>
					<li>.htaccessで動作確認</li>
				ここでは試しにtest.comをwww.test.comへリダイレクトさせる。<br />
				<pre><code>$ cd [公開ディレクトリ]
$ vi .htaccess
&lt;IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(test\.com)(:80)?
RewriteRule ^(.*) http://www.test.com/$1 [R=301,L]
&lt;/IfModule></code></pre>
					<li>ブラウザからtest.comへアクセスし、自動的にwww.test.comがアドレスバーに表示されることを確認</li>
				</ol>
				</p>
]]></content:encoded>
			<wfw:commentRss>http://itblog.posifeel.com/archives/497.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://itblog.posifeel.com/archives/497.html" />
	</item>
		<item>
		<title>CentOS DVDを完全コピーする（vobcopy）</title>
		<link>http://itblog.posifeel.com/archives/494.html</link>
		<comments>http://itblog.posifeel.com/archives/494.html#comments</comments>
		<pubDate>Thu, 02 Sep 2010 09:52:16 +0000</pubDate>
		<dc:creator>ましぇたん</dc:creator>
				<category><![CDATA[Linux／FreeBSD]]></category>
		<category><![CDATA[ソフトウェア]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[vobcopy]]></category>

		<guid isPermaLink="false">http://itblog.posifeel.com/?p=494</guid>
		<description><![CDATA[				
				　CentOSでDVDを完全コピーしiso化する。
				
				
				
					vobcopyのインストール
				$ yum -y install vobcopy
	DVDを挿入
	マウ [...]]]></description>
			<content:encoded><![CDATA[				<p>
				　CentOSでDVDを完全コピーしiso化する。<br />
				<br />
				<span id="more-494"></span><br />
				<ol>
					<li>vobcopyのインストール</li>
				<pre><code>$ yum -y install vobcopy</code></pre>
	<li>DVDを挿入</li>
	<li>マウント</li>
<pre><code>$ mount /dev/dvd /mnt</code></pre>
					<li>vobcopy実行</li>
				<pre><code>$ vobcopy -m</code></pre>
	<li>iso化</li>
<pre><code>$ mkisofs -dvd-video -o [任意の名前].iso [vobcopyが作成したディレクトリ]</code></pre>
					<li>[vobcopyが作成したディレクトリ]を削除</li>
					<li>アンマウント</li>
				<pre><code>$ umount /mnt</code></pre>
</ol>
</p>
]]></content:encoded>
			<wfw:commentRss>http://itblog.posifeel.com/archives/494.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://itblog.posifeel.com/archives/494.html" />
	</item>
		<item>
		<title>Apache 自宅サーバにおけるバーチャルホストの設定</title>
		<link>http://itblog.posifeel.com/archives/489.html</link>
		<comments>http://itblog.posifeel.com/archives/489.html#comments</comments>
		<pubDate>Mon, 23 Aug 2010 13:31:29 +0000</pubDate>
		<dc:creator>ましぇたん</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux／FreeBSD]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[バーチャルホスト]]></category>
		<category><![CDATA[独自ドメイン]]></category>
		<category><![CDATA[自宅サーバ]]></category>

		<guid isPermaLink="false">http://itblog.posifeel.com/?p=489</guid>
		<description><![CDATA[				
				環境：CentOS 5 64bit
				Apache：2.x
				
				やりたいこと：example.comとtest.example.comを自宅サーバ（Apache）へリレーし、Apac [...]]]></description>
			<content:encoded><![CDATA[				<p>
				環境：CentOS 5 64bit<br />
				Apache：2.x<br />
				<br />
				やりたいこと：example.comとtest.example.comを自宅サーバ（Apache）へリレーし、Apacheのバーチャルホストでそれぞれ別のディレクトリ配下を表示させる。<br />
				<br />
				前提：DDNSは<a href="http://www.everydns.com/" target="_blank">everydns</a>を利用し以下のように設定済み。<br />
				<pre><code>example.com A [自分のグローバルIPアドレス]
test.example.com CNAME example.com</code></pre>
				<br />
				<span id="more-489"></span><br />
				<ol>
					<li>conf/httpd.confの編集</li>
				<pre><code>$ vi httpd.conf

#Include conf/extra/httpd-vhosts.conf
↓　（コメントを排除）
Include conf/extra/httpd-vhosts.conf</pre></code><br />
					<li>conf/extra/httpd-vhosts.confの編集</li>
				<pre><code>$ vi httpd-vhosts.conf

# ローカルIPアドレスを指定
NameVirtualHost 192.168.xxx.xxx:80

# example.comの設定
&lt;VirtualHost 192.168.xxx.xxx:80>
    ServerAdmin webmaster@example.com
    DocumentRoot "/usr/local/apache2/htdocs"
    ServerName example.com # 自分のドメイン
    ServerAlias www.example.com  # alias
    ErrorLog "logs/example.com-error_log"
    CustomLog "logs/example.com-access_log" common
&lt;/VirtualHost>

# test.exampleの設定
&lt;VirtualHost 192.168.xxx.xxx:80>
    ServerAdmin webmaster@example.com
    DocumentRoot "/home/test" # 今回はユーザディレクトリをドキュメントルートとする
    ServerName test.example.com
    ErrorLog "logs/test.example.com-error_log"
    CustomLog "logs/test.example.com-access_log" common

    # ユーザディレクトリにアクセス権を付与
    &lt;Directory "/home/test">
        Options FollowSymLinks
        AllowOverride all # .htaccess有効化
        Order deny,allow
        Allow from all
    &lt;/Directory>

&lt;/VirtualHost>
</pre></code><br />
					<li>ユーザディレクトリの作成</li>
				<pre><code>$ useradd test
$ passwd test
$ chown test:httpd test ★グループをApacheの実行ユーザと同じにする
$ chmod 710 test ★Apacheの実行ユーザがユーザディレクトリを実行できるようにする
</pre></code><br />
					<li>httpd再起動</li>
				<pre><code>$ /etc/rc.d/init.d/httpd restart</pre></code><br />
	<li>example.comとtest.example.comがそれぞれ表示されればOK</li>
※あらかじめ、それぞれのDocumentRootに識別可能な形のindex.htmlを置いておくこと<br />
</ol>
<br />
以上<br />
<br />
</p>
]]></content:encoded>
			<wfw:commentRss>http://itblog.posifeel.com/archives/489.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://itblog.posifeel.com/archives/489.html" />
	</item>
		<item>
		<title>HP ProLiant ML115 KVMについて</title>
		<link>http://itblog.posifeel.com/archives/471.html</link>
		<comments>http://itblog.posifeel.com/archives/471.html#comments</comments>
		<pubDate>Thu, 12 Aug 2010 22:40:49 +0000</pubDate>
		<dc:creator>ましぇたん</dc:creator>
				<category><![CDATA[Linux／FreeBSD]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[HP]]></category>
		<category><![CDATA[KVM]]></category>
		<category><![CDATA[ProLiant ML115]]></category>

		<guid isPermaLink="false">http://itblog.posifeel.com/?p=471</guid>
		<description><![CDATA[				
				　HP ProLiant ML115を買った頃、せっかくなのでKVMで仮想環境を作ろうと思って挫折していたのですが・・・
				　BIOS（RBSU）のAdvanced → CPU Configura [...]]]></description>
			<content:encoded><![CDATA[				<p>
				　HP ProLiant ML115を買った頃、せっかくなのでKVMで仮想環境を作ろうと思って挫折していたのですが・・・<br />
				　BIOS（RBSU）のAdvanced → CPU Configurationに<br />
				<pre><code>Secure Virtual Machine Mode   [Disabled]</code></pre>
なんて記述を発見。<br />
<br />
　さっそくgoogle先生に聞いてみたらありましたありました。<br />
　ホストOSこそ違えど、ML115を利用している点では同じ<a href="http://foamy-capriccio.seesaa.net/article/109941507.html" target="_blank">Foamy Capriccio</a>様で解説してらっしゃいました！<br />
<br />
　取りあえず以下の様に修正してみましたが、ゲストOSの作成はまたの機会にしたいと思います。<br />
<pre><code>Secure Virtual Machine Mode   [Enable]</code></pre>
				<br />
				　自分の場合、ホストOSは安定性を求めて・・・また、業務で使う機会のあるRHELと互換性があるということでCentOSを利用していますが、KVM上ではFedoraを試してみたいと思います。<br />
				　あと怖くて出来なかったあんな事やこんな事も試してみたい！<br />
				<br />
				<br />
				　楽しみだー♪<br />
				</p>
]]></content:encoded>
			<wfw:commentRss>http://itblog.posifeel.com/archives/471.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://itblog.posifeel.com/archives/471.html" />
	</item>
		<item>
		<title>SendMail　メール受信をトリガーにしてプロセスを起動</title>
		<link>http://itblog.posifeel.com/archives/434.html</link>
		<comments>http://itblog.posifeel.com/archives/434.html#comments</comments>
		<pubDate>Wed, 23 Jun 2010 23:21:12 +0000</pubDate>
		<dc:creator>ましぇたん</dc:creator>
				<category><![CDATA[Linux／FreeBSD]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[sendmail]]></category>

		<guid isPermaLink="false">http://itblog.posifeel.com/?p=434</guid>
		<description><![CDATA[				
				　SendMailでメールを受信したタイミングでプロセスを起動させる。
				
				　【環境】
				
					CentOS 5
					sendmail-8.13.8-8.el5
				 [...]]]></description>
			<content:encoded><![CDATA[				<p>
				　SendMailでメールを受信したタイミングでプロセスを起動させる。<br />
				<br />
				　【環境】<br />
				<ul>
					<li>CentOS 5</li>
					<li>sendmail-8.13.8-8.el5</li>
				</ul>
				<span id="more-434"></span><br />
				<ol>
					<li>適当にプログラムを書く。今回はPHPで実験</li>
				<pre><source>
$ cd $HOME/bin
$ vi test.php
#!/usr/bin/php -q
&lt;?php
$filepath = "test.txt";
$filetext = "メールが届いたよ！";
$fp = fopen($filepath, "w");
@fwrite( $fp, $filetext, strlen($filetext) );
fclose($fp);
?&gt;
</source></pre>
				<br />
					<li>.forwardファイルをホームディレクトリに作成</li>
				　SendMailは.forwardファイルを参照し、受信したメールのforward（転送）を行う。<br />
				　転送のみではなく、パイプを使用して自作プログラムやシェルなどに渡すことも可能。<br />
				　今回は上記のtest.phpに処理を渡す。<br />
				<pre><source>
$ cd $HOME
$ vi .forward
"| [test.phpが置いてあるパス]/test.php"
</source></pre>
				<br />
				　尚、このファイルのアクセス権限を自ユーザのみread/write可能としておかないとforwardしてくれません。<br />
				　/var/log/maillogで怒られます。<br />
				<pre><source>
Jun 24 07:26:50 localhost sendmail[3783]: o5NMQnCE003782: forward /xxx/xxx/.forward: Group writable file
</source></pre>
				<br />
				　以下のように変更。<br />
				<pre><source>
$ chmod 600 .forward
</source></pre>
				<br />
					<li>/etc/smrshディレクトリに作成したプログラムのシンボリックリンクを置く</li>
				　SendMailではforwardによる不正なプログラムの実行を制限しており、/etc/smrshディレクトリ配下に存在する実行ファイルしか実行できないようになっている。<br />
				　よってtest.phpのリンクを/etc/smrshに置く。<br />
				<pre><source>
$ ln -s [test.phpが置いてあるパス]/test.php /etc/smrsh
</source></pre>
				</ul>
				<br />
				■メモ<br />
				さくらインターネットの環境では、.forwardファイルの代わりに.mailfilterファイルを作成する。<br />
				<br />
				<br />
				以上。</p>
]]></content:encoded>
			<wfw:commentRss>http://itblog.posifeel.com/archives/434.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://itblog.posifeel.com/archives/434.html" />
	</item>
		<item>
		<title>Sendmailメモ　Gmailへのリレー</title>
		<link>http://itblog.posifeel.com/archives/429.html</link>
		<comments>http://itblog.posifeel.com/archives/429.html#comments</comments>
		<pubDate>Fri, 18 Jun 2010 13:15:57 +0000</pubDate>
		<dc:creator>ましぇたん</dc:creator>
				<category><![CDATA[Linux／FreeBSD]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[sendmail]]></category>
		<category><![CDATA[自宅サーバー]]></category>

		<guid isPermaLink="false">http://itblog.posifeel.com/?p=429</guid>
		<description><![CDATA[				
				CentOS内のsendmailからGmailのsmtpへリレーする方法のメモ。
				以下のサイトを全面的にぱくりました。
				
				http://d.hatena.ne.jp/mya3/2 [...]]]></description>
			<content:encoded><![CDATA[				<p>
				CentOS内のsendmailからGmailのsmtpへリレーする方法のメモ。<br />
				以下のサイトを全面的にぱくりました。<br />
				<br />
				http://d.hatena.ne.jp/mya3/20100203/1265222260</p>
]]></content:encoded>
			<wfw:commentRss>http://itblog.posifeel.com/archives/429.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://itblog.posifeel.com/archives/429.html" />
	</item>
		<item>
		<title>なんてこったい</title>
		<link>http://itblog.posifeel.com/archives/424.html</link>
		<comments>http://itblog.posifeel.com/archives/424.html#comments</comments>
		<pubDate>Thu, 17 Jun 2010 06:28:29 +0000</pubDate>
		<dc:creator>ましぇたん</dc:creator>
				<category><![CDATA[Linux／FreeBSD]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[HP]]></category>
		<category><![CDATA[ProLiant ML115]]></category>

		<guid isPermaLink="false">http://itblog.posifeel.com/?p=424</guid>
		<description><![CDATA[				
				最新のopenldapを入れようと思って
				
yum remove openldap*

				したんですが、依存関係のある全てのサービスまで消してしまったorz
				sambaもお釈迦・・ [...]]]></description>
			<content:encoded><![CDATA[				<p>
				最新のopenldapを入れようと思って<br />
				<pre><code>
yum remove openldap*
</code></pre>
				したんですが、依存関係のある全てのサービスまで消してしまったorz<br />
				sambaもお釈迦・・・<br />
				<br />
				再インストが手っ取り早そうなので、大事なデータだけバックアップとって作業します・・・。<br />
				<br />
				まー・・・<br />
				win95の発売時からのPCライフですが、思えば何度も再インストして覚えていったものだしなぁ。<br />
				これも勉強と割り切りますか。<br />
				<br />
				しかしめんどいなー・・・。<br />
				sambaとかsshとか設定し直しかー・・・。</p>
]]></content:encoded>
			<wfw:commentRss>http://itblog.posifeel.com/archives/424.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://itblog.posifeel.com/archives/424.html" />
	</item>
		<item>
		<title>Linux WineにDirectXをインストール</title>
		<link>http://itblog.posifeel.com/archives/417.html</link>
		<comments>http://itblog.posifeel.com/archives/417.html#comments</comments>
		<pubDate>Thu, 06 May 2010 03:13:30 +0000</pubDate>
		<dc:creator>ましぇたん</dc:creator>
				<category><![CDATA[Linux／FreeBSD]]></category>
		<category><![CDATA[.NET Framework]]></category>
		<category><![CDATA[DirectX]]></category>
		<category><![CDATA[Wine]]></category>

		<guid isPermaLink="false">http://itblog.posifeel.com/?p=417</guid>
		<description><![CDATA[				
				前回の記事に引き続き、今回はWineにDirectXを導入してみます。
				
				前提条件として、cabファイルを解凍するためのツールである「cabextract」が必要です。
				
			 [...]]]></description>
			<content:encoded><![CDATA[				<p>
				<a href="http://itblog.posifeel.com/archives/414.html">前回の記事</a>に引き続き、今回はWineにDirectXを導入してみます。<br />
				<br />
				前提条件として、cabファイルを解凍するためのツールである「cabextract」が必要です。<br />
				<br />
				<span id="more-417"></span><br />
				<h2>cabextractのインストール</h2>
				</p>
				<blockquote><p>
				# sudo yum install cabextract</p></blockquote>
				<p>
				<br />
				<h2>.NET Framewaork 2.0のインストール</h2>
				DirectXをインストールするには.NET Framewaorkが必要な様ですのでインストール。<br />
				手順の詳細は<a href="http://appdb.winehq.org/objectManager.php?sClass=version&#038;iId=3754" target="_blank">こちら</a>を参照。</p>
				<blockquote><p>
				# sudo wget http://winezeug.googlecode.com/svn/trunk/winetricks<br />
				# sudo chmod +x winetricks<br />
				# sudo sh ./winextricks corefonts dotnet20</p></blockquote>
				<p>
				<br />
				あとはインストールの窓が出てくるので指示通りにボタンを選択すればOK。<br />
				<br />
				<h2>DirectXのインストール</h2>
				</p>
				<blockquote><p>
				# ./winextricks</p></blockquote>
				<p>
				窓が出てくるので、directx9.0を選択してOK<br />
				<br />
				<h2>DirectXの実行確認</h2>
				</p>
				<blockquote><p>
				# wine dxdiag.exe</p></blockquote>
				<p>
				<a href="http://itblog.posifeel.com/wp-content/uploads/2010/05/directx.jpg"><img src="http://itblog.posifeel.com/wp-content/uploads/2010/05/directx-300x234.jpg" alt="" title="directx" width="300" height="234" class="alignnone size-medium wp-image-418" /></a><br />
				<br />
				おー。出た出た！<br />
				試しにDirect３Dを試してみよう。<br />
				<a href="http://itblog.posifeel.com/wp-content/uploads/2010/05/direct3d.jpg"><img src="http://itblog.posifeel.com/wp-content/uploads/2010/05/direct3d-300x205.jpg" alt="" title="direct3d" width="300" height="205" class="alignnone size-medium wp-image-419" /></a><br />
				<br />
				ちょっとマシンのグラボがへぼいのでカクカク表示だったが、無事成功♪<br />
				<br />
				<br />
				次の記事はDirectXを使用しているゲームの起動を目指してみたいと思います。</p>
]]></content:encoded>
			<wfw:commentRss>http://itblog.posifeel.com/archives/417.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://itblog.posifeel.com/archives/417.html" />
	</item>
		<item>
		<title>Linux Wineの設定</title>
		<link>http://itblog.posifeel.com/archives/414.html</link>
		<comments>http://itblog.posifeel.com/archives/414.html#comments</comments>
		<pubDate>Thu, 06 May 2010 01:20:04 +0000</pubDate>
		<dc:creator>ましぇたん</dc:creator>
				<category><![CDATA[Linux／FreeBSD]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Wine]]></category>
		<category><![CDATA[設定]]></category>

		<guid isPermaLink="false">http://itblog.posifeel.com/?p=414</guid>
		<description><![CDATA[				
				前回の記事に引き続き、Wine関連の記事です。
				今回はWineのディレクトリ構成と設定のメモ。
				
				
				Wineのディレクトリ構成
				
					/usr/local/ [...]]]></description>
			<content:encoded><![CDATA[				<p>
				<a href="http://itblog.posifeel.com/archives/407.html">前回の記事</a>に引き続き、Wine関連の記事です。<br />
				今回はWineのディレクトリ構成と設定のメモ。<br />
				<br />
				<span id="more-414"></span><br />
				<h2>Wineのディレクトリ構成</h2>
				<ul>
					<li>/usr/local/share/wine</li>
				wineのインストールディレクトリ<br />
				<ul>
					<li>/usr/local/share/wine/fonts</li>
				wineから実行したwinアプリで表示されるフォントが入っている。<br />
				当方のインストール初期状態では日本語フォントが入っていなかったので、試しに動かしてみたwinアプリの日本語部分はことごとく文字化け、もしくは表示自体されなかった。<br />
				この問題の回避策は後述する。<br />
				</ul>
					<li>$HOME/.wine</li>
				各ユーザごとのwindowsファイル郡が格納されている。<br />
				<ul>
					<li>$HOME/.wine/dosdevices</li>
				cドライブやcdドライブなどのマッピング関連<br />
					<li>$HOME/.wine/drive_c</li>
				windowsでいうところのc:\。<br />
				例えばあるwinアプリのインストールの際、インストールフォルダを「c:\Program Files\○○○」と指定した場合、実際には「$HOME/.wine/drive_c/Program Files/○○○」に保存される。<br />
				</ul>
				</ul>
				<br />
				<h2>Wineの初期設定</h2>
				<h3>日本語の文字化け／非表示対策</h3>
				当方の環境では、初期状態では日本語がまったく表示されなかった。<br />
				どうも/usr/local/share/wine/fontsに日本語フォントが入っていないのが原因らしく、以下の様に対処した。</p>
				<blockquote><p><source><br />
				ln -s /usr/share/fonts/japanese/TrueType/sazanami-gothic.ttf /usr/local/share/wine/fonts/<br />
				</source></p></blockquote>
				<p>
				既存の日本語フォントへのリンクを/usr/local/share/wine/fontsに作成。<br />
				これでwineで実行させるwinアプリの日本語が表示されるようになった。<br />
				<br />
				取り敢えず、当方の環境ではこれであらかたのアプリは問題無く実行出来るように。<br />
				<br />
				<h2>winアプリの実行</h2>
				<ol>
					<li>拡張子がexeのアプリを実行する場合</li>
				例：hogehoge.exeを実行</p>
				<blockquote><p>
				# wine hogehoge.exe</p></blockquote>
				<p>
				<br />
					<li>拡張子がmsiのインストーラーを実行する場合</li>
				例：hogehoge.msiを実行</p>
				<blockquote><p>
				# wine msiexec hogehoge.msi</p></blockquote>
				<p>
				</ol>
				<br />
				<br />
				こんな感じかなー。<br />
				次はWine上のDirectX絡みの件について調べてみようと思う。<br />
				あれです。<br />
				win専用のネトゲをWineで動かせたら素敵なので・・・w</p>
]]></content:encoded>
			<wfw:commentRss>http://itblog.posifeel.com/archives/414.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://itblog.posifeel.com/archives/414.html" />
	</item>
		<item>
		<title>Linux Wineのインストール</title>
		<link>http://itblog.posifeel.com/archives/407.html</link>
		<comments>http://itblog.posifeel.com/archives/407.html#comments</comments>
		<pubDate>Wed, 05 May 2010 16:13:40 +0000</pubDate>
		<dc:creator>ましぇたん</dc:creator>
				<category><![CDATA[Linux／FreeBSD]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Wine]]></category>

		<guid isPermaLink="false">http://itblog.posifeel.com/?p=407</guid>
		<description><![CDATA[				
				ひさしぶりの更新。
				メインPCであるwinノートのアダプターを出先で忘れてしまったので、サーバ機であるCentOSからのカキコです。
				
				winアプリが使えないとちょっと不都合のあ [...]]]></description>
			<content:encoded><![CDATA[				<p>
				ひさしぶりの更新。<br />
				メインPCであるwinノートのアダプターを出先で忘れてしまったので、サーバ機であるCentOSからのカキコです。<br />
				<br />
				winアプリが使えないとちょっと不都合のあることをしなくてはならないのですが、手元にはCentOSしか無い・・・。<br />
				VMWareでwinを仮想化しようにも、持っているのはプリインストールのWindowsだけなのでコピーは無理ぽです。<br />
				<br />
				ってことでエミュレーターなり、winアプリをエミュレートしてくれる様な便利なものを探していたらWineというものを発見！<br />
				windows自体のエミュレーターというわけでは無く、あくまでも”winアプリのみ”をLinuxで動作させるためのアプリみたいです。<br />
				<br />
				このブログの更新も滞っていたことですし、せっかくなのでカキコしながらの作業です。<br />
				<br />
				<span id="more-407"></span><br />
				<h2>Wineとは？</h2>
				以下、wikipediaからの引用です。</p>
				<blockquote><p>
				<a href='http://www.dismas.jp/aff/index.php?title=Wine&#038;affid=i7OH2AzsGl'  title='このキーワードを百科事典で調べる'>Wine</a>（<a href='http://www.dismas.jp/aff/index.php?title=%E3%83%AF%E3%82%A4%E3%83%B3&#038;affid=i7OH2AzsGl'  title='このキーワードを百科事典で調べる'>ワイン</a>）は、<a href='http://www.dismas.jp/aff/index.php?title=%E3%82%AA%E3%83%BC%E3%83%97%E3%83%B3%E3%82%BD%E3%83%BC%E3%82%B9&#038;affid=i7OH2AzsGl'  title='このキーワードを百科事典で調べる'>オープンソース</a>の<a href='http://www.dismas.jp/aff/index.php?title=Windows&#038;affid=i7OH2AzsGl'  title='このキーワードを百科事典で調べる'>Windows</a> API<a href='http://www.dismas.jp/aff/index.php?title=%E5%AE%9F%E8%A3%85&#038;affid=i7OH2AzsGl'  title='このキーワードを百科事典で調べる'>実装</a>を通じて、主としてx86<a href='http://www.dismas.jp/aff/index.php?title=%E3%82%A2%E3%83%BC%E3%82%AD%E3%83%86%E3%82%AF%E3%83%81%E3%83%A3&#038;affid=i7OH2AzsGl'  title='このキーワードを百科事典で調べる'>アーキテクチャ</a>上のUnix系OSにおいて<a href='http://www.dismas.jp/aff/index.php?title=Microsoft&#038;affid=i7OH2AzsGl'  title='このキーワードを百科事典で調べる'>Microsoft</a> Windows用<a href='http://www.dismas.jp/aff/index.php?title=%E3%82%A2%E3%83%97%E3%83%AA%E3%82%B1%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3&#038;affid=i7OH2AzsGl'  title='このキーワードを百科事典で調べる'>アプリケーション</a>を<a href='http://www.dismas.jp/aff/index.php?title=%E3%83%8D%E3%82%A4%E3%83%86%E3%82%A3%E3%83%96&#038;affid=i7OH2AzsGl'  title='このキーワードを百科事典で調べる'>ネイティブ</a>動作させることを<a href='http://www.dismas.jp/aff/index.php?title=%E7%9B%AE%E6%A8%99&#038;affid=i7OH2AzsGl'  title='このキーワードを百科事典で調べる'>目標</a>とする<a href='http://www.dismas.jp/aff/index.php?title=%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%A0&#038;affid=i7OH2AzsGl'  title='このキーワードを百科事典で調べる'>プログラム</a>群である。</p></blockquote>
				<p>
				<br />
				<h2>Wineのインストール</h2>
				<ul>
					<li>環境</li>
				CentOS 5 x86_64<br />
				</ul>
				<ol>
					<li>yum用のRPMForgeリポジトリ追加</li>
				正規のCentOSのyumリポジトリにはwineは含まれていないそうなので、RPMForgeというリポジトリを追加。<br />
				<a href="http://dag.wieers.com/rpm/FAQ.php#B" target="_blank">このページ</a>から自分の環境にあったrepoファイルをダウンロードする。<br />
				以下は当方の環境の場合。</p>
				<blockquote><p><source><br />
				# rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS//rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm<br />
				</source></p></blockquote>
				<p>
				<br />
					<li>取り敢えずWineがあるか確認してみる</li>
				ここでつまずきました。<br />
				色々なブログでCentOSにWineを入れる記事が載っていたので、それを参考にしていたのですがどうも上手くいかない。。。</p>
				<blockquote><p><source><br />
				# yum info wine<br />
				＜中略＞<br />
				486 packages excluded due to repository priority protections<br />
				Error: No matching Packages to list<br />
				</source></p></blockquote>
				<blockquote><p><source><br />
				# yum list | grep wine<br />
				※結果無し<br />
				</source></p></blockquote>
				<p>
				<br />
				でも上記のようにローカルにあるダウンロード可能なパッケージリストには載っていなくても、ネット上のリポジトリを直に探すと見付かるんですよねぇ・・・。</p>
				<blockquote><p><source><br />
				# yum search wine<br />
				＜中略＞<br />
				=================================================== Matched: wine ===================================================<br />
				qemu.x86_64 : CPU emulator<br />
				tellico.x86_64 : collection manager<br />
				</source></p></blockquote>
				<p>
				<br />
				んで埓が空かなくなってきたので、本家のリポジトリをのぞいて見たら・・・。<br />
				なんか、そもそも64bit版のrpmパッケージが用意されてない？<br />
				<br />
				その線でググって見たら、<a href="http://wingse.blog57.fc2.com/blog-entry-172.html" target="_blank">にわかSEの独り言</a>様のブログにて以下の様に言及されていました。</p>
				<blockquote><p>
				Wineをインストールする際、32bit版であれば、リポジトリさえ用意すれば、yumコマンドでインストールできますが、64bitのCentOSにはRPMファイルさえ存在しません。</p></blockquote>
				<p>
				<br />
				にゃるほど・・・。<br />
				たぶん、１でダウンロードしたパッケージリストは64bit版でrpm可能なモノのみのリストみたいです。<br />
				直で探して見付かったのは32bit版だったのかな？<br />
				<br />
				これはパッケージとしてのインスコは諦めて、自前でコンパイルするしかなさそうです。<br />
				がっかり・・・。<br />
				<br />
					<li>ソースの入手</li>
				<a href="http://www.winehq.org/" target="_blank">Wine</a>の公式ページから最新のソースファイルを入手します。<br />
				執筆当時の最新版は1.1.43、安定版は1.0.1でした。<br />
				自分は安定版をダウンロードすることにしました。</p>
				<blockquote><p>
				# wget http://downloads.sourceforge.net/project/wine/Source/1.0.1/wine-1.0.1.tar.bz2?use_mirror=jaist</p></blockquote>
				<p>
				<br />
					<li>コンパイルとインストール</li>
				手順は同封のREADMEファイルを参照して行いました。<br />
				※ソースのコンパイルには、「ソフトウェアの追加/削除」で「X ソフトウェア開発」がインストールされている必要があります。</p>
				<blockquote><p>
				# tar jxvf wine-1.0.1.tar.bz2 <br />
				# cd wine-1.0.1<br />
				# ./tools/wineinstall </p></blockquote>
				<p>
				<br />
				ちなみにrootで上記を実行したら以下のように怒られました。</p>
				<blockquote><p>
				You are running wineinstall as root, this is not advisable. Please rerun as a user.<br />
				Aborting.</p></blockquote>
				<p>
				<br />
				一般ユーザで実行。</p>
				<blockquote><p>
				Wine Installer v1.0<br />
				<br />
				Running configure&#8230;<br />
				<br />
				checking build system type&#8230; x86_64-unknown-linux-gnu<br />
				checking host system type&#8230; x86_64-unknown-linux-gnu<br />
				checking whether make sets $(MAKE)&#8230; yes<br />
				checking for gcc&#8230; gcc -m32<br />
				checking for C compiler default output file name&#8230; <br />
				configure: error: C compiler cannot create executables<br />
				See `config.log&#8217; for more details.<br />
				<br />
				Configure failed, aborting install.</p></blockquote>
				<p>
				<br />
				指示通りconfig.logを覗いてみるとこんな記載が。</p>
				<blockquote><p>
				/usr/bin/ld: crt1.o: No such file: No such file or directory<br />
				collect2: ld returned 1 exit status</p></blockquote>
				<p>
				<br />
				調べてみたらcrt1.oは､コンパイル時にgccが内部的にリンクするファイルで、glibc-develパッケージに含まれるモジュールなのだそうだ。<br />
				yumでインストール。</p>
				<blockquote><p>
				# sudo yum install glibc-devel</p></blockquote>
				<p>
				<br />
				再度wineinstallすると以下のメッセージでエラー。</p>
				<blockquote><p>
				configure: error: no suitable flex found. Please install the &#8216;flex&#8217; package.</p></blockquote>
				<p>
				<br />
				yumでインストール。</p>
				<blockquote><p>
				# sudo yum install flex</p></blockquote>
				<p>
				<br />
				エラー。</p>
				<blockquote><p>
				configure: error: no suitable bison found. Please install the &#8216;bison&#8217; package.</p></blockquote>
				<p>
				<br />
				yum。</p>
				<blockquote><p>
				# sudo yum install bison</p></blockquote>
				<p>
				<br />
				これでwineinstallしたらやっと通った。<br />
				</ol>
				<br />
				試しに秀丸エディタを動かしてみた。<br />
				動作には問題がないけども、メニューバーなどの文字が表示されないという現象に遭遇。<br />
				この件はまた別の機会に記事に出来たらと考えています。<br />
				<br />
				今日のところは疲れたのでここまで。<br />
				オヤスミナサイー。</p>
]]></content:encoded>
			<wfw:commentRss>http://itblog.posifeel.com/archives/407.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://itblog.posifeel.com/archives/407.html" />
	</item>
	</channel>
</rss>
