OpenSUSE Leap 42: ngIRCdをインストールする

IRCサーバのngIRCdをインストールする手順を記載します。

1 ngIRCdのインストール

以下のスクリプトはngIRCdをインストールします。

#!/bin/sh

set -e

DOMAIN=opensuse-14-ngircd.hiroom2.com

O=http://download.opensuse.org
A=${O}/repositories/server:/irc/openSUSE_Leap_42.2/
sudo zypper ar -f -n Applications ${A} Applications
sudo zypper -n --gpg-auto-import-keys ref
sudo zypper -n in ngircd

sudo sed -e "s/Name = irc.example.net/Name = ${DOMAIN}/g" \
     -e 's/;OperCanUseMode = no/OperCanUseMode = yes/g' \
     -e 's/;Name = TheOper/Name = TheOper/g' \
     -e 's/;Password = ThePwd/Password = ThePwd/g' \
     -i /etc/ngircd.conf

for t in FW_SERVICES_EXT_TCP FW_SERVICES_DMZ_TCP FW_SERVICES_INT_TCP; do
  sudo sed -e "s/^${t}=\"\(.*\)\"/${t}=\"\1 6667\"/g" \
       -i /etc/sysconfig/SuSEfirewall2
done
sudo systemctl restart SuSEfirewall2

sudo systemctl enable ngircd
sudo systemctl restart ngircd

2 その他の設定

/etc/ngircd.confでngIRCdを設定します。

  • Name = TheOperとPassword = ThePwdはOPERコマンドで使用するIRCオペレータのユーザ名とパスワードです。お使いのユーザ名とパスワードに変更してください。IRCオペレータを使用しない場合は-eオプションでの置換を実行しないようにしてください。
  • IRCサーバの接続にパスワードを必要とするには、[Global]セクションのPasswordを設定します。
  • IRCサーバへ接続するIPアドレスを限定するには、[Global]セクションのListenを変更します。
  • IRCサーバのポートは6667です。変更するには、[Global]セクションのPortを変更します。
  • チャンネルオペレータ権限がない状態から権限を得るには、OPERコマンドでIRCオペレータ権限を取得してから、OPコマンドでチャンネルオペレータ権限を取得します。
/OPER TheOper ThePwd
/OP