The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
installing a news server 3 December 1999
Need more help on this topic? Click here
This article has 1 comment
Show me similar articles
I wanted to install a news server for testing.  I know this is a little extreme, but it's what I wanted to do.  If you want to test the posting of messages to a news server, use one of the many test newsgroups which exist.  I chose to install inn.   The homepages for inn is http://www.isc.org/products/INN/.   I found the following resources listed at that page to be useful for my install:

A Tutorial for Setting Up InterNetNews - http://www.ragnet.demon.co.uk/mynews/news.html   This is getting dated, but it allowed me to see the steps which needed to be done.   Many steps highlighted within that URL are already performed by the port.  I didn't do those steps.  I performed only those steps shown in this article.

Note that I use inn and innd but both mean the same thing in this article (i.e.the nttp application).

This article is incomplete.  It will get you as far as being able to run innd, post messages to it, and retrieve messages from it.  I have yet to set it up to propogate messages to other news servers or to get messages from other news servers.

The install
The install was pretty easy because I had all the port skeletons installed.  All I did was this:
cd /usr/ports/news/inn-stable
make
make install
The setup
Most of the configuration goes on in /usr/local/news/etc.  Here are the important bits from my inn.conf:
##  $Revision: 1.25 $
##  inn.conf -- inn configuration data
##  Format:
##      <Parameter><whitespace><value>
##
##  See the inn.conf(5) man page for a full description of each
##  of these options
##
##  Blank values are allowed for certain parameters
## ---------------------------------
# All parameters must exist
#
organization:           The FreeBSD Diary - test news server
server:                 news.freebsddiary.org
pathhost:               news.freebsddiary.org
moderatormailer:        %s@freebsddiary.org
domain:                 freebsddiary.org
fromhost:               freebsddiary.org
pathalias:
complaints:             usenet-abuse@freebsddiary.org

You should change these values as appropriate to your site.

Starting innd (and more configuration)
Then I started up innd with this command:
# su news -c /usr/local/news/bin/rc.news 
This account is currently not available.

Ahhh, this one took me a while to figure out.  It means the news user has not been set up.  So I started up vipw and made the entry for news look like this.  Use <ESCAPE> <W> <Q> to save.  Use <ESCAPE> <Q> <!> to discard changes.

news:*:8:8::0:0:News Subsystem:/usr/local/news:/bin/sh

Then I tried again:

su news -c /usr/local/news/bin/rc.news 
INND: No active file!

OK.  So going by the http://www.ragnet.demon.co.uk/mynews/news.html#s1-7-2 I see that I needed to do the following:  I entered the commands shown in bold.

cd /usr/local/news/db
echo 'control 0000000000 0000000001 n' > active
echo 'junk 0000000000 0000000001 n' >> active
chown news:news active
chmod 0644 active

touch history
chown news:news history 
chmod 0664 history 
/usr/local/news/bin/makehistory -r -i
ls -lt
total 2
-rw-rw-r-- 1 root news 75 Dec 2 16:56 history.n.dir
-rw-rw-r-- 1 root news 0  Dec 2 16:56 history.n.pag
-rw-rw-r-- 1 news news 0  Dec 2 16:55 history
-rw-r--r-- 1 news news 61 Dec 2 16:54 active

So then I tried again:

# su news -c /usr/local/news/bin/rc.news
Starting innd.
Scheduled start of /usr/local/news/bin/innwatch.

OK!  That's looking better.  Wait.  What's that in /var/log/messages:

Dec 2 16:57:58 synergy innd: SERVER cant dbzinit 
        /usr/local/news/db/history No such file or directory

Now I can't remember whether or not I had to kill innd.  But in case you have to, I would do it like this:: kill -KILL <pid>.  See sending a HUP to a program for more information. 

Huh?  I thought I created that?  Oh wait, no.  I missed out some stuff:   Back to http://www.ragnet.demon.co.uk/mynews/news.html#s1-7-2 and I see I need to do this as well.

Again, I entered what was in bold:

cd /usr/local/news/db
mv history.n.dir history.dir
mv history.n.pag history.pag
chown news:news history.dir
chmod 0664 history.dir
chown news:news history.pag
chmod 0664 history.pag
ls -lt
total 2
-rw-rw-r-- 1 news news 75 Dec 2 16:56 history.dir
-rw-rw-r-- 1 news news 0  Dec 2 16:56 history.pag
-rw-rw-r-- 1 news news 0  Dec 2 16:55 history
-rw-r--r-- 1 news news 61 Dec 2 16:54 active

Then I started innd again:

# su news -c /usr/local/news/bin/rc.news
Starting innd.
Scheduled start of /usr/local/news/bin/innwatch.

This time I noticed this in /var/log/messages:

Dec 2 17:00:11 synergy innd: SERVER bad_newsfeeds no feeding sites
Testing news
I followed the section on testing at http://www.ragnet.demon.co.uk/mynews/news.html#s1-7-4 and I did the following:
Can we read news?
# telnet localhost nntp
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
200 news.freebsddiary.org InterNetNews server INN 2.2 21-Jan-1999 ready
mode reader
200 news.freebsddiary.org InterNetNews NNRP server INN 2.2 21-Jan-1999 
                                             ready (posting ok).
list active 
215 Newsgroups in form "group high low flags".
control 0000000000 0000000001 n
junk 0000000000 0000000001 n
.
quit
205 .
Connection closed by foreign host.
Can we post news?
# telnet localhost nntp
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
200 news.freebsdidary.org InterNetNews server INN 2.2 21-Jan-1999 ready
ihave <1@test>
335
.
437 Empty article
quit
205 .
Connection closed by foreign host.
What's in the logs?
I then tried to connection from my Agent news reader on my NT workstation.
Dec 2 17:50:26 synergy nnrpd[19016]: perl filtering enabled
Dec 2 17:50:26 synergy nnrpd[19016]: test.freebsddiary.org connect
Dec 2 17:50:26 synergy nnrpd[19016]: test.freebsddiary.org 
                                               no_permission
Dec 2 17:50:26 synergy nnrpd[19016]: test.freebsddiary.org times user 
                                       0.181 system 0.055 elapsed 0.053

Ahh, no access.  OK.  So I give access by adding this to /usr/local/news/etc/nnrp.access:

*.freebsdiary.org:Read Post:::*

Now I can post and read news from my news reader.

What's next?
The next step is starting populating the news server with incoming messages and propogating messages out which I post to it.  That's going to be part of another article.  Which I'm not about to write today.

Need more help on this topic? Click here
This article has 1 comment
Show me similar articles