Build a Linux-based IRC server and WEBIRC login platform

Source: Internet
Author: User
& Nbsp; source address: http://www.aoxue.org/bbs/read.php? Tid98924 I. INTRODUCTION IRC is short for InternetRelayChat. it is a real-time chat tool and one of the most popular online chat methods in the world. It features high speed, convenient self-built and use of personal chat rooms, and more than 20

SOURCE Address: http://www.aoxue.org/bbs/read.php? Tid = 98924
I. INTRODUCTION
IRC is short for "Internet Relay Chat". it is a real-time Chat tool and one of the most popular online Chat modes in the world. It features fast and convenient self-built and use of personal chat rooms, and opens more than 20 small windows to chat with people without affecting the speed. it has powerful chat room management and file transfer functions, it is the best choice for global online communication. Currently, the world-renowned IRC servers, such as efnet and link-net, are used to build the ircd-hybrid system. Generally, you need to use a dedicated IRC chat software, such as mIRC, and then log on to the IRC server to start chatting. for convenience, this article also introduces how to log on to the IRC server by using CGI to build a WEB server.
The ircd-hybrid and CGI: IRC described in this article are both open-source code. they are very powerful, secure, stable, and efficient, with low system resource usage and are most widely used. Among them, webcgi can save the steps for installing the jave client in common ways, which is convenient, convenient, and practical. The latest source code is available on the http://sourceforge.net/website.

2. preparations before installation
First, install Linux on the server in full mode. we recommend that you use Redhat Linux 7.2 or later. Compile and install Apache to the/usr/local/apache directory, and configure Apache to support perl.
Then, obtain the software packages of ircd-hybrid and CGI: IRC.
Log on to the Linux server as a root user and download the latest source code to the/home/irc directory.
Mkdir/home/irc
Cd/home/irc
Wget http://puzzle.dl.sourceforge.net... cd-hybrid-7.1.3.tgz
Wget http://nchc.dl.sourceforge.net/s... cgiirc-0.5.7.tar.gz

3. installation and configuration steps
This article takes the establishment of the IRC server in www.myirc.org domain as an example to describe the construction of ircd-hybrid and webirc on the Linux server.
① Install the ircd-hybrid system IRC server.
To facilitate unified management of installed applications, set the installation of ircd-hybrid to the/usr/local/ircd-hybrid directory.
Cd/home/irc/
Tar zvxf ircd-hybrid-7.1.3.tgz
Cd ircd-hybrid-7.1.3
./Configure -- prefix =/usr/local/ircd-hybrid
Make
Make install

The above code is decompressed, compiled, and installed. it will take about five minutes to complete. Next, you can configure the ircd. conf file as needed. Based on the configuration file provided by the source code compressed package, we can directly edit and modify the file to save a lot of configuration work.
Cd/usr/local/ircd-hybrid/
Cp/home/irc/ircd-hybrid-7.1.3/etc/example. conf./etc/ircd. conf
Chmod 755 *-R
Modify configuration file
Vi./etc/ircd. conf
The settings are described as follows:
Serverinfo {
[$ Nbsp] [$ nbsp] [$ nbsp] [$ nbsp] [$ nbsp] [$ nbsp] name = "ircd ";
[$ Nbsp] [$ nbsp] [$ nbsp] [$ nbsp] [$ nbsp] [$ nbsp] sid = "1ST ";
Network_name = "MyNet ";
[$ Nbsp] [$ nbsp] [$ nbsp] [$ nbsp] [$ nbsp] [$ nbsp] max_clients = 512 ;};
Listen {
[$ Nbsp] [$ nbsp] [$ nbsp] [$ nbsp] [$ nbsp] [$ nbsp] port = 6665 .. 6669 ;};
Auth {
[$ Nbsp] [$ nbsp] [$ nbsp] [$ nbsp] [$ nbsp] [$ nbsp] user = "*@*";
[$ Nbsp] [$ nbsp] [$ nbsp] [$ nbsp] [$ nbsp] [$ nbsp] class = "users ";};
Class {
[$ Nbsp] [$ nbsp] [$ nbsp] [$ nbsp] [$ nbsp] [$ nbsp] name = "users ";
[$ Nbsp] [$ nbsp] [$ nbsp] [$ nbsp] [$ nbsp] [$ nbsp] ping_time = 2 minutes;
Number_per_ip = 2;
Max_number = 512 ;};
The sid setting is the most critical. you must follow the prompts to set three security characters. The first one must be a number of 1-9, and the last two must be a letter combination, otherwise, the ircd service cannot be started normally.
The above is a simple setting. you can set it in detail according to the instructions in the document. here we will not describe it one by one. The above configuration can ensure the normal operation of the IRC server.
By now, the IRC server installation setting of the ircd-hybrid system has been completed, and you can start the ircd service.
Adduser ircmaster-g nogroup
Chown ircmaster. nogroup/usr/local/ircd-hybrid-R
Su ircmaster
Cd/usr/local/ircd-hybrid/bin
./Ircd
The ircd service cannot run with the root permission. The non-root user status must be switched. we have created an ircmaster system user. After running properly, you can use ps? X to view service processes. 1.

In this way, the server starts the ircd service normally, opens port 6665-6669, successfully constructs an IRC server, and provides a communication platform.

②. Install the web login irc method under webirc.
Depending on the Apache installation on the server in the early stage, you can set it to the/usr/local/apache/cgi-bin/webirc directory.
At the same time, you need to switch back to the root user to install the new application.
Exit
Cd/home/irc
Tar zvxf cgiirc-0.5.7.tar.gz
Cp cgiirc-0.5.7/usr/local/apache/cgi-bin/webirc-r
Cd/usr/local/apache/cgi-bin/webirc
Chmod 755 *-R
Modify configuration file
Vi cgiirc. config
The settings are described as follows:
Default_server = www.myirc.org
Default_port = 6667
Default_channel = # Chat
Default_nick = user ???
Irc charset = GB2312
Format = mirc
Interface font = Fixedsys
Interface smilies = 1
Access_channel = .*
Allow_non_default = 1
Set allow_non_default = 1. Otherwise, you cannot add other channels after logging in through webirc. The preceding settings are simple. you can use the cgiirc. config. full file to further set the settings. after that, replace cgiirc. config with cgiirc. config.
By now, all the installation and setup steps have been completed, and we can access the built IRC server through web browsers such as IE. Enter the http://www.myirc.org/cgi-bin/webirc/irc.cgi in the address bar after login, server boot normal 2.

Ordinary users log on to the IRC server and join the channel to chat with friends and transfer files. Channel administrators can implement simple management functions. At the same time, administrators can log on to the IRC server built by using client software such as mIRC to obtain more powerful management functions. the specific usage is not described here. you can refer to the relevant literature.

III. Conclusion
This article describes the basic installation and customization methods of ircd-hybrid and webirc on the Linux platform, and provides a complete and clear building idea. The code used above is highly scalable and serves as a reference for further development of network applications in Linux.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.