Configuring a Linux Newsgroup (NNTP) Server

Next you need to install inn by running two commands. The first is the [make] command. This command will compile the source code from inn into binary executable files. It will not install the product. This process will take anywhere from 3-10 minutes, depending on the speed of your computer. Here is a snapshot of inn compiling that was taken from a telnet session.

Finally you can go ahead and actually install inn by typing [make install]. This will complete the process and if all goes well, you will be able to configure the service when it finishes. This process will take a few minutes to complete, but not quite as long as the compile. It’s important that you run both of these commands as root so that inn can create the necessary files and directories, as well as bind to port 119. Here is a snapshot of the installation in progress.

There are a few more commands that need to be run before INN can start and begin accepting newsgroups and posts. First of all you must generate the history database files. Then you must rename them to be usable by inn.

If you type the command [service innd start] you will get an error telling you to run makehistory and makedbz before innd will start. To do this you must first locate the directory that contains the active.times file. Do this by changing to the root directory and typing [locate active.times]. This should be located in /usr/local/news/db unless you configured them to be elsewhere when you ran [./configure] The [makehistory] and [makedbz] commands are located in /usr/local/news/bin. To create the history files run the following command sequence from the /usr/local/news/db directory.

su news
cd /user/local/news/db
touch history
../bin/makedbz –i

The result of these commands should be a series of new files in the /user/local/news/db directory with the letter n in their name. These files need to be renamed to exclude that letter before innd will start. To do this run the following commands from the /user/local/news/db directory.

mv history.n.index history.index
mv history.n.hash history.hash
mv history.n.dir history.dir
chmod 644 *

Now you can test innd to see if it starts by locating the script in the /usr/local/news/bin folder. This script needs to be run as the news user, so type [su news] before you start the service. To start innd type ./inndstart. Don’t forget to type [exit] to return to your root session. You should further be able to verify the status of innd by reviewing the output of the [netstat –l] command. You should see that you server is listening for connections on port 119, which is the nntp protocol.