<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>小猫偷菊 &#187; Linux</title>
	<atom:link href="http://oxn.me/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://oxn.me</link>
	<description>网络.软件.音乐.生活</description>
	<lastBuildDate>Thu, 01 Dec 2011 01:33:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>在Ubuntu下配置IRC服务器记录</title>
		<link>http://oxn.me/ubuntu-config-irc-server/</link>
		<comments>http://oxn.me/ubuntu-config-irc-server/#comments</comments>
		<pubDate>Tue, 29 Dec 2009 23:23:28 +0000</pubDate>
		<dc:creator>小貓偷菊</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[IRC]]></category>
		<category><![CDATA[ircd-hybrid]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://oxn.me/?p=60</guid>
		<description><![CDATA[总算搞定可以开始写过程了,那天突然想VPS空着也是空着,就想弄个IRC服务器玩下,虽然一直在IRC上玩,不过配置IRC服务器原来还一点没想过,为了折腾IRC,整整花了3天时间,网上这方面资料不多,遇到几个问题琢磨了好久,不过总算是圆满完成了&#8230; 这次遇到最大的问题是,编译的时间就没法配置OpenSSL支持,一开始还没发现,装完之后客户端怎么都连不上,最初以为是配置文件的问题,就在配置文件里改了很多选项,依旧连不上,无奈了重新Rebuild了VPS,再次折腾,才发现编译的时候就没法开启OpenSSL支持,又折腾了一遍才发现是没有libssl-dev造成的,有个帖子里也有说到,不过有点错误,导致我没发现.诶,太杯具了,发现我老是会忘记装必要依赖的软件包,经常性没gcc就直接编译&#8230; 下面是过程,我用的是ircd-hybrid: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 apt-get install gcc openssl libssl0.9.8 libssl-dev //必要软件,我就载libssl-dev上面了... adduser ircadmin //建个新用户,ircd服务不能以root权限运行 wget http://softlayer.dl.sourceforge.net/sourceforge/ircd-hybrid/ircd-hybrid-7.2.3.tgz //下载,我一直对SoftLayer机房情有独钟的说,貌似就因为在Dallas? tar zvxf ircd-hybrid-7.2.3.tgz //解压 rm ircd-hybrid-7.2.3.tgz //顺手删除,习惯了... cd ircd-hybrid-7.2.3 ./configure --enable-openssl //配置OpenSSL支持,这地方我郁闷N久啊... make make install //安装完成,继续下面配置 cp etc/example.conf /usr/local/ircd/etc/ircd.conf //复制配置文件的例子过去~ [...]]]></description>
			<content:encoded><![CDATA[<p>总算搞定可以开始写过程了,那天突然想VPS空着也是空着,就想弄个IRC服务器玩下,虽然一直在IRC上玩,不过配置IRC服务器原来还一点没想过,为了折腾IRC,整整花了3天时间,网上这方面资料不多,遇到几个问题琢磨了好久,不过总算是圆满完成了&#8230;</p>
<p>这次遇到最大的问题是,编译的时间就没法配置OpenSSL支持,一开始还没发现,装完之后客户端怎么都连不上,最初以为是配置文件的问题,就在配置文件里改了很多选项,依旧连不上,无奈了重新Rebuild了VPS,再次折腾,才发现编译的时候就没法开启OpenSSL支持,又折腾了一遍才发现是没有libssl-dev造成的,有个帖子里也有说到,不过有点错误,导致我没发现.诶,太杯具了,发现我老是会忘记装必要依赖的软件包,经常性没gcc就直接编译&#8230; <img src='http://oxn.me/wp-includes/images/smilies/icon_mad.gif' alt=':mad:' class='wp-smiley' /> </p>
<p>下面是过程,我用的是ircd-hybrid:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #c20cb9; font-weight: bold;">gcc</span> openssl libssl0.9.8 libssl-dev <span style="color: #000000; font-weight: bold;">//</span>必要软件,我就载libssl-dev上面了...
adduser ircadmin <span style="color: #000000; font-weight: bold;">//</span>建个新用户,ircd服务不能以root权限运行
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>softlayer.dl.sourceforge.net<span style="color: #000000; font-weight: bold;">/</span>sourceforge<span style="color: #000000; font-weight: bold;">/</span>ircd-hybrid<span style="color: #000000; font-weight: bold;">/</span>ircd-hybrid-7.2.3.tgz <span style="color: #000000; font-weight: bold;">//</span>下载,我一直对SoftLayer机房情有独钟的说,貌似就因为在Dallas?
<span style="color: #c20cb9; font-weight: bold;">tar</span> zvxf ircd-hybrid-7.2.3.tgz <span style="color: #000000; font-weight: bold;">//</span>解压
<span style="color: #c20cb9; font-weight: bold;">rm</span> ircd-hybrid-7.2.3.tgz <span style="color: #000000; font-weight: bold;">//</span>顺手删除,习惯了...
<span style="color: #7a0874; font-weight: bold;">cd</span> ircd-hybrid-7.2.3
.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--enable-openssl</span> <span style="color: #000000; font-weight: bold;">//</span>配置OpenSSL支持,这地方我郁闷N久啊...
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #000000; font-weight: bold;">//</span>安装完成,继续下面配置
<span style="color: #c20cb9; font-weight: bold;">cp</span> etc<span style="color: #000000; font-weight: bold;">/</span>example.conf <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>ircd<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ircd.conf <span style="color: #000000; font-weight: bold;">//</span>复制配置文件的例子过去~
openssl genrsa <span style="color: #660033;">-out</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>ircd<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rsa.key <span style="color: #000000;">2048</span> <span style="color: #000000; font-weight: bold;">//</span>生成证书和key
openssl rsa <span style="color: #660033;">-in</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>ircd<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rsa.key <span style="color: #660033;">-pubout</span> <span style="color: #660033;">-out</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>ircd<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rsa.pub
<span style="color: #c20cb9; font-weight: bold;">chmod</span> 0600 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>ircd<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rsa.key <span style="color: #000000; font-weight: bold;">//</span>嗯哼,权限~
<span style="color: #c20cb9; font-weight: bold;">chmod</span> 0644 <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>ircd<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rsa.pub
openssl req <span style="color: #660033;">-new</span> <span style="color: #660033;">-days</span> <span style="color: #000000;">365</span> <span style="color: #660033;">-x509</span> <span style="color: #660033;">-key</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>ircd<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>rsa.key <span style="color: #660033;">-out</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>ircd<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>cert.pem <span style="color: #000000; font-weight: bold;">//</span>生成ssl数字证书
<span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> ircadmin.ircadmin <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>ircd<span style="color: #000000; font-weight: bold;">/</span> <span style="color: #000000; font-weight: bold;">//</span>设置目录拥护者
<span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>ircd<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>ircd.conf <span style="color: #000000; font-weight: bold;">//</span>修改配置文件,要改的地方好多,等会再讲
<span style="color: #c20cb9; font-weight: bold;">su</span> ircadmin <span style="color: #000000; font-weight: bold;">//</span>切换到ircadmin
<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>ircd<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>ircd <span style="color: #000000; font-weight: bold;">//</span>启动ircd</pre></td></tr></table></div>

<p>接着讲配置文件的修改,行号会有浮动,等配置文件修改好在启动,默认的应该启动不了&#8230;</p>
<ol>
<li>第一处要改的是48行,这个name就是你IRC服务器的名字啦,任意,够响亮就可以~</li>
<li>第二处是56行,这个sid必须按说明设置,第一位是数字,后面两位是字母,搭配任意,否则ircd服务就启动不了~</li>
<li>然后是62行,这个是服务器描述,68和69行的是网络信息和描述,任意~</li>
<li>91行,最大客户端数量,一般默认足够了~</li>
<li>105和125行把#去掉~</li>
<li>132~134是服务器管理员信息,随意改~</li>
<li>256行是端口,默认是6665~6669,我改成了6667~</li>
<li>然后是265行,注释掉,266行,是SSL的端口~</li>
<li>287行改成<span style="color: #ff0000;">user = “*@*”;</span>任意用户@主机允许连接~</li>
<li>291行是服务器密码,设置了话任何用户登陆irc服务器都需要输入此密码,297行是设置登陆密码是否起用加密模式~</li>
<li>355行是管理OP,361行是允许任何连接上来带god的名称帐号切换成管理OP,361行是只允许本地连接的管理者,368行是管理OP的密码~</li>
<li>1132行的这句必须注释掉,不然没法运行~</li>
<li>差不多了,当然,还有更多可以挖掘的地方,自己折腾去吧~</li>
</ol>
<p>这几天折腾下来,又学到不少~那个试用买了一个月的VPS天天被我摧残 <img src='http://oxn.me/wp-includes/images/smilies/icon_neutral.gif' alt=':-|' class='wp-smiley' />  ,忍忍吧,还有10多天就过去了,到时候换回虚拟机接着折腾~博客这个就不折腾了,不然随时可能被我搞瘫~</p>
]]></content:encoded>
			<wfw:commentRss>http://oxn.me/ubuntu-config-irc-server/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
	</channel>
</rss>

