<?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>Web活メモ帳 &#187; CentOS</title>
	<atom:link href="http://blog.verygoodtown.com/tag/centos/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.verygoodtown.com</link>
	<description>WEB開発者が使える世界の情報を発信します。</description>
	<lastBuildDate>Thu, 09 Feb 2012 02:01:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>CentOSでユーザ一覧を確認する方法</title>
		<link>http://blog.verygoodtown.com/2010/09/centos-user-list/</link>
		<comments>http://blog.verygoodtown.com/2010/09/centos-user-list/#comments</comments>
		<pubDate>Fri, 03 Sep 2010 01:13:42 +0000</pubDate>
		<dc:creator>linja</dc:creator>
				<category><![CDATA[サーバー関連]]></category>
		<category><![CDATA[CentOS]]></category>

		<guid isPermaLink="false">http://blog.verygoodtown.com/?p=5016</guid>
		<description><![CDATA[CentOS内のユーザ一覧を確認する方法です。
良く忘れるのでメモ。
/etc/passwdにあります。

[root@localhost ~]# cat /etc/passwd

]]></description>
			<content:encoded><![CDATA[<p>CentOS内のユーザ一覧を確認する方法です。</p>
<p>良く忘れるのでメモ。</p>
<p>/etc/passwdにあります。</p>
<pre class="code">
[root@localhost ~]# cat /etc/passwd
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.verygoodtown.com/2010/09/centos-user-list/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOSにtripwireをインストール際のC++エラー回避</title>
		<link>http://blog.verygoodtown.com/2010/08/webarena-tripwire-install/</link>
		<comments>http://blog.verygoodtown.com/2010/08/webarena-tripwire-install/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 01:44:41 +0000</pubDate>
		<dc:creator>linja</dc:creator>
				<category><![CDATA[サーバー関連]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[WebARENA]]></category>

		<guid isPermaLink="false">http://blog.verygoodtown.com/?p=5098</guid>
		<description><![CDATA[Tripwireをインストールする際にエラーが、、、

configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.


gcc-c++をインストールする事で解決しました。

[root@localhost ~]# yum -y install gcc-c++
Loaded plugins: downloadonly, fastestmirror, priorities
Loading mirror speeds from cached hostfile
 * addons: rsync.atworks.co.jp
 * base: rsync.atworks.co.jp
 * extras: rsync.atworks.co.jp
 * rpmforge: ftp-stud.fht-esslingen.de
 * updates: rsync.atworks.co.jp
rpmforge               [...]]]></description>
			<content:encoded><![CDATA[<p>Tripwireをインストールする際にエラーが、、、</p>
<pre class="code">
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
</pre>
<p><span id="more-5098"></span><br />
gcc-c++をインストールする事で解決しました。</p>
<pre class="code">
[root@localhost ~]# yum -y install gcc-c++
Loaded plugins: downloadonly, fastestmirror, priorities
Loading mirror speeds from cached hostfile
 * addons: rsync.atworks.co.jp
 * base: rsync.atworks.co.jp
 * extras: rsync.atworks.co.jp
 * rpmforge: ftp-stud.fht-esslingen.de
 * updates: rsync.atworks.co.jp
rpmforge                                                           | 1.1 kB     00:00
Excluding Packages in global exclude list
Finished
402 packages excluded due to repository priority protections
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package gcc-c++.x86_64 0:4.1.2-48.el5 set to be updated
--> Processing Dependency: libstdc++-devel = 4.1.2-48.el5 for package: gcc-c++
--> Running transaction check
---> Package libstdc++-devel.x86_64 0:4.1.2-48.el5 set to be updated
rpmforge/filelists                                                 | 2.9 MB     00:04
--> Finished Dependency Resolution

Dependencies Resolved

==========================================================================================
 Package                   Arch             Version                  Repository      Size
==========================================================================================
Installing:
 gcc-c++                   x86_64           4.1.2-48.el5             base           3.8 M
Installing for dependencies:
 libstdc++-devel           x86_64           4.1.2-48.el5             base           2.8 M

Transaction Summary
==========================================================================================
Install       2 Package(s)
Upgrade       0 Package(s)

Total download size: 6.6 M
Downloading Packages:
(1/2): libstdc++-devel-4.1.2-48.el5.x86_64.rpm                     | 2.8 MB     00:00
(2/2): gcc-c++-4.1.2-48.el5.x86_64.rpm                             | 3.8 MB     00:00
------------------------------------------------------------------------------------------
Total                                                     190 kB/s | 6.6 MB     00:35
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : libstdc++-devel                                                    1/2
  Installing     : gcc-c++                                                            2/2 

Installed:
  gcc-c++.x86_64 0:4.1.2-48.el5                                                           

Dependency Installed:
  libstdc++-devel.x86_64 0:4.1.2-48.el5                                                   

Complete!
[root@localhost ~]#
</pre>
<p>こちらの記事を参考にさせて頂きました！サンクスです！<br />
<a href="http://labs.uechoco.com/blog/2008/07/linuxconfgure%E3%81%A7c-preprocessor-libcpp-fails-sanity-check.html" target="_blank">[Linux]confgureでC++ preprocessor “/lib/cpp” fails sanity check</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.verygoodtown.com/2010/08/webarena-tripwire-install/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOSでyum高速化を行う「yum-fastestmirror」</title>
		<link>http://blog.verygoodtown.com/2010/02/centos-yum-speed-up-yum-fastestmirror/</link>
		<comments>http://blog.verygoodtown.com/2010/02/centos-yum-speed-up-yum-fastestmirror/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 03:37:46 +0000</pubDate>
		<dc:creator>linja</dc:creator>
				<category><![CDATA[サーバー関連]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[yum]]></category>
		<category><![CDATA[yum-fastestmirror]]></category>

		<guid isPermaLink="false">http://blog.verygoodtown.com/?p=1988</guid>
		<description><![CDATA[
yum-fastestmirrorはCentOSでyumを実行する際に接続が速いミラーサーバに接続してくれるパッケージです。
FedoraとCentOSで使用可能です。
事前準備
CentOS4の場合、プラグインを有効 [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.verygoodtown.com/wordpress/wp-content/uploads/yum-fastestmirror.png" alt="yum-fastestmirror" title="yum-fastestmirror" width="600" height="160" class="alignnone size-full wp-image-2002" /><br />
yum-fastestmirrorはCentOSでyumを実行する際に接続が速いミラーサーバに接続してくれるパッケージです。<br />
FedoraとCentOSで使用可能です。</p>
<h3>事前準備</h3>
<p>CentOS4の場合、プラグインを有効にする設定が必要になります。</p>
<pre class="code">
# vi /etc/yum.conf
</pre>
<p>プラグンを有効にする1文を追加します。</p>
<pre class="code">
plugins=1
</pre>
<h3>インストール</h3>
<p>CentOS5 の場合</p>
<pre class="code">
# yum -y install yum-fastestmirror
</pre>
<p>CentOS4 の場合</p>
<pre class="code">
yum -y install yum-plugin-fastestmirror
</pre>
<p>これだけでインストール作業は完了です。</p>
<h3>動作確認</h3>
<p>yum-fastestmirrorが実際に動作しているかどうかはcheck-updateコマンドで確認する事が可能です。</p>
<pre class="code">
# yum check-update
Loading "fastestmirror" plugin
Setting up repositories
Determining fastest mirrors
</pre>
<h3>それでもyumが遅かったら</h3>
<p>通常は上記設定だけで高速化されるはずですが、何度かyumを実行しているとキャッシュファイルがたまり、以前ははやかったけど今は遅いミラーを使用してしまう場合があります。</p>
<p>そんな時はキャッシュファイルを削除してあげましょう。まずはキャッシュファイルの場所を調べます。</p>
<pre class="code">
cat /etc/yum/pluginconf.d/fastestmirror.conf
…
hostfilepath=/var/cache/yum/timedhosts.txt
</pre>
<p>hostfilepathにキャッシュファイルが格納されています。<br />
こちらをリネームしてあげれば新しくミラーを探しにいってくれます。</p>
<pre class="code">
# mv /var/cache/yum/timedhosts.txt /var/cache/yum/timedhosts.txt.bak
</pre>
<p>以下のサイトを参考にさせていただきました。感謝！</p>
<p><a href="http://labs.uechoco.com/blog/2008/01/linux_yum_y_install_yumfastestmirroryum.html" target="_blank">[Linux]# yum -y install yum-fastestmirrorでyum高速化 : うえちょこ＠ぼろぐ</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.verygoodtown.com/2010/02/centos-yum-speed-up-yum-fastestmirror/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOSにAPCをインストールする方法</title>
		<link>http://blog.verygoodtown.com/2010/02/centos-apc-install-how-to/</link>
		<comments>http://blog.verygoodtown.com/2010/02/centos-apc-install-how-to/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 08:39:56 +0000</pubDate>
		<dc:creator>linja</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[サーバー関連]]></category>
		<category><![CDATA[ApacheBench]]></category>
		<category><![CDATA[APC]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[pecl]]></category>

		<guid isPermaLink="false">http://blog.verygoodtown.com/?p=1966</guid>
		<description><![CDATA[
APCはPHPの中間コードのキャッシュや最適化を行う拡張モジュールです。基本的にPHPを使うサーバーに全て入れてよいようです。
本日とあるサーバーにインストールしたのでやり方をメモ。
環境
まずは環境ですが、CentO [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.verygoodtown.com/wordpress/wp-content/uploads/apc21.png" alt="apc2" title="apc2" width="600" height="180" class="alignnone size-full wp-image-1970" /><br />
APCはPHPの中間コードのキャッシュや最適化を行う拡張モジュールです。基本的にPHPを使うサーバーに全て入れてよいようです。<br />
本日とあるサーバーにインストールしたのでやり方をメモ。</p>
<h3>環境</h3>
<p>まずは環境ですが、CentOS 4.4 + PHP 5.1.6 です。</p>
<h3>事前準備</h3>
<p>まず、peclが入っているかどうか調べます。</p>
<pre class="code">
# pecl list-all apc
All packages:
=============
Package            Latest   Local
pecl/KTaglib       0.2.0           Library to edit audio properties and tags on MPEG and OGG files
pecl/FliteTTS                      Text to speech voice synthesis for PHP
pecl/Ovrimos                       Ovrimos interface
pecl/DTrace        1.0.3           A Solaris Dtrace provider
pecl/inclued       0.1.0           Clued-in about your inclueds
pecl/zookeeper     0.1.0           PHP extension for interfacing with Apache ZooKeeper
…
…
…
…
</pre>
<p>インストールされているパッケージが表示されれば、このSTEPは読み飛ばしてOKです。<br />
なければインストールます。</p>
<pre class="code">
# yum install -y php-pear
Setting up Install Process
Setting up repositories
update                    100% |=========================|  951 B    00:00
base                      100% |=========================| 1.1 kB    00:00
…
…
…
</pre>
<p>phpizeもインストールします。</p>
<pre class="code">
# yum install -y php-devel
</pre>
<p>apxsも無ければインストール</p>
<pre class="code">
# yum install -y httpd-devel
</pre>
<p>これでやっとpeclがインストールできます。</p>
<h3>インストール</h3>
<p>peclコマンドでインストールできます。</p>
<pre class="code">
# pecl install APC
</pre>
<p>無事にインストールが完了すると以下のようなメッセージがでます。</p>
<pre class="code">
Build process completed successfully
Installing '/var/tmp/pear-build-root/install-APC-3.0.19//usr/lib/php/modules/apc.so'
install ok: channel://pecl.php.net/APC-3.0.19
You should add "extension=apc.so" to php.ini
</pre>
<p>ふむふむ。php.iniに追加しろって事ですね。<br />
って事でphp.iniに以下の行を追加。場所はどこでもかまいません。</p>
<pre class="code">
extension=apc.so
</pre>
<p>iniファイルを編集したらapacheを再起動します。</p>
<p>これでとりあえず作業は完了です。<br />
phpinfoの画面でapcの項目があるか確認します。</p>
<p><img src="http://blog.verygoodtown.com/wordpress/wp-content/uploads/apc1.png" alt="apc" title="apc" width="600" height="660" class="alignnone size-full wp-image-1972" /></p>
<h3>アップグレード</h3>
<p>apcのアップグレードは以下のコマンドで。</p>
<pre class="code">
# pecl upgrade apc
</pre>
<h3>ベンチマーク</h3>
<p>ApacheBenchでどのくらい効果が変わったか測定します。<br />
1000件のリクエストを100の同時接続で計測した結果です。</p>
<pre class="code">
# ab -n 1000 -c 100 http://127.0.0.1/*****/test.php

Benchmarking 127.0.0.1 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Finished 1000 requests

Server Software:        Apache/2.0.63
Server Hostname:        127.0.0.1

Document Path:          /*****/test.php
Document Length:        1257 bytes

Concurrency Level:      100
Time taken for tests:   13.193656 seconds
Complete requests:      1000
Failed requests:        557
   (Connect: 0, Length: 557, Exceptions: 0)
Write errors:           0
Total transferred:      1897728 bytes
HTML transferred:       1504335 bytes
Requests per second:    75.79 [#/sec] (mean)
Time per request:       1319.366 [ms] (mean)
Time per request:       13.194 [ms] (mean, across all concurrent requests)
Transfer rate:          140.45 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    5  17.9      0      80
Processing:    74  923 879.0    498    5931
Waiting:       56  919 880.2    497    5930
Total:        102  929 877.3    502    5931

Percentage of the requests served within a certain time (ms)
  50%    502
  66%    974
  75%   1209
  80%   1371
  90%   2181
  95%   2667
  98%   3048
  99%   4531
 100%   5931 (longest request)
</pre>
<p>トータルで13秒でした。<br />
ふーむ。早くなってるんですかね。念のためapcを無効にして再度ベンチを図ってみました。</p>
<pre class="code">
# ab -n 1000 -c 100 http://127.0.0.1/*****/test.php

Benchmarking 127.0.0.1 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Finished 1000 requests

Server Software:        Apache/2.0.63
Server Hostname:        127.0.0.1
Server Port:            80

Document Path:          /*****/test.php
Document Length:        1257 bytes

Concurrency Level:      100
Time taken for tests:   32.801446 seconds
Complete requests:      1000
Failed requests:        3
   (Connect: 0, Length: 3, Exceptions: 0)
Write errors:           0
Total transferred:      1651341 bytes
HTML transferred:       1258341 bytes
Requests per second:    30.49 [#/sec] (mean)
Time per request:       3280.145 [ms] (mean)
Time per request:       32.801 [ms] (mean, across all concurrent requests)
Transfer rate:          49.14 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0   62 171.8      0     599
Processing:   288 2895 1431.8   2741   22702
Waiting:        8 2886 1441.0   2740   22701
Total:        616 2958 1410.4   2760   23294

Percentage of the requests served within a certain time (ms)
  50%   2760
  66%   2896
  75%   2959
  80%   2987
  90%   3437
  95%   4084
  98%   6956
  99%   9495
 100%  23294 (longest request)
</pre>
<p>トータルで32秒でした。おお！19秒も違いますね。<br />
まさか、倍以上違うとは、、、</p>
<p>まだ入れてない方はぜひ。</p>
<h3>参考</h3>
<p>ちなみに高速化モジュールは他にも以下のようなものがあります。</p>
<ul>
<li>eAccelerator</li>
<li>PHPA(PHP Accelerator)</li>
<li>XCache</li>
</ul>
<p>今回はyumから入れたいという理由でAPCを採用しました。</p>
<p>導入にあたっては以下の記事を参考にさせていただきました。ありがとうございます。</p>
<p><a href="http://www.doyouphp.jp/tips/tips_apc.shtml" target="_blank">APC（Alternative PHP Cache）再び &#8211; Do You PHP?</a></p>
<p><a href="http://www.ideaxidea.com/archives/2009/01/php_apc.html" target="_blank">PHP（というかWordPress）高速化のためにAPC（Alternatice PHP Cache）入れた &#8211; IDEA*IDEA ～ 百式管理人のライフハックブログ</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.verygoodtown.com/2010/02/centos-apc-install-how-to/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOSのバージョンを調べる方法</title>
		<link>http://blog.verygoodtown.com/2010/02/centos-version-check/</link>
		<comments>http://blog.verygoodtown.com/2010/02/centos-version-check/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 04:09:53 +0000</pubDate>
		<dc:creator>linja</dc:creator>
				<category><![CDATA[サーバー関連]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[バージョン]]></category>

		<guid isPermaLink="false">http://blog.verygoodtown.com/?p=1962</guid>
		<description><![CDATA[以下のコマンドで調べる事が出来ました。

# cat /etc/redhat-release

CentOS release 5 (Final)とか表示されます。
いっつも忘れるのでメモメモ。
]]></description>
			<content:encoded><![CDATA[<p>以下のコマンドで調べる事が出来ました。</p>
<pre class="code">
# cat /etc/redhat-release
</pre>
<p>CentOS release 5 (Final)とか表示されます。<br />
いっつも忘れるのでメモメモ。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.verygoodtown.com/2010/02/centos-version-check/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

