<?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>ststyle.net &#187; Apache</title>
	<atom:link href="http://www.ststyle.net/weblog/archives/tag/apache/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ststyle.net/weblog</link>
	<description>Just another ststyle techlog</description>
	<lastBuildDate>Mon, 19 Jul 2010 13:53:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Apache インストール</title>
		<link>http://www.ststyle.net/weblog/archives/258</link>
		<comments>http://www.ststyle.net/weblog/archives/258#comments</comments>
		<pubDate>Thu, 15 Oct 2009 08:36:34 +0000</pubDate>
		<dc:creator>ststyle</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Install]]></category>

		<guid isPermaLink="false">http://www.ststyle.net/weblog/?p=258</guid>
		<description><![CDATA[1] apache の取得
apache よりダウンロード
2] apache 展開&#38;コンパイル
/usr/local/src/下に配置
※SSLを組み込む場合は事前にOpenSSLをインストールし、 confi [...]]]></description>
			<content:encoded><![CDATA[<h3>1] apache の取得</h3>
<p style="padding-left: 30px;"><a href="http://www.apache.org">apache</a> よりダウンロード</p>
<h3>2] apache 展開&amp;コンパイル</h3>
<p style="padding-left: 30px;">/usr/local/src/下に配置</p>
<p style="padding-left: 30px;">※SSLを組み込む場合は事前にOpenSSLをインストールし、 configure オプションに</p>
<p style="padding-left: 30px;">&#8211;with-ssl=../openssl-X.X.XX/ \</p>
<p style="padding-left: 30px;">&#8211;enable-shared=ssl</p>
<p style="padding-left: 30px;">を加える</p>
<p style="padding-left: 30px;">今回はロードバランサ(Pound)側にてSSLラッパするのでOpenSSLのインストールは行わない</p>
<pre class="brush: bash; auto-links: false;">

$su -
cd /usr/local/src/
tar -zxvf httpd-2.2.10.tar.gz
cd httpd-2.2.10/

./configure \
--prefix=/usr/local/apache \
--enable-rewrite=shared \
--enable-headers \
--enable-ssl \
--enable-proxy \
--enable-proxy-balancer \
--enable-so \
--enable-setenvif \
--enable-status
;

make
</pre>
<h3>3] インストール</h3>
<pre class="brush: bash; auto-links: false;">

su -

make install
</pre>
<h3>4] Apacheの起動</h3>
<p>Apache 2.0まではSSLとして起動する場合は<br />
下記のコマンドオプションでした。</p>
<p>/usr/local/apache/bin/apachectl startssl</p>
<p>Apache 2.2 からは、この「startssl」というオプションが廃止され、<br />
SSLを起動する場合でも「start」オプションでよくなった。</p>
<h3>5] 自動起動スクリプトの作成</h3>
<p>サーバブート時に自動でApacheが起動するようにします</p>
<pre class="brush: bash; auto-links: false;">

su -

vi /etc/rc.d/rc.local

APACHECTL=/usr/local/apache/bin/apachectl
if [ -x $APACHECTL ]; then
echo -n &quot;Starting Apache web server&quot;
$APACHECTL start
echo &quot;.&quot;
fi
</pre>
<h3>6] 自動起動の確認</h3>
<p>サーバを再起動してみます</p>
<pre class="brush: bash; auto-links: false;">

shutdown -r now
</pre>
<p>プロセスコマンドを発行し</p>
<p>下記のようにプロセスが立ち上がっている事を確認します</p>
<pre class="brush: bash; auto-links: false;">
ps ax

2923 ?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Ss&nbsp;&nbsp;&nbsp;&nbsp; 0:00 /usr/local/apache/bin/httpd -k start
2935 ?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0:00 /usr/local/apache/bin/httpd -k start
2936 ?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0:00 /usr/local/apache/bin/httpd -k start
2937 ?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0:00 /usr/local/apache/bin/httpd -k start
2938 ?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0:00 /usr/local/apache/bin/httpd -k start
2939 ?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; S&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0:00 /usr/local/apache/bin/httpd -k start
</pre>
<p>あとは実際にブラウザにて確認します</p>
<p>http://{サーバー名orIPアドレス}/<br />
https://{サーバー名orIPアドレス}/</p>
<p>うまくいっていればデフォルトでは</p>
<p><span style="color: #808080;">It works!</span></p>
<p>が表示されるはずです。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ststyle.net/weblog/archives/258/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
