📄 install.ms
字号:
If you need to link in other libraries (e.g., \fI\-lnet\fP) put themon the \fILIBS\fP line..\".PP.\"INN can be built with Conor Cahill's ``debug_malloc'' package..\"Add ``-D_DEBUG_MALLOC_INC\ -Ixxx'' to the \fIDEFS\fP line, where \fIxxx\fP.\"is the path to the debug package..\"You will also have to add the appropriate ``libdbmalloc'' value to the.\"\fILIBS\fP parameter..PPThe Makefiles usually filter all \fIlint\fP output through a \fIsed\fPscript.If you are very paranoid, set \fILINTFILTER\fP to \fIcat\fP.If your lint output is in the broken multi-line format:.DSvalue type declared inconsistently exit llib-lc(297) :: test.c(7)function returns value which is always ignored printf.DEThen set \fILINTFILTER\fP to be the ``sedf.sysv'' line..PPThe \fIlib\fP directory also builds a \fIlint\fP library, so thatyou can make sure the other programs are properly using the libraryroutines.The \fILINTLIBSTYLE\fP parameter (used in \fIlib/Makefile\fP and\fIlib/makellib.sh\fP) controls how the \fIlint\fP library is built.If your \fIlint\fP understands the ``\-C'' flag, then set it to ``BSD''.If you need the ``\-o'' flag to build a library, then set it to ``SYSV''.If neither of these work, you can set it to ``NONE''; this will justcreate an empty file so that the other Makefiles don't break.If you come up with a fourth alternative, let me know..PPUnfortunately, on some systems \fIlint\fP is all but useless, so complainto your vendor and take the output with a grain of salt.You might get some warnings about ``struct\ _DDHANDLE'' being undefined.You can ignore them and ask your vendor to support the BSD ``\-z'' lint flag.If you set \fIHAVE_UNISTD\fP to ``DO'' then you might get warningsabout prototype mismatches for various functions declared in\fIinclude/clibrary.h\fP.You can ignore them or remove the lines from the INN header file..PPThe \fIMANPAGESTYLE\fP parameter (used in \fIdoc/Makefile\fP and\fIdoc/putman.sh\fP) controls how manual pages are installed into yourpublic directory while the \fIMANx\fP parameters specify the directorieswhere they get installed.If you do not want to install any manpages, set \fIMANPAGESTYLE\fP to\fINONE\fP..NH 3Logging levels.PPINN uses the modern \fIsyslog\fP that separates messages into bothlevels and categories.Look in your \fI<syslog.h>\fP header file for a ``LOG_NEWS'' macro,and check your \fIsyslog\fP(3) manpage to make sure that \fIopenlog\fPtakes three arguments.If it doesn't, then you will have to use the library routine and serverprovided in the \fIsyslog\fP directory.This is described later..PPThe different levels that are described in the \fIsyslog\fP(3) manpageare confusing, so INN uses its own names for the four levels it uses:.DS.nf.ta \w'L_NOTICE 'uL_FATAL Fatal error, about to exitL_ERROR Error that might require attentionL_NOTICE Informational notice, no action neededL_DEBUG Protocol tracing or other debugging messages.fi.DEDepending on how your \fIsyslog.conf\fP(5) file is set up, you might wantto change the \fIL_xxx\fP parameters in this section..PPThe \fIscanlogs\fP script assumes that the first three categories aboveare each directed into separate files.See \fIdoc/newslog.5\fP, \fIdoc/newslog.8\fP, and \fIsyslog/syslog.conf\fPfor details.Logging is also described in more detail later..NH 3Ownerships and file modes.PPThe NNTP server needs to open the NNTP port; it is port number 119,which requires root access.This is the only part of INN that needs this privilege: all other programscan run under the distinct user and group id specified by the \fINEWSUSER\fPand \fINEWSGROUP\fP parameters.Most news administration tasks must be done as user \fINEWSUSER\fP (see theexplanation of \fIctlinnd\fP below).In addition, \fIinews\fP will only let the \fINEWSUSER\fP user or members ofthe \fINEWSGROUP\fP group post control messages other than cancel..PPSome INN scripts (primarily the control message scripts and thedaily maintenance script) need to send email to the news maintainer.The \fINEWSMASTER\fP parameter specifies the right address.This is most often the login name of the account which has\fINEWSUSER\fP as its user id; use an alias to forward it to the right people..PPSome Usenet sites still use the Path header line to generate their email replymessages.Using the Path has never been guaranteed to work, and INN tries to helpstop this practice by refusing to generate valid Path addresses.The \fIPATHMASTER\fP parameter specifies what \fIinews\fP should putat the tail end of the Path line.If your \fINEWSMASTER\fP mailbox is getting cluttered, then you mightwant to change this to be an alias that rejects the message or drops itinto the bit-bucket.The default value is ``not-for-mail'' which usually results in bouncedemail..PPThe \fIxxx_MODE\fP parameters specify the permissions for articles anddirectories created within the spool area, and the active file, all ofwhich are owned by user id \fINEWSUSER\fP..NH 3C library differences.PPEditing the parameters in this section will require you to lookaround at the files in your \fI/usr/include\fP directory..PPThe \fISIZE_T\fP parameter is the datatype of the ``size'' parametersin subroutine calls like \fImemchr\fP and \fIfread\fP.The \fILOCK_STYLE\fP parameter specifies how file-locking should be done.\fIInnxmit\fP is the only program that locks files; if you use the providedscripts, this isn't even necessary, so you can set this to ``NONE'' if youhave any compile problems..PPThe \fIDIR_STYLE\fP parameter specifies what is returned by your\fIreaddir\fP(3) routine.This will be either a ``struct\ direct'' or a ``struct\ dirent'';set the parameter to ``DIRECT'' or ``DIRENT'' as appropriate..PPIf you do not have.UX -domainsockets, set \fIHAVE_UNIX_DOMAIN\fP to ``DONT.''This means that INN will use a named pipe for the communicationbetween \fIinnd\fP and \fIctlinnd\fP.It also means that there will be no local ``private'' port for \fIrnews\fPto use; this should not cause any problems, although it makes iteasier for anyone to use \fIrnews\fP and post fake news articles.(You might also have to modify the \fIsyslog\fP routines; see the end ofthe file \fIsyslog/README\fP for details on this.).PPINN needs to know how many descriptors are available to use for filesand sockets.There are several ways to get this number; the \fIFDCOUNT_STYLE\fPparameter specifies which method to use.On most systems, the \fIgetdtablesize\fP routine will do this, soleave the default of ``GETDTAB.''On other systems you need to use the \fIgetrlimit\fP, \fIsysconf\fP or\fIulimit\fP routine, so set the parameter to ``GETRLIMIT'', ``SYSCONF'',or ``ULIMIT'', respectively.If you do not have any of those calls then set the parameter to ``CONSTANT''and edit the file \fIlib/getdtab.c\fP to return the right number.To get this number, look for an \fIOPEN_MAX\fP constant in your system headerfiles, or write a program that repeatedly opens \fI/dev/null\fP untilit gets an error..PPThe last few parameters in this section, \fIxxxVAL\fP, are used primarilyto keep \fIlint\fP quiet.These functions are declared in \fIinclude/clibrary.h\fP, and the returnvalues are pretty much always ignored.You can usually determine what these values should be by examiningyour manpages or your \fIlint\fP libraries..NH 3C library omissions.PPINN uses library routines that might not be present in all.UXsystems, although they should be.The \fIlib\fP directory provides versions of some of these routines,including copies of the freely-redistributable BSD string routines.The \fIMISSING_SRC\fP and \fIMISSING_MAN\fP parameters can be set tolist those routines that are missing from your C library.If you don't have \fIstrcasecmp\fP and \fIstrncasecmp\fP then you willneed the \fIstrcasecmp\fP module built into your INN library.Add the ``.c'' and ``.o'' names to \fIMISSING_SRC\fP and \fIMISSING_OBJ\fP,respectively..PPThe following routines are all found in the file of the same name.If they are missing from your system, add them the same way:.DS.ta 1.5i +1.5imemchr strchr getoptmemcmp strrchr mkfifomemcpy strspn strerrormemset strtok.DE.PPIf you are using version 1 of the GNU C compiler on a Sparc running SunOS,you should add \fIinet_ntoa\fP as a missing function.This is because the first version of \fIgcc\fP didn't properly passstructures into routines compiled with the Sun C compiler..PPIf you have an older version of \fIsyslog\fP add \fIsyslog.c\fP and\fIsyslog.o\fP to the appropriate parameters..PPPyramid machines running OSx have fast assembly-language versions of thestring routines in the ATT library.To use these routines, add ``$(OSXATTOBJ)'' to the \fIMISSING_OBJS\fPparameter.This will cause \fIlib/Makefile\fP to extract the object files from the ATTlibrary, and add them to the INN library..NH 3Miscellaneous config data.PPAll the parameters in this section become macros in the file\fIinclude/configdata.h\fP.You should at least look through the parameters up to \fIVERIFY_CANCELS\fP.(If set to ``DO'', then \fIinnd\fP will ignore cancel messages unlessthe From or Sender header match those of the original poster.)In general, however, you can leave this section pretty much alone until youhave some experience running INN.Nevertheless, here are some comments on some of the more useful parameters..PP\fIInnd\fP can memory-map the \fIactive\fP file if you set\fIACT_STYLE\fP to ``MMAP''.On some systems, however, when a mapped file is updated its mtime isnot updated.Apparently some versions of System V Release 4 have this problem.This causes problems for programs like \fInnmaster\fP which look at the\fIst_mtime\fP field of the \fIstat\fP structure in order to determine ifany new news has come in.(\fINnmaster\fP is part of the \fInn\fP newsreading program.)The best work-around is probably an hourly \fIcron\fP job that touches the\fIactive\fP file..PPThere are a number of parameters that control the behavior of \fIrnews\fP.If you set \fIRNEWS_SAVE_BAD\fP to ``DO'' then articles that \fIinnd\fPrejects for reasons like bad headers will be saved in the \fI_PATH_BADNEWS\fPdirectory; you will have to periodically scan this directory and cleanit up.You can also control how \fIrnews\fP logs duplicates (those aren't savedregardless of the value of \fIRNEWS_SAVE_BAD\fP), logging them through\fIsyslog\fP, to a file, or not.Note that if you set \fIRNEWS_LOG_DUPS\fP to ``FILE'', then you will wantto change \fI_PATH_RNEWS_DUP_LOG\fP, which appears later in the file.If you receive news from several UUCP feeds, you might want to log duplicatesso that you can cut down your phone bills by optimizing your feeds.The \fIRNEWSPROGS\fP parameter says whether or not to look in\fI_PATH_NEWSPROGS\fP for commands named on the incoming ``#!'' line ofnews batches.You probably want to set this to ``DO''.Make sure that the full pathname of \fIrnews\fP, \fI_PATH_RNEWS\fP,does not conflict with the directory where your unpackers are put,\fI_PATH_NEWSPROGS\fP..PPIf \fIIPADDR_LOG\fP is set to ``DO'' then the news log will report the IPaddress of hosts that send articles, rather then what they put in the Pathline.This can be useful if you run \fIinnd\fP with the ``\-a'' flag.(If you do this, you might want to pick up ``hf.tar.Z'' via anonymousFTP to ee.lbl.gov; it is a filter that turns IP addresses into host names.).PPThe \fIxxx_TIMEOUT\fP parameters control various timers within INN;you might want to change some of these depending on your system load..NH 3Paths to common programs.PPINN uses a few standard programs like \fI/bin/sh\fP and \fIsendmail\fP.If you don't have \fIsendmail\fP then you must have a program thataccepts a full message \(em including headers \(em on its standard input,and delivers it.This program is specified by the \fI_PATH_SENDMAIL\fP parameter, andis normally ``/usr/lib/sendmail\ -t''.The parameter is actually a \fIsprintf\fP format string that will begiven the destination address as its only argument.on some sites (e.g., those running MMDF) the ``\-t'' could be replacedwith a ``%s''..PPINN puts most of its executables in the directory specified by the\fI_PATH_NEWSBIN\fP parameter.Some programs expect \fIinews\fP and \fIrnews\fP to be in certain places;for example, UUCP usually wants \fIrnews\fP in \fI/bin\fP.The default configuration puts these programs in only one spot; if youneed to have multiple links to the same file, you will have to do ityourself after INN is installed.If you have additional scripts and programs that you use to maintain yoursystem, you can put them in whatever directory you want.You will probably need to add \fI_PATH_NEWSBIN\fP to the PATH of anysuch scripts..PPIf you have an \fI/etc/rc.local\fP file you should make sure thatit invokes the script named by the \fI_PATH_NEWSBOOT\fP parameter.On other systems (mostly System V derivatives), the system boot procedureautomatically runs all the scripts in a particular directory, such as\fI/etc/init.2\fP.In that case, you should pick a name like \fI/etc/init.2/S99news\fP andhave the news boot script installed there, or install it in the default\fI/etc/rc.news\fP and make the link yourself..PPThe daily maintenance script, \fInews.daily\fP calls \fIscanlogs\fPto rotate and trim log files, as well as generating summaries using\fIegrep\fP and \fIawk\fP.On some systems the log files are too big for these programs so youmight have to complain to your vendor and install the versions fromthe Free Software Foundation.The \fIscanlogs\fP script has a short test you can run to see if your\fIegrep\fP will work..NH 3Paths related to the spool directory.PPBy default, all news articles are stored in directories under\fI/usr/spool/news\fP.Be careful if you pick a different value \(em many newsreaders knowabout this directory name..PPINN uses a trick (which I first saw in C News) that lets it use this samedirectory to store its incoming news (spooled by \fIrnews\fP when\fIinnd\fP is not available), and its outgoing batch files.Since no newsgroup can ever have a dot in its name, a directory like\fIout.going\fP can never be a newsgroup name, and it is safe toput the news batchfiles in there.This is used by the \fI_PATH_SPOOLNEWS\fP parameter, and the\fI_PATH_BATCHDIR\fP parameter..PPDo not make \fI_PATH_LOCKS\fP be in the same filesystem as\fI_PATH_SPOOLNEWS\fP.If you do this, then INN will not be able to create any lock files whenyour spool directory is full.This will probably mean that \fInews.daily\fP will not be able to runand that it won't call \fIexpire\fP to free up disk space.You should also put \fI_PATH_NEWSLIB\fP on a separate partition if youcan, but that is not as important because it tends to fill up less often..PPIf you change parameters in this section a great deal, then there is a chancethat the \fImakedirs.sh\fP script will fail because some neededintermediate directories will not exist.This should not be a problem, as you can just create the directoriesyourself \(em make sure to set the ownership and modes right \(em andre-run the script..NH 3Execution paths for innd and rnews.PPAll control messages (other then ``cancel'') are carried out by scripts.Your system must be able to \fIexec\fP shell scripts directly.All the scripts distributed with INN start with ``#!\ /bin/sh.''.PPThe \fI_PATH_CONTROLPROGS\fP parameter specifies the directory wherethese scripts exist.Do not set this to a public directory like \fI/bin\fP because some bozomight send out an ``rm'' control message.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -