您的位置:首页 > 运维架构 > Linux

centos6环境下搭建irc服务器

2017-09-10 00:00 344 查看

问题描述

有时候逛技术社区,经常会发现有个叫IRC的东西存在,想搭建下看看到底是个什么东西

说明:

操作系统环境为CentOS6.5_64

安装irc服务器

通过yum进行安装,命令如下:

yum install ircd-hybrid.x86_64


ircd-hybrid版本如下:

ircd-hybrid-7.3.1-2.el6.x86_64

配置irc服务器

文件位置: /etc/ircd/ircd.conf

修改serverinfo

修改sid,vhost比如:

sid = "1ST"; vhost = "192.168.1.80";


修改auth

用于用户认证,比如:

auth { /* * user: the user@host allowed to connect. Multiple IPv4/IPv6 user * lines are permitted per auth block. */ user = "*@192.168.1.0/24"; #user = "*test@123D:B567:*"; /* password: an optional password that is required to use this block */ #password = "letmein"; password = ""; /* * encrypted: controls whether the auth password above has been * encrypted. */ #encrypted = yes; encrypted = no; /* * spoof: fake the users host to this. This is free-form, * just do everyone a favor and don't abuse it. ('=' prefix on /stats I) */ spoof = "I.still.hate.packets"; /* class: the class the user is placed in */ class = "opers"; /* * need_password: don't allow users who haven't supplied the correct * password to connect using another auth{} block * ('&' prefix on /stats I if disabled) * need_ident: require the user to have identd to connect ('+' prefix on /stats I) * spoof_notice: enable spoofing notification to admins * exceed_limit: allow a user to exceed class limits ('>' prefix on /stats I) * kline_exempt: exempt this user from k/glines ('^' prefix on /stats I) * gline_exempt: exempt this user from glines ('_' prefix on /stats I) * resv_exempt: exempt this user from resvs ('$' prefix on /stats I) * no_tilde: remove ~ from a user with no ident ('-' prefix on /stats I) * can_flood: allow this user to exceed flood limits ('|' prefix on /stats I) * can_idle: exempt this user from idle restrictions ('<' prefix on /stats I) */ flags = need_password, spoof_notice, exceed_limit, kline_exempt, gline_exempt, resv_exempt, no_tilde, can_flood, can_idle; };


删除havent_read_conf

havent_read_conf = 1; #必须注销掉此行,否则不让你运行

配置修改完成后,重新IRC服务器:

/etc/init.d/ircd restart


客户端测试

安装irssi :

yum install irssi


启动irssi :

irssi


连接到服务器:

/connect 192.168.1.80


这里不能用127.0.0.1

加入频道:

/join test_room


如果频道不存在,则会创建频道。

本文github地址:

https://github.com/mike-zhang/mikeBlogEssays/blob/master/2016/20160716_centos6下搭建irc服务器.md

欢迎补充
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: