Unreal IRC-Server mit Anope, Denora, Lighttpd, php, phpmyadmin und mysql
Datum: 06.05.2006 12:00:00Wichtig: Dieses Tutorial ist nicht mehr aktuell, alle Komponenten sind mittlerweile in neueren Versionen erschienen und das ganze Tutorial müsste angepasst werden, was ich aus Zeitmangel und Lust-Mangel, da ich auch selbst keinen IRC-Server mehr betreibe, nicht machen werde. Der Vollständigkeit halber bleibt das Tutorial trotzdem online, vielleicht hat ja irgendjemand Lust es irgendwann komplett auf den neuesten Stand zu bringen und auf seiner Seite zu veröffentlichen. Es steht wie die anderen Texte auf dieser Seite unter Creative Commons BY-NC-SA.
Gliederung:
- Die Einleitung
- Die Konfigurationsdaten
- Downloaden und entpacken der benötigten Daten
- mySQL 4.0.26
- Lighttpd 1.4.10
- PHP 5.1.6
- phpMyAdmin 2.8.0 (webinstall)
- Unrealircd 3.2
- Anope 1.7.13
- Denora 1.2 RC 2
- phpdenora 3.2
- Einweisung in die gängigen IRC-Befehle für OPs und die Bots
Die Einleitung
Dieses Tutorial soll zeigen wie man sich ein Chroot mit einem Unreal-IRC-Server und ein paar netten kleinen Erweiterungen erstellt, dazu gehören Services wie Nickserv, Botserv, Chanserv etc, und natürlich Statistiken und ähnlichem
Als Ausgangsbasis kam bei mir ein Debian-Chroot von Sclot zum Einsatz. Hier mal vielen Dank, weil ohne ihn hätte ich es nicht geschafft :)
Vor dem Beginn wurde folgendes apt-get aufgeführt um später nicht irgendwas nachinstallieren zu müssen:
apt-get install gcc g++ binutils make libc6-dev bin86 libncurses5-dev libfreetype6 libjpeg62 libjpeg62-dev libungif3g flex libgdbm-dev libpng2-dev libttf2 libttf-dev freetype2
wget libxml2-dev bzip2 bison vim less curl libcurl3-dev
Wird kein Debian (oder anderes Linux-Derivat mit apt-get) benutzt, sollten folgende Pakete installiert sein:
- gcc
- g++
- binutils
- make
- libc6-dev
- bin86
- libncurses5-dev
- libfreetype6
- libjpeg62
- libjpeg62-dev
- libungif3g
- flex
- libgdbm-dev
- libpng2-dev
- libttf2
- libttf-dev
- freetype2
- wget
- libxml2-dev
- bzip2
- bison
- vim
- less
- curl
- libcurl3-dev
Getestet wurde das ganze auf einem Alturo-Root-Server (1200mhz Celeron mit 256 MB RAM) mit Standard-Suse-Image in einem Debian-Chroot.
Die Dauer würde ich auf 4++ Stunden mit Kompilieren, Konfigurationsdateien editieren etc schätzen.
Die Größe der Sources sind ca 30 MB
Über Rückmeldungen, Tips was man besser machen kann würde ich mich sehr freuen.
Das kopieren und veröffentlichen dieses Tutorials ist nur auf folgenden Seiten erlaubt:
www.robo47.net
developers-guide.net
Eine Anmerkung noch, ich verwende als Passwort immer xxx, benutze den Root-mysql-Benutzer etc, und eine Subdomain meiner Domain, das ist nur zur vereinfachten Darstellung, auf einem Produktiv-System sollten natürlich im mySQL ein passender Benutzer angelegt werden, es sollten sichere Passwörter verwendet werden und natürlich sollten IP-Adressen, Domains, Ports und soweiter an die bestehende Umgebung angepasst werden, aber ich denke das sollte eigentlich klar sein.
Nach oben Weiter zu Konfigurationsdaten (Teil 2)
Die Konfigurationsdaten
Konfiguration
Die gewünschte Konfiguration. Hier stehen alle relevanten Informationen die ich mir vor dem Tutorial bereitgelegt habe um immer schauen zu können was wo läuft und soweiter.
Webserver: Domain: irc.robo47.net
Port: 10000
phpmyadmin: Domain: http://irc.robo47.net:10000/pma/
IRC-Server: IP: 217.160.135.87
Port: 9999
Services-Port: 9998
mySQL-Server: IP: 217.160.135.87
Port: 9997
socket: /tmp/mysql40.sock
Anope-Server Adress: services.robo47.net
Denora-Server Adress: stats.robo47.net
Nach oben Weiter zu Downloaden (Teil3)
Downloaden und entpacken der benötigten Daten
mkdir /src
cd /src
wget http://dev.mysql.com/get/Downloads/MySQL-4.0/mysql-4.0.26.tar.gz/from/http://ftp.gwdg.de/pub/misc/mysql/
wget http://www.php.net/get/php-5.1.6.tar.gz/from/de3.php.net/mirror
wget http://unrealircd.pimpmylinux.org//Unreal3.2.4.tar.gz
wget http://ovh.dl.sourceforge.net/sourceforge/anope/anope-1.7.13.tar.gz
wget http://www.lighttpd.net/download/lighttpd-1.4.10.tar.gz
wget http://denora.nomadirc.net/denora-1.2.0-RC2.tar.bz2
wget http://switch.dl.sourceforge.net/sourceforge/phpdenora/phpdenora-1.0.0-rc3.tar.gz
wget http://switch.dl.sourceforge.net/sourceforge/phpmyadmin/phpMyAdmin-2.8.0.tar.gz
tar -xzvf Unreal3.2.4.tar.gz
tar -xzvf mysql-4.0.26.tar.gz
tar -xzvf phpdenora-1.0.0-rc3.tar.gz
tar -xzvf anope-1.7.13.tar.gz
tar -xzvf lighttpd-1.4.10.tar.gz
tar -xzvf php-5.1.6.tar.gz
tar -xzvf phpMyAdmin-2.8.0.tar.gz
tar -xvjf denora-1.2.0-RC2.tar.bz2
mkdir tar
mv *.tar.gz /src/tar
mv *.tar.bz2 /src/tar
Nach oben Weiter zu mySQL (Teil4)
mySQL 4.0.26
mySQL
mySQL wird von Anope und von Denora für die Speicherung der Daten verwendet
adduser irc-mysql # Passwort: irc-mysql cd /src/mysql-4.0.26 damit später Denora und Anope sauber ihre SQL-Clients finden, erstmal eine Installation ohne Prefix
./configure \
--enable-thread-safe-client \
--enable-assembler \
--with-comment \
--with-vio \
--with-extra-charsets=all \
--enable-local-infile \
--with-gnu-ld \
--with-isam \
--with-tcp-port=9997 \
--with-unix-socket-path=/tmp/mysql40.sock \
make jetzt die normale Installation
make install
make clean
make distclean./configure \
--prefix=/srv/mysql4 \
--localstatedir=/srv/mysql4/mysqldata \
--enable-thread-safe-client \
--enable-assembler \
--with-comment \
--with-vio \
--with-extra-charsets=all \
--enable-local-infile \
--with-gnu-ld \
--with-isam \
--with-tcp-port=9997 \
--with-unix-socket-path=/tmp/mysql40.sock \
make
make install
make clean
make distclean
cd /lib
ln -s /usr/local/lib/mysql/libmysqlclient.so.12
ln -s /usr/local/lib/mysql/libmysqlclient.so.12.0.0
ldconfig
chown -R irc-mysql:irc-mysql /srv/mysql4 jetzt mittels
su irc-mysql
/srv/mysql4/bin/mysql_install_db
cd /srv/mysql4/libexec
cp mysqld irc_mysqld
#mysql starten:
/srv/mysql4/libexec/irc_mysqld -u irc-mysql --port=9997 --socket=/tmp/mysql40.sock &/srv/mysql4/bin/mysqladmin -u root password 'xxx' das Passwort
setzen und dann wieder als Root ins System: exit So jetzt ist mySQL fertig installiert und konfiguriert!
Nach oben Weiter zu lighttpd (Teil 5)
Lighttpd 1.4.10
lighttpd
lighttpd dient uns als kleiner Webserver um später die Statistiken via phpDenora anzeigen zu lassen.
adduser irc-lighttpd
## Passwort: irc-lighttpd
cd /src/lighttpd-1.4.10
./configure --prefix=/srv/lighttpd
make
make install
make clean
make distclean
cd /srv/lighttpd
chown -R irc-lighttpd:irc-lighttpd /srv/lighttpd
su irc-lighttpd
mkdir conf
mkdir logs
mkdir htdocs
cd sbin
cp lighttpd irc_lighttpd
cp /src/lighttpd-1.4.10/doc/lighttpd.conf /srv/lighttpd/conf
Jetzt wird die Config angepasst:
1) mod_cgi entkommentiert (Zeile 29)
2) server.document-root auf /srv/lighttpd/htdocs/ setzen (Zeile 40)
3) server.errorlog auf /srv/lighttpd/logs/error.log (Zeile 43)
4) acceslog.filename auf /srv/lighttpd/logs/access.log (Zeile 116)
5) den Block:
$HTTP["url"] =~ "\.pdf$" { auskommentieren (Zeile 125 - 127) 6) server.port entkommentieren und auf 10000 setzen (Zeile 138) 7) server.bind entkommentieren und auf irc.robo47.net setzen (Zeile 141) 8)
die Zeile
server.range-requests = "disable"
}cgi.assign = ( ".php" => "/srv/php/bin/irc_php-cgi") einfügen (Zeile 221) 9) die datei speichern :) /srv/lighttpd/sbin/irc_lighttpd -f
/srv/lighttpd/conf/lighttpd.conf Und schon läuft auch der lighttpd.
exit
Nach oben Weiter zu php (Teil 6)
PHP 5.1.6
php
Denora braucht für seine Web-Oberfläche PHP.
adduser irc-php
#Passwort: irc-php
cd /src/php-5.1.6
./configure \
--prefix=/srv/php \
--with-_lib=lib \
--with-config-file-path=/srv/php \
--with-exec-dir=/srv/lighttpd/htdocs \
--disable-debug \
--enable-ctype \
--enable-cgi \
--enable-discard-path \
--enable-force-cgi-redirect \
--enable-gd-imgstrttf \
--enable-gd-native-ttf \
--enable-inline-optimization \
--enable-memory-limit \
--enable-mbstring \
--enable-shmop \
--enable-sigchild \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--enable-sockets \
--enable-track-vars \
--enable-trans-sid \
--enable-wddx \
--with-curl \
--with-freetype \
--with-gd \
--with-gif-dir=/usr \
--with-gettext \
--with-iconv \
--with-jpeg-dir=/usr \
--with-mysql=/srv/mysql4 \
--with-png-dir=/usr \
--with-zip \
--with-zlib \
make
make install
make clean
make distclean
chown -R irc-php:irc-php /srv/php
su irc-php
cd /srv/php/bin
cp php irc_php-cgi
cp /src/php-5.1.6/php.ini-recommended /srv/php/php.ini
exit
Wer will, kann jetzt noch seine php.ini anpassen, aber für das was installiert werden soll ist es nicht unbedingt nötig
Nach oben Weiter zu phpmyadmin (Teil 7)
phpMyAdmin 2.8.0 (webinstall)
phpMyAdmin
Zur Pflege der Datenbank, zum vereinfachten Einspielen von Daten, eine graphische Oberfläche für mySQL.
cd /src/
cp -R phpMyAdmin-2.8.0 /srv/lighttpd/htdocs/
cd /srv/lighttpd/htdocs
mv phpMyAdmin-2.8.0 pma
mkdir pma/config
chmod -R 777 pma
Jetzt im Browser folgende URL (Javascript muss aktiviert sein) aufrufen:
http://irc.robo47.net:10000/pma/scripts/setup.php
Geht auf den ADD-Button unter Server und trage dort folgende Werte ein:
Server hostname: localhost Auf Add klicken und danach unter
Server socket: /tmp/mysql40.sock
Connection type: socket
PHP extension to use: mysql
Authentication type: http
"Configuration auf Save"
cd /srv/lighttpd/htdocs/pma/config und schon könnt ihr unter http://irc.robo47.net:10000/pma/ euren phpMyAdmin nutzen
cp config.inc.php /srv/lighttpd/htdocs/pma/
cd ..
rm -R config
chown -R irc-lighttpd:irc-lighttpd /srv/lighttpd
Nach oben Weiter zu unrealIRCD (Teil 8)
Unrealircd 3.2
Unrealircd
Der IRC-Server selbst!
So jetzt fangen wir mal an unseren IRC-Server selbst aufzusetzen. cd /src/Unreal3.2
mkdir /srv/unreal
./Config
Zu den Fragen:
server anti-spoof protection -> Yes
server configuration files -> /srv/unreal
binary -> /srv/unreal/irc_unrealircd
Hub or Leaf -> Hub
hostname -> entweder steht der richtige schon da, oder man muss ihn halt selbst eingeben
permissions for your configuration files -> 0600
ssl -> no
IPv6 support -> no
ziplinks support -> no
remote includes -> no
prefixes für admin and owner -> yes
backlog -> 5
nickname history -> 2000
sendq -> 1500000
buffer pools -> 18
fire descriptors -> 1024
any more parameters -> leer lassen
Dann heißt es warten bis es durchgelaufen ist und weiter mit: make
make install
make clean
adduser irc-unreal
chown -R irc-unreal:irc-unreal /srv/unreal/
Dann nehmen wir uns die Beispiel-Config: http://www.chatterportal.de/index.php?section=unrealircd_anleitung3 und passen sie an
############################################## speicherst sie als unrealircd.conf im /srv/unreal/-Verzeichnis
# Creavix.org IRCD Konfiguration by Andre #
##############################################
// Jetzt gehen wir paar Zeilen runter und editieren die ME:Block
me {
name "irc.robo47.net";
info "Robo47 IRC Network";
numeric 1;
};
// Im Admin Block stehen z.B. deine Opers
admin {
"Operators:";
"Robo47 (robo47@robo47.net)";
};
// class Blöcke definieren Verbindungs Klassen|-
class clients
{
pingfreq 90;
maxclients 500;
sendq 100000;
recvq 4000;
};
class servers
{
pingfreq 90;
maxclients 10;
sendq 1000000;
connfreq 100;
};
// In Allow Blöcken wird angegeben, wer zum Server connecten darf.
allow {
ip *;
hostname *;
class clients;
maxperip 5;
};
// Jetzt kommt der Oper Block
oper Robo47 {
class clients;
from {
userhost *@*;
};
password "xxx";
flags
{
global;
services-admin;
can_rehash;
can_die;
can_restart;
helpop;
can_wallops;
can_globops;
can_localroute;
can_globalroute;
can_localkill;
can_globalkill;
can_kline;
can_gzline;
can_gkline;
can_unkline;
can_localnotice;
can_globalnotice;
netadmin;
can_zline;
get_umodew;
get_host;
can_override;
};
maxlogins "1";
};
// Der Listen Block, auf welchen Port der IRCd laufen soll
// Wobei 127.0.0.1 mit deiner IP ersetzt werden muss
listen 217.160.135.87:9999; // Client
listen 217.160.135.87:9998; // Server/Services
// Falls du Services am Laufen hast musst du Services hier eintragen
ulines {
services.robo47.net;
stats.robo47.net;
};
// Füge die Zeile ein, falls du Anope Services hast
include "aliases/anope.conf";
// Füge die Zeile ein, falls du ircservices Services hast
#include "aliases/ircservices.conf";
// Deine Motd, später müssen wir die Dateien erstellen
tld {
mask *@*;
motd "motd.conf";
rules "rules.conf";
opermotd "opermotd.conf";
};
// Hier werden die PW's eingestellt zum restarten und beenden
drpass {
restart "restartpw";
die "diepw";
};
// Mit dem Ban Nick Block können bestimmte Nicknamen
// auf dem Server gesperrt werden.
ban nick {
mask "*C*h*a*n*S*e*r*v*";
reason "Gesperrt";
};
//Mit dem "deny channel Block" kann man Usern das
//joinen bestimmter Channels verbieten.
deny channel {
channel "*Warez*";
reason "Dieser Channel ist verboten";
};
// Nun kommen wir zu Netzwerkeinstellung
set {
network-name "Robo47";
default-server "irc.robo47.net";
services-server "services.robo47.net";
stats-server "stats.robo47.net";
help-channel "#lobby";
hiddenhost-prefix "Robo47";
cloak-keys {
// Die 3 Keys müssen dürfen nicht identisch sein
// Bei einem Server Link müssen die gleich sein
// mit dem anderen Server
"aoAr1HnR6gl3sJ7tVUgHrEw4YwpW";
"aoArKlsWC456sJ7dVz4Zb7x4YwpW";
"jKE365SR6gl3437hVz4Zb7x4YnpX";
};
hosts {
local "locop.robo47.net";
global "ircop.robo47.net";
coadmin "coadmin.robo47.net";
admin "admin.robo47.net";
servicesadmin "csops.robo47.net";
netadmin "netadmin.robo47.net";
host-on-oper-up "no";
};
};
set {
allowed-nickchars {
latin1;
};
kline-address "robo47@robo47.net";
modes-on-connect "+xwG";
modes-on-oper "+xwgs";
restrict-usermodes "G";
restrict-channelmodes "G";
modes-on-join "+ntG";
oper-auto-join "#admin";
dns {
nameserver 127.0.0.1;
timeout 2s;
retries 2;
};
options {
hide-ulines;
show-connect-info;
show-opermotd;
allow-part-if-shunned;
flat-map;
fail-oper-warn;
};
maxchannelsperuser 50;
anti-spam-quit-message-time 10s;
static-quit "Client hat die Verbindung getrennt";
oper-only-stats "*";
throttle {
connections 3;
period 60s;
};
anti-flood {
nick-flood 3:60;
};
spamfilter {
ban-time 1d;
ban-reason "Spam/Advertising";
virus-help-channel "#help";
};
default-bantime "0";
};
link services.robo47.net {
username *;
hostname 217.160.135.87;
port 9998;
bind-ip 217.160.135.87;
hub *;
password-connect "xxx";
password-receive "xxx";
class servers;
options {
autoconnect;
};
};
link stats.robo47.net {
username *;
hostname 217.160.135.87;
port 9998;
bind-ip 217.160.135.87;
hub *;
password-connect "xxx";
password-receive "xxx";
class servers;
options {
autoconnect;
};
};
// Nun binden wir noch ein paar brauchbare Module bzw. confen ein
include "help.conf";
include "badwords.channel.conf";
include "badwords.message.conf";
include "badwords.quit.conf";
include "spamfilter.conf";
loadmodule "modules/commands.so";
loadmodule "modules/cloak.so";
// Mit dem Log Block kann man verschiedene Logfiles
// zu den unterschiedlichsten Zwecken erstellen lassen.
log ircd.log {
maxsize 5MB;
flags {
errors;
kills;
sadmin-commands;
chg-commands;
oper-override;
spamfilter;
kline;
tkl;
};
};
dann könnt ihr eure rules und motd anlegen:
motd.conf -> Message of the Day, diese Datei wird immer angezeigt wenn ihr auf euren Server connectet. empty rules.conf -> Rules, wird angezeigt wenn ihr /rules in
eurem Client-Programm eingebt. empty In jede dieser Dateien könnt ihr selbst entscheiden was ihr reinschreibt.
su irc-unreal
cd /srv/unreal
touch motd.conf
touch rules.conf
touch opermotd.conf
/srv/unreal/irc_unrealircd -f /srv/unreal/unrealircd.conf
exit
Jetzt läuft auch der IRC-Server, das Kernstück unseres kleinen Packetes weiter geht es mit Anope.
Nach oben Weiter zu Anope (Teil 9)
Anope 1.7.13
Anope
Anope stellt uns später Services wie Nickserv, ChanServ, BotServ und weitere zur Verfügung um Nicks und Channels zu registrieren.
adduser irc-anope
#Passwort: irc-anope
cd /src/anope-1.7.13
./Config
Hier wird man nun verschiedenes gefragt: In what directory do you want the binaries to be installed? Nachdem das Config durchgelaufen ist sollte ein
-> /srv/anope
/srv/anope does not exist. Create it?
-> yes
Where do you want the data files to be installed
->/srv/anope
Which group should all Services data files be owned by?
->irc-anope
What should the default umask for data files be (in octal)?
-> 007
Do you want to use the MD5 message-digest algorithm to encrypt passwords?
-> yes
Allow anope to automatically check for mysql libaries?
-> yes
Modules: Yes
Threads: Yes
MySql: Yes
dastehen, wichtig ist, dass mysql gefunden wurde !
Weiter gehts mit make und make install
make
make install
make clean
make distclean
chown -R irc-anope:irc-anope /srv/anope/
cd /srv/anope
su irc-anope
cp example.conf services.conf
Jetzt gehts an die Config von Anope die auch in dem Ordner liegt, da die datei sehr groß ist, poste ich hier nur die geänderten Zeilen.
(Die Zeilennummern sind nur Anhaltspunkte, diese können sich ändern.)
Aus Zeile 96: #IRCDModule "unreal32" machen wir: IRCDModule "unreal32"
Aus Zeile 165: RemoteServer localhost 6667 "mypass" machen wir: RemoteServer 217.160.135.87 9998 "xxx"
Aus Zeile 184: #LocalAddress nowhere. 0 machen wir: LocalAddress 217.160.135.87 9995
Aus Zeile 196: ServerName "services.localhost.net" machen wir: ServerName "services.robo47.net"
Aus Zeile 203: ServerDesc "Services for IRC Networks" machen wir: ServerDesc "Services for Robo47 IRC Networks"
Aus Zeile 210: ServiceUser "services@localhost.net" machen wir: ServiceUser "services@irc.robo47.net"
Aus Zeile 316: NetworkName "LocalNet" machen wir: NetworkName "irc.robo47.net"
Aus Zeile 348 und folgende: #UserKey1 1357901 machen wir:
#UserKey2 2468024
#UserKey3 9753172UserKey1 xxxxxxx
UserKey2 xxxxxxx
UserKey3 xxxxxxx
Aus Zeile 579: UseMail machen wir: #UseMail
Aus Zeile 665: NSForceEmail machen wir: #NSForceEmail
Aus Zeile 717: NSDefLanguage 1 machen wir: NSDefLanguage 3
Aus Zeile 1091: #ServicesRoot "dengel anope" machen wir: ServicesRoot "robo47 anope"
Aus Zeile 1481 und folgende: #MysqlHost "localhost" machen wir:
#MysqlUser "Anonymous"
#MysqlPass ""
#MysqlName "anope"
#MysqlSock "/tmp/mysql.sock"
#MysqlPort 3306MysqlHost "localhost"
MysqlUser "root"
MysqlPass "xxx"
MysqlName "anope"
MysqlSock "/tmp/mysql40.sock"
MysqlPort 9997
Aus Zeile 1498: #MysqlSecure "" machen wir: MysqlSecure "md5"
Jetzt gehts kurz in phpMyAdmin und wir legen eine Datenbank namens "anope" an.
Jetzt laden wir uns die anope-tar.gz (http://ovh.dl.sourceforge.net/sourceforge/anope/anope-1.7.13.tar.gz) auf den eigenen Rechner runter und importieren über phpMyAdmin die tables.sql
die im data-Order liegt. (wer will kann auch über die mySQL-Shell importieren)
cp services irc_anope
./irc_anope
exit
Überprüfen ob alles geklappt hat Einfach mal in der Log im Verzeichnis /srv/anope/logs/ schauen nützlich ist ausserdem immer pstree |grep irc_ damit sollte
man alle zum irc gehörenden Prozesse sehen.
Nach oben Weiter zu Denora (Teil 10)
Denora 1.2 RC 2
Denora
Denora ist für die Statistiken im IRC-Netzwerk zuständig
adduser irc-denora
#Passwort: irc-denora
mkdir /srv/lighttpd/htdocs/denora
chown -R irc-lighttpd:irc-lighttpd /srv/lighttpd/htdocs/denora
chmod -R 777 /srv/lighttpd/htdocs/denora
chown -R irc-denora:irc-denora /src/denora-1.2.0-RC2
chown -R irc-denora:irc-denora /srv/denora
cd /src/denora-1.2.0-RC2
su irc-denora
./Config
Jetzt werden die folgenden Fragen beantwortet: weiter gehts mit:
In what direcotry do you want the binaries to be installed?
-> /srv/denora/
Where do you want the data files to be installed?
-> /srv/denora
Which group should all Stats data files be owned by?
-> irc-denora
What should the default umask for data files be (in octal)?
-> 007
Allow Denora to automatically check for mysql libaries?
-> yes
Would you like to register your network with Denora?
-> no
Allow Denora to attempt to build a dmalloc library and use dmallc memory debuging tools. Should only enable this if you are attempting to locate memory problems
-> no
make
make install
make clean
make distclean
cd /srv/denora
touch stats.motd
cp example.de.conf denora.conf
Jetzt gehts kurz in phpMyAdmin und wir legen eine Datenbank namens "denora" an.
Jetzt laden wir uns die denora-1.2.0-RC2.tar.bz2 (http://denora.nomadirc.net/denora-1.2.0-RC2.tar.bz2) auf den eigenen rechner runter und importieren über phpMyAdmin die unreal32.sql
die im sql-Order liegt. (wer will kann auch über die mysql-shell importieren)
Dann die example.de.conf anpassen.
connect {
// required tokens
hostname 217.160.135.87; # Remote Server Hostname
port 9998; # Remote Server Port
passwd "xxx"; # Passwort zum Versandt an anderen Server
protocol "unreal32"; # IRCd Protokol (siehe unten)
// optional token
#bindhost 217.160.135.87; # IP von der verbunden wird
#bindport 9994; # Port von dem verbunden wird
};
identity {
// required tokens
name "stats.robo47.net"; # Stats Server-Name
desc "Statistik für IRC Netzwerke"; # Stats Server-Beschreibung
user "stats@robo47.net"; # Stats Pseudo-UserName
language 3; # Vorgabe für die Sprache
};
filenames {
// required tokens
pid stats.pid; # Datei enthält die Process ID.
motd stats.motd; # Name der Message of the Day Datei (MOTD).
htmlfile "/srv/lighttpd/htdocs/denora/denora.html"; # Name und Pfad der HTML Datei.
channeldb chan.db;
ctcpdb ctcp.db;
serverdb server.db;
chanstatsdb ChannelStats.db;
tlddb tld.db;
excludedb exclude.db;
statsdb stats.db;
};
timeout {
// required tokens
read 5s; # Intervall um vom Netzwerk zu lesen.
warning 4h; # Intervall der Meldungen über Programm-Fehler.
update 2m; # Intervall für Speicherung der Langzeitdaten.
htmlupdate 2m; # Intervall zwischen HTML-Export.
pingfreq 2m; # Intervall für Ping-to-Server (Verzögerungs-Check)
uptimefreq 1d; # Intervall für "Server-Uptime-Check"
sqlfreq 10m; # Intervall zum Check ob der SQL-Server aktiv ist.
clearinactive 30d; # Intervall zur Löschung von inaktiven Nicks aus der db.
clearchaninactive 30d; # ntervall zur Löschung von inaktiven Channels aus der db.
/* Der Zeitraum, den User im "user table" bleiben.
Weil User kommen und gehen, wenige hat man für "immer",
scheinen 2 Tage angemessen.
*/
usercache 30d;
userfreq 30s; # Check nach überholten User-Daten *(in Sekunden)
/* Der Zeitraum, den Server im "server table" bleiben.
Da "Servers Splits" selten sind, bleiben sie für eine Woche.
*/
servercache 30d;
serverfreq 30s; # Check nach überholten Server-Daten *(in Sekunden)
};
admin {
// required tokens
name Robo47; # Admin username (Benutzername)
passwd xxx; # Admin password (Passwort)
hostname *@*; # Admin hostmask (Hostmaske)
// optional tokens
language 3; # Admin language (Sprache)
};
#admin {
# // required tokens
# name Trystan;
# passwd superpass;
# hostname *@*;
#
# // optional tokens
# language 1;
#};
sql {
// required tokens
type mysql; # SQL Server Typ. (siehe oben)
host localhost; # SQL Server Hostname.
user root; # SQL Benutzer.
passwd xxx; # SQL Passwort welches für den angegebenen
# Benutzer zur Anmeldung benötigt wird.
name denora; # SQL Name der Datenbank die Denora nutzt.
// optional tokens
sock /tmp/mysql40.sock; # MySQL UNIX Socket
#port 3306; # MySQL TCP Port
retries 10;
retrygap 10;
};
netinfo { umbennen in denora.conf und hochladen.
// required tokens
name "RoboNET"; # Name des Netzwerks auf dem Denora läuft.
// optional tokens
#numeric "22"; # numeric ID (siehe unten)
nickchar "ger"; # siehe Unreal Dokumentation.
ctcpusers; # ctcp Version der User bekommen.
#largenet; # Große Netzwerke von 100,000+ oder bei Nutzung
# von "remote sql tables"
#sphtml; # versteckt +s/+p Channels in den HTML Stats
excludeserv "services.robo47.net"; # schliesst alle User von diesem Server aus
};
Jetzt könnt ihr noch die stats.motd editieren wenn ihr wollt.
/srv/denora/mydbgen
What is the server type do you plan to use denora with?
-> unreal32
What is the hostname of your mySQL server?
-> localhost
What is your mySQL username?
-> root
What is your mySQL password?
-> xxx
jetzt starten wir denora cp /srv/denora/stats /srv/denora/irc_denora
/srv/denora/irc_denora
exit
Überprüfen ob alles geklappt hat einfach mal in der Log im Verzeichnis /srv/denora/logs/ schauen pstree |grep irc_ damit sollte man alle zum irc gehörenden
prozesse sehen.
Nach oben Weiter zu phpDenora (Teil 11)
phpDenora 3.2
phpDenora
phpDenora ist für die Ausgabe der von Denora gesammelten Statistiken auf einer Homepage nötig.
cd /src/
cp -R phpdenora/ /srv/lighttpd/htdocs/
chown -R irc-lighttpd:irc-lighttpd /srv/lighttpd
su irc-lighttpd
cd /srv/lighttpd/htdocs/phpdenora/
mv example.cfg.php phpdenora.cfg.php
jetzt wird die Config editiert:
<?php
// $Id: example.cfg.php 162 2006-02-03 01:29:05Z Hal9000 $
/** ensure this file is being included by a parent file */
defined( '_VALID_PARENT' ) or die( 'Direct Access to this location is not allowed.' );
/* ================================.
REQUIRED CONFIGURATION SETTINGS |
================================´
These settings are required for phpDenora to work
*/
/* IRC Network Information
----------------------- */
# The name of your Network
$pd_netname = "robo47.net";
# The URL of the Homepage of your Network
$pd_neturl = "http://irc.robo47.net/";
/* MySQL Configuration
------------------- */
# Username of the MySQL Database
$np_db_user = "root";
# Database Password
$np_db_pass = "xxx";
# Database name
$np_db_name = "denora";
/* Server Configuration
-------------------- */
# Available server types: asuka, bahamut, beware, charybdis, dreamforge, fqircd,
# hybrid, hyperion, inspircd, ircu, ircdreams, liquidircd, musircd, nefarious,
# neoircd, ngircd, plexus, ptlink, quakeircd, rageircd, ratbox, shadowircd,
# solidircd, sorcery, ultimate2, ultimate3, unreal31, unreal32, viagra
$denora_server_type = "unreal32";
# This is the name of the Denora server
$denora_server_name = "stats.robo47.net";
# Set this to an existing server name on the network (NOT a round robin!)
$denora_default_server = "stats.robo47.net";
# Comment or delete the following line to get phpdenora working...
#die("You should really read the configuration file carefully!");
/* ================================.
OPTIONAL CONFIGURATION SETTINGS |
================================´
These settings are not required and their defaults
should be fine, but you can change them as you wish
*/
/* Appearance
---------- */
# Default theme
# Available Themes: alternative, classic, classic_xp, modern
# Must match the name of the corresponding theme directory
$pd_style = "modern";
# Default language
# Available Languages: en (English), de (German), es (Spanish),
# fr (French), it (Italian), nl (Dutch), ro (Romanian)
# This will NOT override the automatic browser language detection
$pd_lang = "de";
/* Behavior
-------- */
# Set the default ordering column for user/channel stat tables.
# Available options: letters, words, line, actions, smileys, kicks, modes, topics
$pd_statsort = "line";
# Set the default stats type for user/channel stat tables.
# Available options: 0: Total, 1: Today, 2: This Week, 3: This Month
$pd_stattype = "3";
/* Server Configuration
-------------------- */
# Hide ulined servers
$denora_noshow_ulined = true;
# Servers you don't want phpDenora to show
# Separate with commas without spaces, example: "hub.mynet.tld,hub2.mynet.tld"
$denora_noshow_servers = "";
# Hides private and secret channels (+p/+s).
$pd_hidesecret = true;
# Channels you don't want phpDenora to show
# Separate with commas, without spaces
$denora_noshow_chans = "#opers,#services";
/* General Configuration
--------------------- */
# Sets the limit for table listed outputs
$pd_rlimit = 20;
# Sets the limit for TOP channels/users outputs on the front page
$pd_fptop = 5;
# Minimum amount of characters needed (excluding wildcards) to make a search query
$pd_minchars = 3;
# Enables online status and country lookups in user listings. This will require an additional
# query for each user, set this to false if you want to keep sql load low
$pd_statuslookup = true;
# Enables country statistics. Set to false if your ircds don't resolve hostnames.
$pd_entldstats = true;
# Enables client version statistics. Set to false if your Denora does not version your clients.
$pd_enverstats = true;
# Enables network statistics graphs.
$pd_ennetgraphs = true;
# Enable the mirc icon in the channel list
$pd_mirc = false;
# The URL for the mirc icon, including trailing slash
$pd_mirc_url = "irc://irc.mynet.tld:6667/";
# Enable the web chat icon in the channel list
$pd_webchat = false;
# The URL for the web chat icon
$pd_webchat_url = "http://webchat.mynet.tld/?chan=";
# Enable the remote api interface, which enables to easilly embed data in web sites
$pd_enremote = true;
/* Debug Options
------------- */
# 0: system default, 1: off, 2: php warnings, sql errors (used for development)
$pd_debug = 1;
# Set to true to show script execution time and number of sql queries
$pd_exec = true;
# Show links to xhtml and css validators
$pd_valid = false;
/* MySQL Configuration
------------------- */
# Hostname for your MySQL server
$np_db_host = "localhost";
# TCP port the mysql server is listening on
$np_db_port = "3306";
# Enable persistent sql connection
$np_db_connect = 1;
/* SQL TABLES
---------- */
# You should leave these settings as they are, unless you specified different tables in the denora config.
$denora_user_db = "user"; # Name of the Users table
$denora_chan_db = "chan"; # Name of the Channel table
$denora_chanbans_db = "chanbans"; # Name of the Channel Bans table
$denora_chanexcept_db = "chanexcept"; # Name of the Channel Exceptions table
$denora_chaninvite_db = "chaninvites"; # Name of the Channel Invites table
$denora_gline_db = "glines"; # Name of the Glines table
$denora_sqline_db = "sqline"; # Name of the SQLine table (required for Bahamut based ircd)
$denora_maxvalues = "maxvalues"; # Name of the Maxvalues table
$denora_server_db = "server"; # Name of the Servers table
$denora_ison_db = "ison"; # Name of the ISON table
$denora_tld_db = "tld"; # Name of the TLD table
$denora_cstats_db = "cstats"; # Name of the Chan Stats Channel table (cstats)
$denora_ustats_db = "ustats"; # Name of the Chan Stats User table (ustats)
$denora_current_db = "current"; # Name of the current stats table
$denora_serverstats = "serverstats"; # Name of the server hourly stats table
$denora_channelstats = "channelstats"; # Name of the channel hourly stats table
$denora_userstats = "stats"; # Name of the user hourly stats table
$denora_aliases_db = "aliases"; # Name of the aliases table
?>
so jetzt mal mit dem browser auf http://irc.robo47.net:10000/phpdenora/ gehen und schauen ob er grünes Licht gibt, wenn ja: mv welcome.dist.php welcome.php Jetzt sollte man unter: http://irc.robo47.net:10000/phpdenora/ ein paar schöne Statistiken besitzen, um jedoch alle Features zu besitzen, muss man sich dann noch ein wenig
mit dem Bot von Denora befassen, doch dazu mehr im nächsten Teil.
rm setup.php
exit
Nach oben Weiter zur Befehlseinweisung (Teil 12)
Einweisung in die gängigen IRC-Befehle für OPs und die Bots
Kleine Anmerkung vorher, die Groß- und Kleinschreibung bei Benutzernamen und Passwörtern ist wichtig!
wichtigster Befehl erstmal:
/oper name password
um sich am IRC-Server als Operator anzumelden, im Fall meiner Beispiel-Config:
/oper Robo47 xxx
wird hier definiert: /srv/unreal/unrealircd.conf // Jetzt kommt der Oper Block
oper Robo47 {
class clients;
from {
userhost *@*;
};
password "xxx";
flags
{
global;
services-admin;
can_rehash;
can_die;
can_restart;
helpop;
can_wallops;
can_globops;
can_localroute;
can_globalroute;
can_localkill;
can_globalkill;
can_kline;
can_gzline;
can_gkline;
can_unkline;
can_localnotice;
can_globalnotice;
netadmin;
can_zline;
get_umodew;
get_host;
can_override;
};
maxlogins "1";
};
weitere Befehle die für den OP wichtig sind: /rehash # Lädt die Config des IRC-Servers neu
Jetzt wollen wir ja vieleicht auch, dass uns phpDenora noch Informationen über Channels liefert, dazu müssen wir uns erstmal beim StatServ anmelden:
/msg StatServ login username password
in meinem Fall:
/msg StatServ login Robo47 xxx
zu finden hier:
/srv/denora/denora.conf
admin {
// required tokens
name Robo47; # Admin username (Benutzername)
passwd xxx; # Admin password (Passwort)
hostname *@*; # Admin hostmask (Hostmaske)
// optional tokens
language 3; # Admin language (Sprache)
};
weiter gehts dann mit:
/msg StatServ CHANSTATS ADD #channel
sobald ein Channel vom StatServ überwacht wird, erscheint er als ständiger user im Channel, erstellt statistiken über die User, die dann im phpdenora angezeigt werden.
Alles weitere denke ich kann man spielend mit dieser Liste hier ausprobieren:
Die .conf von StatServ neu laden:
/msg StatServ reload
Den Statserv komplett neu starte:
/msg StatServ restart
Einen Channel von StatServ überwachen lassen:
/msg StatServ CHANSTATS ADD #channel
Einen Nick registrieren:
/msg NickServ register #passwort# #email#
Sich mit seinem Nick registrieren:
/msg NickServ identify #passwort#
Einen channel registrieren:
/msg ChanServ register #channel #passwort# #channelbeschreibung#
Einen User in einem Channel auf die AutoOP liste setzten:
/msg ChanServ aop #channel ADD #user#
Die Liste der AutoOP User für einen channel anzeigen:
/msg ChanServ aop #channel LIST
Einen User in die channel AutoHalfOP liste setzten:
/msg ChanServ hop #channel ADD #user#
Die Liste der AutoHalfOP User für einen Channel anzeigen:
/msg Chanserv hop #channel LIST
bzw. haben die Bots selbst Hilfedateien
Denoras StatServ:
/msg StatServ help
Anopes NickServ
/msg NickServ help
Anopes BotServ
/msg BotServ help
Anopes ChanServ
/msg ChanServ help
Trackbacks (0)
Trackbackurl: http://www.robo47.net/trackback/text/30Es sind keine Trackbacks vorhanden.
You liked it ? Link it on your homepage or blog:



Benjamin Steininger ist Webentwickler auf der Suche nach einem neuen Job und
photographiert sehr gerne. Er beschäftigt sich viel mit dem Internet, PHP, Symfony, Testing und hat einen
Kommentare (0)
Es sind noch keine Kommentare vorhanden.
Die Kommentare zu diesem Beitrag sind gesperrt.