Last active
February 14, 2019 09:00
-
-
Save kaixin-l/4959535 to your computer and use it in GitHub Desktop.
Install IRC Server on CentOS6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Setting up an IRC server on Cent 6 | |
// Create a user and group for this guy | |
$ groupadd ircadmin && useradd -m -g ircadmin -s /bin/bash ircadmin | |
// Make a working directory (/var/source/) | |
mkdir source && cd source | |
// Grab the latest versions of Anope and UnrealIRCd | |
$ wget http://www.unrealircd.com/downloads/Unreal3.2.9.tar.gz http://downloads.sourceforge.net/project/anope/anope-stable/Anope%201.8.7/anope-1.8.7.tar.gz | |
// Make great extractions | |
$ tar zxf Unreal3.2.9.tar.gz | |
$ tar zxf anope-1.8.7.tar.gz | |
// Configure (IMPORTANT: if you get any error like: configure: error: no acceptable C compiler found in $PATH ) type: yum install gcc | |
$ ./Config | |
// Now on your screen you will see configuration like: | |
Do you want to enable the server anti-spoof protection? | |
[Yes] -> | |
What directory are all the server configuration files in? | |
[/var/Unreal3.2] -> | |
What is the path to the ircd binary including the name of the binary? | |
[/var/Unreal3.2/src/ircd] -> | |
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] -> | |
Do you want to support SSL (Secure Sockets Layer) connections? | |
[No] -> | |
Do you want to enable IPv6 support? | |
[No] -> | |
Do you want to enable ziplinks support? | |
[No] -> | |
Do you want to enable remote includes? | |
This allows stuff like this in your configuration file: | |
include “http://www.somesite.org/files/opers.conf”; | |
[No] -> | |
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] -> | |
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] -> | |
How far back do you want to keep the nickname history? | |
[2000] -> | |
What is the maximum sendq length you wish to have? | |
[3000000] -> | |
How many buffer pools would you like? | |
This number will be multiplied by MAXSENDQLENGTH. | |
[18] -> | |
How many file descriptors (or sockets) can the IRCd use? | |
[1024] -> | |
// Just hit enter until your’ve reach the end and leave them by default | |
// Now type make and Unrealircd will compile (remember type make in your Unreal3.2.9 folder) | |
$ make | |
// Copy example.conf from doc folder | |
$ cp doc/example.conf unrealircd.conf | |
// Generate some cloak keys | |
$ ./unreal gencloak | |
// Now it’s time to configure the most important part unrealircd.conf | |
$ vi unrealircd.conf | |
// Uncomment lines 36 and 37, give path to cloak.so | |
loadmodule "/home/ircadmin/conf/modules/commands.so"; | |
loadmodule "/home/ircadmin/conf/modules/cloak.so"; | |
// At line 70 and 71 rename irc.foonet.com and FooNet Server to your desired name | |
name "irc.eli.im" | |
info "Eli IRC Server" | |
// Go to line 87,88,89 and edit the admin section Bob Smith (replace it with your name, bob, [email protected] (replace it with your email address) | |
// Go to line 198 and edit oper bobsmith to oper yournickname, edit password f00 to your password | |
oper yournickname { | |
class clients; | |
from { | |
userhost *@*; | |
}; | |
password "f00"; | |
} | |
// Go to line 253 and delete the entire section from 253 to 262, at the listen line add your ip | |
listen ip:port; | |
// Go to line 312 and delete this section | |
options { | |
autoconnect; | |
ssl; | |
zip; | |
} | |
// Go to line 333 and edit ulines services.roxnet.org and stats.roxnet.org | |
ulines { | |
services.eli.im; | |
stats.eli.im; | |
} | |
// Go to line 741 and edit network-name, default-server, services-server, help-channel | |
// Go to line 758 and 759 and add 2 cloack-keys | |
cloak-keys { | |
"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW"; | |
"and another one"; | |
"and another one"; | |
}; | |
// Go to line 763 and edit local, global, coadmin, admin, servicesadmin, netadmin | |
// Go to line 776 edit kline-address and add your email address | |
kline-address "[email protected]"; | |
// Exit and save unrealircd.conf | |
// Create two files ircd.motd.fr and ircd.rules.fr | |
// Now type ./unreal start and you should see a message starting UnrealIRCd | |
$ ./unreal start | |
// Go to anope folder | |
$ cd ../anope-1.8.7 | |
// Type ./Config to run configuration | |
$ ./Config | |
// When asked in what directory do you want the binaries to be installed? I suggest you install services in Unreal folder, in this example i have installed it on /var/source/Unreal3.2/services, and hit enter until the configuration starts | |
$[/root/services] /var/source/Unreal3.2/services | |
// Now run make, and wait | |
$ make | |
// Now run make install | |
$ make install | |
// Now go to your Unreal3.2 and you will see services folder that we’ve just installed | |
$ cd /var/source/Unreal3.2/services/ | |
// Now edit example.conf to services.conf | |
$ cp example.conf services.conf && vi services.conf | |
// Go to line 99 and uncomment #IRCDModule "unreal32" | |
IRCDModule "unreal32" | |
// Go to line 198 and edit RemoteServer 127.0.0.1 6667 "mypass", set your ip address and password in this example | |
RemoteServer ip port "passwd" | |
// Go to line 229 and edit ServerName "services.localhost.net" | |
ServerName "services.eli.im" | |
// Go to line 349 and edit NetworkName "LocalNet" | |
// Save and quit services.conf and go to your Unreal3.2 folder and open unrealircd.conf and find this section to link anope and unreal | |
link services.eli.im | |
{ | |
username *; | |
hostname *; | |
bind-ip ip; | |
port port; | |
hub *; | |
password-connect "passwd"; | |
password-receive "password"; | |
class servers; | |
} | |
// Save and quit unrealircd.conf and run unreal, if unreal is already running rehash unreal | |
$ ./unreal start | |
// Go to your services folder , /var/source/Unreal3.2/services and start anoperc, DO NOT RUN ANOPE AS ROOT !!! | |
$ ./anoperc start | |
// All done. :-) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment