日曜日, 6月 07, 2009

ircd-hybrid - irc サーバのインストール

会社で irc を使う機会が増えてきたので、自宅のサーバにも irc を入れてみることにしました。

自分の使っているのは、こんな環境。

# uname -a
Linux Ubuntu 2.6.27-14-generic #1 SMP Wed Apr 15 18:59:16 UTC 2009 i686 GNU/Linux


で、とりあえず、いつものように apt-cache search を使って、irc サーバを探してみることにしました。

# apt-cache search ircd
bopm - Blitzed Open Proxy Monitor
dancer-ircd - an IRC server designed for centrally maintained network
dancer-ircd-doc - Dancer documentation
dancer-services - IRC services implementation for dancer-ircd
digitools - A set of tools to control ASUS Digimatrix embedded hardware
hybrid-dev - development files for ircd-hybrid
hybserv - IRC services for IRCD-Hybrid
inputlirc - Zeroconf LIRC daemon using input event devices
inspircd - Modular IRCd written in C++
inspircd-dbg - Modular IRCd written in C++ - debugging symbols
ircd-hybrid - high-performance secure IRC server
ircd-irc2 - The original IRCNet IRC server daemon
ircd-ircu - Undernet IRC Server daemon
ircd-ratbox - advanced, stable and fast ircd
ircd-ratbox-dbg - debugging symbols for ircd-ratbox
libpoe-filter-ircd-perl - a POE-based parser for the IRC protocol
mythbuntu-lirc-generator - Mythbuntu Lirc Configuration Generator
ngircd - Next generation IRC Server
oftc-hybrid - Hybrid 7 IRC daemon - OFTC branch
oftc-hybrid-doc - Documentation for oftc-hybrid
ratbox-services-common - irc services for use with ircd-ratbox
ratbox-services-mysql - irc services for use with ircd-ratbox with the mysql backend
ratbox-services-pgsql - irc services for use with ircd-ratbox with the PostgreSQL backend
ratbox-services-sqlite - irc services for use with ircd-ratbox with the sqlite backend


探してはみたものの、どれがいいのか、サッパリ分かりません。

「とりあえず、ircd とついているもののどれかをインストールしよう」ということにし、検討してみました。

ircd-ratbox - advanced, stable and fast ircd
ircd-ratbox-dbg - debugging symbols for ircd-ratbox
ratbox-services-common - irc services for use with ircd-ratbox
ratbox-services-mysql - irc services for use with ircd-ratbox with the mysql backend
ratbox-services-pgsql - irc services for use with ircd-ratbox with the PostgreSQL backend
ratbox-services-sqlite - irc services for use with ircd-ratbox with the sqlite backend


ircd-ratbox は、デバックのためのパッケージや、Database と接続して何かをするためのパッケージがあって、拡張性が高そうだけど、そこまで高機能な irc サーバは求めていないので、却下。

あとは、

ircd-hybrid - high-performance secure IRC server
ircd-irc2 - The original IRCNet IRC server daemon
ircd-ircu - Undernet IRC Server daemon


あたりで検討をしてみたけれど、

high-performance secure IRC server


と説明にある ircd-hybrid というのをインストールすることにした。


# apt-get install ircd


としてインストール完了。インストールが完了すると同時にサービスが起動していた。

早速、接続してみようと、LimeChat で接続を試みるが、アクセスすることができない。ircd のログを見てみるが、"Server Ready" とあるだけで、特にエラーなどは発生していないようだった。

# less /var/log/ircd/ircd-hybrid.log
[2009/6/7 16.35] Server Ready


しかし、接続できないということは「何かしら設定が間違っている」、というより、「そもそも自分の環境に合わせて設定をしていないんだから接続出来る訳がない」ということで、設定ファイルを編集することにしました。

# vi /etc/ircd-hybrid/ircd.conf


「とりあえず、IP アドレスを設定するようなところはないかな?」と探したところ、以下のような行が見つかりました。

/* listen {}: contain information about the ports ircd listens on (OLD P:) */
listen {
/* port: the specific port to listen on. if no host is specified
* before, it will listen on all available IPs.
*
* ports are seperated via a comma, a range may be specified using ".."
*/

/* port: listen on all available IPs, ports 6665 to 6669 */
host = "127.0.0.1"; # change this!
port = 6665 .. 6669;
};


「"change this!" って書いてあるwwww なんて、親切なんだ」と思い、ここの行を次のように自分のサーバの IP アドレスに変更をしました。

        #host = "127.0.0.1";    # change this!
host = "192.168.0.4"; # change this!


以上のように設定して、ircd サーバを再起動すると、無事に LimeChat で接続することができました!!

# /etc/init.d/ircd-hybrid restart




と、ここで「インストールと同時にサービスが起動していたので、もしかしたら、起動時のサービスに登録されているかも?」という一抹の不安を覚え、再起動して確認したところ、ircd が勝手に起動していました。。。

そういう訳で、以下のように OS 起動時にサービスが起動しないように設定しておきました。

# update-rc.d -f ircd-hybrid remove


逆に、OS 起動時にサービスを起動するように設定する場合は、以下のようにする。

# update-rc.d -f ircd-hybrid defaults



【参考】
: IRCD-Hybrid -- High Performance Internet Relay Chat :
不要サービスの停止、自動起動の設定、ランレベル

0 件のコメント:

コメントを投稿