INN安装步骤小结

发表于:2007-07-01来源:作者:点击数: 标签:
INN安装步骤小结 1、用vipw修改/etc/passwd文件,改为news:*:8:8:News Subsystem:/usr/local/news:/bin/sh 2、 $tar zxvf inn-2.4.0.tar.gz $cd inn-2.4.0 $./configure $make make install 缺省安装在/usr/local/news下 3、修改 etc/inn.conf hiscachesize:
INN安装步骤小结

1、用vipw修改/etc/passwd文件,改为news:*:8:8:News Subsystem:/usr/local/news:/bin/sh

2、 $tar zxvf inn-2.4.0.tar.gz
$cd inn-2.4.0
$./configure
$make && make install
缺省安装在/usr/local/news下

3、修改 etc/inn.conf

hiscachesize: 256
artcutoff: 60
maxartsize: 100000
localmaxartsize: 100000
enableoverview: true
ovmethod: tradindexed
spoolfirst: false
执行inncheck,检查inn.conf,没有错误提示

4、文章过期策略设置
修改expire.ctl 如下:
##This entry uses the syntax appropriate when groupbaseexpiry is true in inn.conf.
##This is an entry based on storage class, used when groupbaseexpiry is flase.
#0:10:never:never

5、初始化history文件
$cd /usr/local/news/db
$touch history
$../bin/makedbz -i
$for i in history.n*; do i=${i#history.n.};mv history.n.$i history.$i ;done
有的shell执行不了,也可以手工改正
(起的作用是把history.n.*改名为history.*)
$chown news:news history*
$chmod 644 history*

6、建立新的新闻
ctlinnd newgroup test1
ctlinnd newgroup test2

7、用mkuserdb.pl建立userpass文件,userpass文件一般存放在/usr/local/news/db下

8、修改storage.conf文件,加入
method tradspool {
newsgroups: *
class: 1
}

9、修改readers.conf,格式如下
auth admin {
hosts: *
auth: "ckpasswd -f /usr/local/news/db/userpass"
default: <FAIL>
default-domain: <UNKNOWN>
}

auth "localhost" {
hosts: "localhost, 127.0.0.1, stdin"
default: "<localhost>"
}
.
.
.

aclearcase/" target="_blank" >ccess user1 {
users: "zhenhua@<UNKNOWN>, !<FAIL>@<UNKNOWN>"
newsgroups: "test2,!control.*,!junk,!control"
access: RP
}

access user2 {
users: "yingjia@<UNKNOWN>, !<FAIL>@<UNKNOWN>"
newsgroups: "test1,test2,!control.*,!junk,!control"
access: RP
}

access "localhost" {
users: "<localhost>"
newsgroups: "*"
access: RPA
}

access fail {
users: "<FAIL>@*"
newsgroups: !*
}

<
配置 syslog,记录日志

$ touch /usr/local/news/log/news.crit
$ touch /usr/local/news/log/news.err
$ touch /usr/local/news/log/news.notice
$ chown news /usr/local/news/log/news.*
$ chgrp news /usr/local/news/log/news.*
$ cat >> /etc/syslog.conf << END
news.crit /usr/local/news/log/news.crit
news.err /usr/local/news/log/news.err
news.notice /usr/local/news/log/news.notice
END

$ kill -1 `cat /var/run/syslog.pid`


>

10、启动news服务:
$su - news
$rc.news
.netstat -an | grep LISTEN 命令查看119端口是否起来

11、用outlookexpress测试新闻组
yingjia可以订阅test1,test2
zhenhua只能订阅test2

12.系统启动时,自动启动新闻组服务器
确定/etc/rc中有执行rc.local的部分,然后在rc.local(如没有,则新建)中加入:
su news -c /usr/local/news/bin/rc.news

原文转自:http://www.ltesting.net