		 CONFIGURATION AND INSTALLATION OF NN & NN-TK
		 --------------------------------------------


This file describes the necessary steps to configure and install nn.
You are advised to read this file before proceeding with the installation.

If you want to use NNTP (accessing news from a remote host), you must
also read the file NNTP.

NN & NN-TK
----------
It is a compile option (TK) as to whether NN (the character interface)
or NN-TK (the X windows interface) is built.

To build NN-TK you need to have TCL and TK installed.

INDEX TYPES
-----------
NN uses article indexes to speed up access, there are
two forms of indexes that can be used. It is a compile option (NOV)
as to which is used

The older form of indexing is created by the nnmaster program
which produces NN specific files that are read by NN. If you are
using this form of indexing read INSTALLATION.nnmaster as well.

The newer form of indexing uses the NOV (Network OVerview) database
that is produced by the NEWS system itself. This database is
usable by many different news readers and is what it is recommended
to use.


The following command line prompts are used in the examples:
   `$' is used when no special privileges are required.
   `#' is used when SUPER USER privileges may be required.


				STEP 1

		  CREATE CONFIGURATION FILE config.h
		  ----------------------------------

The configuration file is distributed in the file config.h-dist.  You
must COPY this to config.h before proceeding.  Keep the original -dist
file to allow patches to be applied to it if necessary.

	$ cp config.h-dist config.h


				STEP 2

		 EDIT config.h TO REFLECT YOUR SYSTEM
		 ------------------------------------

For each required configuration parameter, the config.h file contains
verbose comments explaining the meaning of each parameter in the file.
Read and follow these instructions carefully.  If you do that, nn
should compile and run without problems.

Further information about the parameters can be found below in case
you are in doubt.  Regarding the NNTP related definitions, consult the
file named NNTP.

Notice that every time you edit config.h, the file update.h is
modified to make a new configuration level for the version in the
source directory.  The current configuration is showed in the version
string as #number.

Finally, a single config.h can be used even if you maintain nn on
several platforms.  Use predefined macro definitions to #ifdef the
inclusion of configuration files and varying definitions.


		 STEP 2.1: CONFIGURATION OF MAKEFILE
		 -----------------------------------

Check the 'Makefile' file for the following parameters.  To ease
future upgrades, override these values with definitions in config.h.
The proper definition is provided in parenthesis.  For example, to use
gcc as a compiler, add "#undef COMPILER" if necessary, and "#define
COMPILER gcc" to config.h.

CC	The command to invoke the C compiler (COMPILER).

CPP	The command to invoke the C preprocessor with the result
	written to the standard output stream (PREPROC).

CFLAGS	Flags to the C compiler (e.g. -O or -g) (CDEBUG for debug or
	optimization flags, COMPILER_FLAGS for everything else).

LDFLAGS	Additional flags to the C compiler when linking executables
	(LDEBUG, LOADER_FLAGS and EXTRA_LIB).

Notice that mandatory system specific definitions for the above are
usually defined in the s- file (see below).


	   STEP 2.2: SPECIFY NETWORK AND NNTP CONFIGURATION
	   ------------------------------------------------

If you use nn on a single system with news on its local disks, you
will not have to worry the least about networking, and you simply
leave NNTP undefined.

Otherwise, consult the file NNTP for further instructions on sharing
the news file and/or the database via NFS and/or NNTP.


		     STEP 2.3: SELECT SYSTEM FILE
		     ----------------------------

A list of systems that nn runs on and their associated include files
is found in the file doc/MACHINES.

If none of these can be used on your system, create your own based on
the file conf/s-template.h.


		    STEP 2.4: SELECT MACHINE FILE
		    -----------------------------

A list of machines that nn runs on and their associated include files
is found in the file doc/MACHINES.

If none of these can be used on your system, create your own based on
the file conf/m-template.h.


			STEP 2.5: LOCALIZE NN
			---------------------

You will have to specify a number of files and directories which nn
has to know about to work properly.  If you don't specify these, nn
will in most cases use it own alternatives which will correspond to
common practices on most installations.

The following directories and files can be defined in config.h:


BIN_DIRECTORY		(mandatory)

	The directory where you want the user programs to be
	installed.  The following programs will be installed in that
	directory:

	nn		The news reader program
	nn-tk		The X  windows news reader program

	nnacct		Accounting, quota, and access management
	nncheck		Check for unread articles (link to nn)
	nngrep		Grep for news groups (link to nn)
	nnpost		Standalone posting program (link to nn).
	nntidy		Cleans up the rc file (link to nn)


LIB_DIRECTORY

	The directory where nn's auxiliary programs and files will
	be installed unless another directory is specified by one of
	the following definitions.



CLIENT_DIRECTORY	(optional, default = LIB_DIRECTORY)

	Contains the auxiliary programs and files required by the nn
	program:

	aux	The shell script used in connection with replies etc.
		It knows about common editors like vi and gnu emacs to
		have them position the cursor appropriately.  To add
		support for your own favourite editor, you should edit
		the file aux.sh, not the compiled `aux' script!



HELP_DIRECTORY		(optional, default = CLIENT_DIRECTORY/help)

	The directory where the help files and online manual are
	stored.  This directory is an obvious candidate for sharing in
	a network.


CACHE_DIRECTORY		(optional, default = each user's .nn directory)

	Only used with NNTP!! Directory to be used as a common storage
	for temporary cache files when nn is used with NNTP.  Using a
	common directory for cache files allows you to clean these out
	on reboot with a single "rm" command in the rc file:
	 	(cd CACHE_DIRECTORY; rm -f *)
	But of course this requires that you use a separate directory
	for the cache!


TMP_DIRECTORY		(optional, default = /usr/tmp)

	The directory to be used as temporary storage for files used
	when editing responses etc.


NEWS_DIRECTORY		(optional, default = /usr/spool/news)

	The directory containing the news spool directories and files.
	It is not required when a remote NNTP server is used.


NEWS_LIB_DIRECTORY	(optional, default = /usr/lib/news)

	The directory containing the news system's active file and
	other related files.

	When a remote NNTP server is used, it is still needed as the
	location of the (mini-)inews program if posting is allowed
	(unless INEWS is explicitly defined to override the default
	location).


LOG_FILE	(optional, default = LIB_DIRECTORY/Log)

	The log file used by nnmaster and nn to store reports, error
	messages, usage statistics, etc.

TKINCLUDE	(default /usr/local/tcl/include)
	The location of the TCL/TK include files

TKLIB		(default /usr/local/tcl/lib)
	The location of the TCL and TK libraries for linking
	into NN-TK

				STEP 3

			 COMPILE THE SOFTWARE
			 --------------------

To compile the software, you just have to run one of the following
make commands.

If you are making a complete package with both master and client, do

	$ make all

If you want to share a database which resides on another host (through
NFS/RFS/rdist), you don't need a master on the local system, so you
can do the following instead:

	$ make client


				STEP 4

		       INSTALLING THE SOFTWARE
		       -----------------------

Installation of the nn software is handled entirely via a script
"./inst" created during the compilation.  The components of nn are
split into five parts, which can be installed separately or in various
combinations depending on whether you run a stand-alone system or
networked systems sharing the database and other parts of the nn
package.  The five components are:

1) Master files and programs (machine dependent) (non NOV)
   Install the MASTER_DIRECTORY programs.

2) User files and programs (machince dependent, shareable)
   Install the BIN_DIRECTORY programs.

3) Auxiliary programs (configuration dependent, shareable)
   Install the CLIENT_DIRECTORY files and programs, this includes
   the tcl directory when NN-TK keeps its tcl files.

4) Documentation (shareable)
   Install the MAN pages in the proper directories.

5) Help files (shareable)
   Install the HELP_DIRECTORY files (except online manual).

6) Online manual (shareable with 5)
   Format and install the online manual in HELP_DIRECTORY.

7) The nn-tk binary
   Install in BIN_DIRECTOR

Unless you have defined yourself as the owner of the nn package and
have write permission on all the necessary directories, you will need
to be super-user to install nn, so start with

	$ su

Now run the installation script:

	# ./inst

The `inst' script will list a menu with the following choices:

(1)-(6)	Install individual parts of the package.

(s)	Install a complete server + client package (1-6).

(c)	NN (character version) full installation (excluding nnmaster)

(t)	NN-TK full installation (excluding nnmaster)

(h)	Install a client with local auxiliary files, but shared
	documentation and help files (2-3).

(n)	Install a client accessing only the database via a network (2-6).

(m)	Install only the nnmaster (1).

(c)	Install only the client programs (2).

(u)	Update already installed parts of the package.  This will
	check for the existence of the old programs, and only update
	programs and files already installed.  You will typically use
	this after applying patches.

You can also run the `inst' script with the choices as arguments, e.g.

	./inst m c

TCL
---
The tcl files the implement the X interface in NN-TK are installed
in the tcl directory in the CLIENT_DIRECTORY, usuall /usr/local/lib/nn/tcl.
NN-TK will will look for the tcl directory in the current directory and
the in .nn before looking in /usr/local/lib/nn/tcl so it is possible to
replace the system wide tcl files with a local copy.

EXMH
----
Using EXMH adds a significant extra capabilities to NN-TK.

To include the EXMH routines create a symbolic link named exmh
in the tcl directory pointing to the EXMH lib directory. It
isn't necessary to have MH installed. If EXMH is not available
NN will still work, but will less functionality.



				STEP 7

		    INSTALL AND EDIT GLOBAL FILES
		    -----------------------------

Depending on your needs, you should create the following files on each
host running nn (you may also just share the files if you like):

CLIENT_DIRECTORY/init
	The global init file for all users on the system.  Users will
	be able to override the definitions in this file, but you can
	probably make some sensible decisions which will prevent
	novice users from getting into trouble, for example set the
	default distribution to "local" etc.

	You can also specify a global presentation sequence here.

	You may use init.sample as a starting point, but don't use it
	without careful examination.  Especially, the sequence part
	is mainly an illustration of the possibilities.  If you are in
	doubt, just delete the sequence part of the file (groups will
	then be presented in pure alphabetical order).

CLIENT_DIRECTORY/routes
	You DO NOT NEED this file if you already run a domain based
	mailer, i.e. when HAVE_ROUTING is defined in config.h.

	Otherwise, you can use it as a configuration file for the
	domain address remapping done by nn in reply addresses and the
	nnmail program.  You may use routes.sample as a starting point
	(it briefly describes how to build a routes file).

	Please notice that neither the routes functionality, nor
	nnmail is a supported part of nn - if you really want to
	run a domain-based mailer, get smail 2.5 or later.  And if you
	ask me how to use it I will answer: "Get SMAIL instead".

CLIENT_DIRECTORY/motd
	Every time you change this file, it will be shown to the nn
	users the next time they invoke nn.  This can be used to
	inform the users about changes in the news environment or
	local policies.  (motd = message of the day)


NNTP_SERVER
	Must contain the host name of the NNTP-server when NNTP is
	used.  If you already run NNTP with your other news readers,
	this file does not need to be modified.

CLIENT_DIRECTORY/nn-defaults
	This file is in X resource format, it contains the defaults 
	for the various NN-TK options. It also contains resources
	setting other aspects of the interface such as colors, fonts
	and adjustments to the EXMH interface. The resources can also
	be set in the X server.

	The system wide nn-defaults can be overridden by having a
	local file in .nn


				STEP 8

		       TEST THE BASIC FUNCTIONS
		       ------------------------

If any of the following tests fails or you see other peculiar
behaviour, you should consult the PROBLEMS file.  You may not be the
only one to have seen the problems, and there might even be a solution.

There are a few things you should check to ensure the proper
functioning of nn.

1) Backup your current .newsrc file if you have one.  (Don't save it
   in .newsrc.bak or .newsrc.orig since nn may use these names).

2) Run `nn'.  If you have upgraded from release 6.3, nn will convert
   your release 6.3 .nn/rc file into a .newsrc file.

3) Does nn find any news?  If not, does nn -x find anything?

4) Can you send mail to yourself?  Try the sequence:
	m (return) (return) testing (return)
	edit the letter
	s (return)

   If not, you should check the REC_MAIL program.

5) Can you post an article to the local test group?  Try:
	:post (return)
   	test (return)
   	local (return)
	edit the article
	s (return)

   If not, you should check the INEWS program.


	     -------------------------------------------
			 IF EVERYTHING WORKS
		 YOU HAVE COMPLETED THE INSTALLATION
	     -------------------------------------------


