IRCD Hybrid是一个自由和开放源码轻量级互联网中继聊天 (IRC) 守护进程。IRCD Hybrid是被熟知的是快速和高性能。有了Anope的支持,Ircd Hybrid的性能可以得到更好提升。IRCD Hybrid和 Anope 服务相结合,可以搭建出功能丰富、高性能 IRC 服务器。
在这篇文章中,我将逐步介绍如何配置 Ubuntu 14.04 linux发行版上的 IRC Hybrid和 Anope服务。
Step 1 - Installation of the required dependencies
$ sudo apt-get install build-essential cmake openssllibssl-dev
Step 2 - Download and install IRCD-Hybrid
$ cd/tmp/
$wget https://github.com/ircd-hybrid/ircd-hybrid/archive/8.2.8.tar.gz
$ tar –xvf8.2.8.tar.gz
$ cdircd-hybrid-8.2.8/
$ sudoapt-get install build-essential
$./configure --prefix="/home/ infomgr /ircd"
$ make
$ makeinstall
Step3 - Download and install Anope Services
1. Download anope withthe wget command and extract the tar.gz file:
cd /tmp
wgethttps://github.com/anope/anope/releases/download/2.0.2/anope-2.0.2-source.tar.gz
tar -xzf 2.0.2.tar.gz
2. Then enter the anope directory.
cd anope-2.0.2-source/
3. And compile and install anope. These are the same steps thatwe used to install ircd-hybrid. I will install it under user "infomgr"as well into the directory "services".
Now run this as "root" privileges:
./Config
and you will be asked "where do you want to install"anope. Enter the following directory "/home/ infomgr /services/" andthen press "Enter".
Next enter the "build"directory and then use a command "make && make install" tocompile and install anope services.
cd build
make && make install
When the installation is complete, go to the infomgr homedirectory and change the owner for directory "services" touser "infomgr".
cd /home/ infomgr /
chown -R infomgr: infomgr services/
Step4 - Configure IRCD-Hybrid
1. Before you edit the configuration file, please generate apassword with "mkpasswd"commandin the "bin" directory.This password is used later for the admin/operator access.
cd ~/ircd/bin
./mkpasswd
type your password
2. Now switch to user infomgr to configure ircd-hybrid. Please go to thedirectory " ircd /etc/" and copy afile "reference.conf" toa new file "ircd.conf".
su - infomgr
cd ircd/etc/
cp reference.conf ircd.conf
3. Edit the file ircd.conf with the vim editor.
vim ircd.conf
Go to line 40 - the serverinfoblock - and change it to your server info, below myexample:
name = "infomgr.local";
description = "ircd-hybrid Infomgr server";
network_name = "InfomgrNet";
network_desc = "This is Infomgr Network";
Now edit the admin info in line 195:
name = "Infomgr Admin";
description = "Infomgr Server Administrator";
email = "<vermillion@infomgr.local>";
and in the auth block on line 428,comment "flag" theoption:
# flags = need_ident;
and set the oprator oradmin for irc server in line 437 :
name = "infomgr"; #operator username
user = "*@192.168.1.*"; # this is my network IP
password = "$1$zylz9BKK$AQg/dc/Ig04YuvPgkCtFK0"; #password generated with mkpasswd
encrypted = yes;
And finally you have to "define a server to connectto" in the connect block line 566.The configuration is use by ircd-hybrid for the connection to anope :
name = "services.infomgr.local";
host = "192.168.1.109"; #server ip
send_password = "12345"; #use your password
accept_password = "12345";
port = 6666;
Then save the configuration file.
4. Start ircd-hybrid in bin directory
cd ~/ircd/bin/
./ircd
Try connect to your IRC server with an IRC client like mIRC,hexchat or xchat.
/server 192.168.1.109
Login with user infomgr, try tobe an operator/admin.
/oper infomgr aqwe123
Step5 - Configure Anope Services
1. Go to the anope installation directory as user "infomgr"and copy the file "example.conf"tothe new file "services.conf".
su infomgr
cd ~/services/conf
cp example.conf services.conf
2. Edit the configuration file with the vim editor.
vim services.conf
Edit the uplink block in line 154 -this is used by anope for the connection to ircd. Make sure this configuration matcheswith connect block in the ircd configuration.
#Server IP
host = "192.168.1.109"
port = 6666
#default port is 7000
password = "12345"
Then change the serverinfo block in line 198 andmake sure it is matches with the connect block inthe ircd-hybrid configuration.
name = "services.infomgr.local"
Finally you have to define the ircd software that you use in the moduleblock in line 260. Change "inspircd20" to "hybrid".
name = "hybrid"
Save the configuration file.
3. Run the anope services.
cd ~/services/bin
./anoperc start
Now you can check that the anope services are connectedwith ircd-hybrid. Connect to the IRC server and check with this command:
/whois ChanServ
Step6 - Add SSL to IRCD-Hybrid
1. Before you edit the ircd-hybrid configuration, you have togenerate a SSL certificate for ircd. Please go to the "hybrid/etc/" directory.
cd ~/ircd/etc/
And generate a private rsa.key withthe openssl command, change the permission to 600 withchmod:
openssl genrsa -out rsa.key 2048
chmod 600 rsa.key
Now generate the SSL certificate for the encrypted clientconnection with our rsa.key private key:
openssl req -new -days 365 -x509 -key rsa.key -out cert.pem
Enter your data like Country etc. when requested by OpenSSL.
and the last, generate a dhparam file with command :
openssl dhparam -out dhparam.pem 2048
Just wait, because it will take some time.
2. Now go to the ircd directory and edit the configurationfile "ircd.conf".
cd ~/ircd/etc/
vim ircd.conf
Uncomment thessl configuration in the serverinfo block:
rsa_private_key_file = "etc/rsa.key"; # Line 114
ssl_certificate_file = "etc/cert.pem"; # Line 136
ssl_dh_param_file = "etc/dhparam.pem"; # Line 151
And finally you have to comment the hostin the listenblock at line 353.
# host = "192.168.0.1";
Save and exit.
3. Restart ircd-hybrid and anope:
killall ircd
~/ircd/bin/ircd
~/services/bin/anoperc start
Step7 - Testing
Try to connect to your IRC server with an IRC client, I'll beusing Hexchat here and seewhat happens:
/server -ssl 192.168.1.109 6697
note :6697 is default port for SSL Connection on ircd-hybrid.