VDSPlanet.ru Making the difference in VDS Hosting
Установка UnrealIRCD

Материал из Wiki.VDSPlanet.ru.

Перейти к: навигация, поиск

UnrealIRCD по сути не требует установку под пользователем root. Во первых если отсутствует openssl, установим его:

apt-get update
apt-get install openssl libssl-dev

Создаем пользователя отдельно под ircd: adduser ircd

localhost:~# adduser ircd
Adding user `ircd' ...
Adding new group `ircd' (1000) ...
Adding new user `ircd' (1000) with group `ircd' ...
Creating home directory `/home/ircd' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for ircd
Enter the new value, or press ENTER for the default
       Full Name []: IRCd
       Room Number []: 1
       Work Phone []: 11
       Home Phone []: 111
       Other []:
Is the information correct? [y/N] y

Входим под пользователя ircd и переходим в домашнюю папку:

localhost:~# su ircd
ircd@localhost:/root$ cd

Качаем файл UnrealIRCD:

ircd@localhost:~$ wget http://unrealircd.icedslash.com/Unreal3.2.8.1.tar.gz
100%[====================================>] 2,801,622      3.73M/s
10:08:54 (3.72 MB/s) - `Unreal3.2.8.1.tar.gz' saved [2801622/2801622]
ircd@localhost:~$ ls
Unreal3.2.8.1.tar.gz

Распаковываем скаченный архив:

ircd@localhost:~$ tar zfx U*
ircd@localhost:~$ ls
Unreal3.2  Unreal3.2.8.1.tar.gz

Переименовываем папку Unreal3.2.7 в unreal для простоты общения с продуктом и заходим в папку:

mv Unreal3.2 unreal
ircd@localhost:~$ ls
Unreal3.2.8.1.tar.gz  unreal
ircd@localhost:~$ cd unreal
ircd@localhost:~/unreal$

Начинаем сборку продукта:

ircd@localhost:~/unreal$ ./Config
Do you want to enable the server anti-spoof protection?
[No] ->  Просто жмем Enter подтверждая опцию NO.
What directory are all the server configuration files in?
[/home/ircd/unreal] -> Просто жмем Enter подтверждая опцию /home/ircd/unreal
What is the path to the ircd binary including the name of the binary?
[/home/ircd/unreal/src/ircd] -> Просто жмем Enter подтверждая опцию
Would you like to compile as a hub or as a leaf?
Type Hub to select hub and Leaf to select leaf.
[Hub] -> Просто жмем Enter подтверждая опцию Хаб
What is the hostname of the server running your IRCd?
[localhost] -> Просто жмем Enter подтверждая опцию
What should the default permissions for your configuration files be? (Set this to 0 to disable)
It is strongly recommended that you use 0600 to prevent unwanted reading of the file
[0600] -> Просто жмем Enter подтверждая опцию
Do you want to support SSL (Secure Sockets Layer) connections?
[No] -> Yes  Вводим Yes и жмем Enter
If you know the path to OpenSSL on your system, enter it here. If not
leave this blank
[] -> /usr/  Вводим /usr/ и жмем enter.
Do you want to enable IPv6 support?
[No] -> Просто жмем Enter подтверждая опцию
Do you want to enable ziplinks support?
[No] -> Yes Вводим Yes и жмем Enter
If you know the path to zlib on your system, enter it here. If not
leave this blank
[] -> Просто жмем Enter подтверждая опцию
Do you want to enable remote includes?
[No] -> Просто жмем Enter подтверждая опцию
Do you want to enable prefixes for chanadmin and chanowner?
This will give +a the & prefix and ~ for +q (just like +o is @)
Supported by the major clients (mIRC, xchat, epic, eggdrop, Klient,
PJIRC, irssi, CGI:IRC, etc.)
This feature should be enabled/disabled network-wide.
[Yes] -> Просто жмем Enter подтверждая опцию
What listen() backlog value do you wish to use?  Some older servers
have problems with more than 5, others work fine with many more.
[5] -> Просто жмем Enter подтверждая опцию
How far back do you want to keep the nickname history?
[2000] -> Просто жмем Enter подтверждая опцию
What is the maximum sendq length you wish to have?
[3000000] -> Просто жмем Enter подтверждая опцию
How many buffer pools would you like?
This number will be multiplied by MAXSENDQLENGTH.
[18] -> Просто жмем Enter подтверждая опцию
How many file descriptors (or sockets) can the IRCd use?
[1024] -> Просто жмем Enter подтверждая опцию
Would you like any more parameters to configure?
Write them here:
[]-> Просто жмем Enter подтверждая опцию  

Начинается компиляция (Налейте кофе и отдохните). Доходим до Создания сертификата:

You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name [US]:RU
State/Province [New York]:Voronezh
Locality Name (eg, city) []:VRN
Organization Name (eg, company) [IRC geeks]:IRCD geek
Organizational Unit Name (eg, section) [IRCd]:irc
Common Name (Full domain of your server) []:irc.**.com
Generating self-signed certificate ..
/usr/bin/openssl req -x509 -days 365 -in server.req.pem \
              -key server.key.pem -out server.cert.pem
Generating fingerprint ..

Жмем Enter и получаем данное сообщение:

| Now all you have to do is type 'make' and let it compile. When that's |
| done, you will receive other instructions on what to do next.         |

Начинаем сборку (время налить еще чашечку кофе):

ircd@localhost:~/unreal$ make
 __________________________________________________
| Compile is now complete.                         |
| You should now read the documentation and learn  |
| how to configure your IRCd.                      |
|                                                  |
| If you really like UnrealIRCd, and would like to |
| make a donation, please read the Donation file in|
| this archive. :)                                 |
|                                                  |
| Thanks for using Unreal IRCd! If you are in need |
| for any kind of help regarding the IRCd please   |
| read the Unreal.nfo file.                        |
|__________________________________________________|

Переходим к редактированию unrealircd.conf Во первых создаем его:

ircd@localhost:~/unreal$ cp doc/example.conf unrealircd.conf

Переходим к unrealircd.conf, открывая его своим любимым редактором. В моем случае это vim:

ircd@localhost:~/unreal$ vim unreaircd.conf

Переходим на строку 36,37 и меняем данное:

//loadmodule "src/modules/commands.so";
//loadmodule "src/modules/cloak.so";

На данное (раскоментируем):

loadmodule "src/modules/commands.so";
loadmodule "src/modules/cloak.so";

Далее переходим к редактированию строк 68-73:

me
{
       name "irc.foonet.com"; <- можете поменять значение в "" на ваши желаемое.
       info "FooNet Server"; <- можете поменять значение в "" на ваши желаемое (Описание сервера).
       numeric 1;
};

Строки 87-91 ваши данные - тут все понятно.

Строки 198-212 отвечают за распознание Вас как владельца сервера (В IRC чтобы стать опером: /oper mynick 12345) :

oper mynick {
       class           clients;
       from {
               userhost bob@smithco.com;  <- bob@smithco.com можно сменить на *, позволит стать оператором с любого IP
       };
       password "12345";
       flags
       {
               netadmin;
               can_zline;
               can_gzline;
               can_gkline;
               global;
       };
};

Строка 263 отвечает за один из портов на котором IRCd будет запешен. Можно сменить на любой.

Строки 358,359 отвечабт за пароли перезапуска и остановки IRCd из IRC: /die пароль и /restart пароль.

Строки 536-540 отвечают за те сообшения из файлов, которые будут видеть люди с маской *@*.fr; и данная функция нам ненужна:

Делаем так: (закоментируем)
/* tld {
       mask *@*.fr;
       motd "ircd.motd.fr";
       rules "ircd.rules.fr";
}; */

Строки 716-720: (Необходимо добавить два ключа маскировки) Нижеприведенное является примером:

      cloak-keys {
               "aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";
               "and another one";
               "and another one";
       };
 Меняем на:
 cloak-keys {
               "aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";
               "AoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";
               "1oAr1HnR6gl3sJ7hVz4Zb7x4YwpW";
       };

Строка 736: kline-address "set.this.email"; В ней set.this.email надо сменить на ваш e-mail адрес.

Хотите чтобы все пользователи заходили при коннекте на сервер автоматом на Ваш канал:

После строки 739 внесите строку: auto-join "#moikanal";

Сохраняем файл и переходим к запуску ircd:

ircd@localhost:~/unreal$ ./unreal start
Starting UnrealIRCd
 _   _                      _ ___________  _____     _
| | | |                    | |_   _| ___ \/  __ \   | |
| | | |_ __  _ __ ___  __ _| | | | | |_/ /| /  \/ __| |
| | | | '_ \| '__/ _ \/ _` | | | | |    / | |    / _` |
| |_| | | | | | |  __/ (_| | |_| |_| |\ \ | \__/\ (_| |
 \___/|_| |_|_|  \___|\__,_|_|\___/\_| \_| \____/\__,_|
                          v3.2.7
                    using TRE 0.7.5 (LGPL)
                    using OpenSSL 0.9.8c 05 Sep 2006
                    using zlib 1.2.3
* Loading IRCd configuration ..
* Configuration loaded without any problems ..
* Initializing SSL.
* Dynamic configuration initialized .. booting IRCd.
---------------------------------------------------------------------

Идем в свой любимый irc клиент и набираем: /server ip_адрес_вашего_vds и Вы зайдете на сервер.

Смотри также:

Установка Anope IRCd сервисов и связка их с UnrealIRCd: Anope_IRCd_Services