随笔 - 272  文章 - 0  评论 - 283  阅读 - 142万

centos6环境下搭建irc服务器

问题描述

有时候逛技术社区,经常会发现有个叫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

欢迎补充

posted on   Mike_Zhang  阅读(1409)  评论(0编辑  收藏  举报
(评论功能已被禁用)
编辑推荐:
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 一个奇形怪状的面试题:Bean中的CHM要不要加volatile?
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示