这里只是最基本的,使其可以运行并且能够访问的配置,详细的配置方法,放到以后再作讲解
可以参考 UnrealIRCd 配置语法
还可以参考 UnrealIRCd 所有配置
启动
尝试启动服务
代码语言:javascript复制[root@h104 unrealircd]# bin/unrealircd
WARNING: You are running UnrealIRCd as root and it is not
configured to drop priviliges. This is VERY dangerous,
as any compromise of your UnrealIRCd is the same as
giving a cracker root SSH access to your box.
You should either start UnrealIRCd under a different
account than root, or set IRC_USER in include/config.h
to a nonprivileged username and recompile.
_ _ _ ___________ _____ _
| | | | | |_ _| ___ / __ | |
| | | |_ __ _ __ ___ __ _| | | | | |_/ /| / / __| |
| | | | '_ | '__/ _ / _` | | | | | / | | / _` |
| |_| | | | | | | __/ (_| | |_| |_| | | __/ (_| |
___/|_| |_|_| ___|__,_|_|___/_| _| ____/__,_|
v4.0.2
using TRE 0.8.0 (BSD)
using OpenSSL 1.0.1e-fips 11 Feb 2013
Loading IRCd configuration..
Configuration loaded without any problems.
Loading tunefile..
Initializing SSL..
Dynamic configuration initialized.. booting IRCd.
UnrealIRCd is now listening on the following addresses/ports:
IPv4: *:6900(SSL), *:6697(SSL), *:6667
IPv6: *:6900(SSL), *:6697(SSL), *:6667
UnrealIRCd started.
[root@h104 unrealircd]#
[root@h104 unrealircd]# ps faux | grep ircd | grep -v grep
root 27340 0.0 0.3 335156 6632 ? S 23:04 0:00 bin/unrealircd
[root@h104 unrealircd]# ps -Lf 27340
UID PID PPID LWP C NLWP STIME TTY STAT TIME CMD
root 27340 1 27340 0 1 23:04 ? S 0:00 bin/unrealircd
[root@h104 unrealircd]# pstree 27340
unrealircd
[root@h104 unrealircd]#
可以看到正常启动了,并且打开了几个端口
代码语言:javascript复制[root@h104 unrealircd]# netstat -ant | egrep -E '(6900|6697|6667)'
tcp 0 0 0.0.0.0:6697 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:6667 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:6900 0.0.0.0:* LISTEN
tcp6 0 0 :::6697 :::* LISTEN
tcp6 0 0 :::6667 :::* LISTEN
tcp6 0 0 :::6900 :::* LISTEN
[root@h104 unrealircd]#
为了能对外正常提供服务,防火墙上这几个端口也要打开,打开方法
代码语言:javascript复制[root@h104 unrealircd]# firewall-cmd --list-all
public (default, active)
interfaces: eno16777736 eno33554960
sources:
services: dhcpv6-client ssh
ports: 4000/tcp 80/tcp 8500/tcp 8080/tcp 3306/tcp 2375/tcp 40000/tcp
masquerade: no
forward-ports:
icmp-blocks:
rich rules:
[root@h104 unrealircd]# firewall-cmd --add-port 6900/tcp
success
[root@h104 unrealircd]# firewall-cmd --add-port 6697/tcp
success
[root@h104 unrealircd]# firewall-cmd --add-port 6667/tcp
success
[root@h104 unrealircd]# firewall-cmd --list-all
public (default, active)
interfaces: eno16777736 eno33554960
sources:
services: dhcpv6-client ssh
ports: 4000/tcp 80/tcp 6667/tcp 8500/tcp 8080/tcp 3306/tcp 6900/tcp 2375/tcp 6697/tcp 40000/tcp
masquerade: no
forward-ports:
icmp-blocks:
rich rules:
[root@h104 unrealircd]#