INN Tips Donnie Barnes, djb@redhat.com V1.0, February 19, 1996 1. Preface ``Red Hat Tips'' are documentation meant to help Red Hat users with specific tasks. Some of these documents are for new users, some are for advanced users. Hopefully each document will also be of help for both new and advanced users. If you have contributions to make, please send them to tech-sup@redhat.com. If you have changes that need to be made to individual Tips, send them to the author of that document. 2. Introduction This document is a primer to help people first setup INN on a Red Hat Linux system. It was initially written by Geoff Lewis (thanks Geoff!). 3. Getting Started First and foremost, here is some recommended reading: o INND FAQ (found on the redhat CDROM, and should be installed in /usr/doc/inn-1.4unoff3-2 o README.RHCL (found in the same directory) o Unix System Administration Handbook, by Nemeth, ie. ``the red book'' o news.software.nntp Usenet newsgroup. Full of newbie and esoteric questions. You aren't as dumb as you think you are. For starters. We'll assume you just installed your RHL distribution, and now want to run INN. If you started INN as root, you have totally screwed up the permissions for all the files. You should probably uninstall and re-install the INN package. DO NOT run the INN BINARIES AS ROOT!! I messed up that way, and I think that is how others may be getting into trouble. When editing files, and copying and renaming them, please do this as the news user. The easiest way to do this is to log in as root, and type the command su news. 4. Disk Space Requirements Disk space and memory issues: You need around 2 gigs of space to run a small feed, and probably at least 4 gigs to run a full feed. The Nemeth book says you need 64 megs of ram-I'm doing ok with 40 megs, but my user base is small. I tried INN initially on a DX50 486, and it was a pit pokey. I have since upgraded to a P133 and am now able to do stuff like run Xwindows acceptably with INN running in the background. If you can, devote the entire machine to INN, as it is a memory and CPU pig. Now for the configuration. Let's make some assumptions: Your feed site is news.redhat.com, and your site is news.rookie.com. Since news is most likely an alias for another host name, lets say news.redhat.com is blue.redhat.com and news.rookie.com is green.rookie.com. Now you need to edit the control files. 4.1. active You need to obtain a copy of an active file. This is the list of newsgroups that you will carry on your system. If you want a full feed, get the active file from your feed site, and edit it at will. However, before you use the active file from another site, it will need to be modified. Copy the active file to /var/lib/news (this is where your history file, active file, active.times and newsgroups file go). There will probably be a placeholder active file there, and you may safely delete it, since it isn't what you want to use. Rename your acquired active file to ``upstream.active'' and process it with the following command: cat upstream.active | awk '{ printf("%s 000000000 000000000 %s\n", $1, $4) }' > active (All on one line.) You should now have an active file with all 000000000's in it. 4.2. newsgroups You now need to obtain your upstream newsgroups file, which contains descriptions of the active newsgroups. This file also should exist in the /var/lib/news subdirectory. You should now be done with the /var/lib/news subdirectory. 4.3. expire.ctl You should now go to the /etc/news subdirectory. You want to edit the expire.ctl file, which is used by the expire program. An initial expire.ctl file may look like this: /remember/:14 *:A:3:4:5 4.4. newsfeeds You now need to edit the newsfeeds file. This file indicates how articles should be sent to upstream or downstream sites. The newsfeed file is sensitive to typos, so be careful. You need an entry in the newsfeeds file pointing at your feeder site. You need this in your newsfeeds file: ME\ :*,!control,!junk,!rookie.*::\ redhat.com\ :*,!control,!junk\ :Tf,Wnm:news.redhat.com These two entries should be near the top of your newsfeeds file. 4.5. nnrp.access The nnrp.access file allows newsreader clients access to the news server. To allow hosts in the rookie.com domain to read news, this entry should be in nnrp.access: *.rookie.com:Read Post:::* 4.6. hosts.nntp This file tells INN which hosts are allow to transfer articles to the local site. Any hosts not listed in this file are handed off to the nnrp.access file. Important, you need to have your local hostname listed in this file! news.rookie.com should have this in its hosts.nntp file: news.redhat.com blue.redhat.com green.rookie.com You may not need to place the actual hostname in there, but it won't hurt. Remember, in the above example, news and blue are both hostnames for the same machine in the redhat.com domain. 4.7. inn.conf organization: Top Server server: green.rookie.com domain: rookie.com fromhost: green.rookie.com moderatormailer: %s@uunet.uu.net pathhost: green.rookie.com 4.8. innwatch.ctl In the last line of this command, there is a print . This should be changed to print . 4.9. nntpsend.ctl This file needs to be edited. redhat.com:blue.redhat.com:: 4.10. passwd.nntp blue.redhat.com:: news.redhat.com:: 4.11. Other tasks: We are just about there. We now need to make sure the news.daily script gets run once a day in order to be articles get expired and such. This entry needs to be added to news's chrontab: 6 4 * * * /usr/lib/news/bin/news.daily > /dev/null 2>&1 & Edit /etc/rc.d/rc.news and change DOINNWATCH=false to DOINNWATCH=true Ok, you should now be able to reboot, and INN should be running when you come back up. Assuming your feed is turned on/, you should start getting articles. Examine the /var/log/messages file to see how things are going. Since the user news will send messages to itself, you will want to edit the /etc/aliases file so that messages sent to news get sent to your user account. 5. What to do if things don't work... o 1. Check permissions. Go to /usr/lib/news/bin, and su to news. Run inncheck -perms and check to see if any permissions need to be changed. DO NOT change the permission for inndstart though-that will keep INND from loading. If you do change any permissions, be sure to record each change you make, so you can go back and change them earlier. If you get messages like this: ME: can't open file, make sure the news user has read or write access to that file. As far as I know, all of the configuration files need to be owned by news, and exist in the news group. o 2. Make sure your feed is sending. o 3. Look through the FAQ's. Lots of questions are answered in there. I hope this primer has been useful. As far as I know, this text only applies to the default INN distribution that comes with Red Hat Linux 2.1, and may not be pertinant to any other Linux distributions. If you see any errors or omissions, feel free to point them out. 6. Copyright Notice This document is Copyright (C) 1996 by Red Hat Software. Redistribution of this document is permitted as long as the content remains completely intact and unchanged. In other words, you may reformat and reprint or redistribute only.