⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 install.ms.1

📁 早期freebsd实现
💻 1
📖 第 1 页 / 共 4 页
字号:
are 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..PPThe \fI_PATH_RNEWSPROGS\fP directory serves the same purpose for \fIrnews\fPwhen it needs to unpack batches.The \fIRNEWSPROGS\fP parameter specifies if the directory is really used..NH 3Sockets created by innd or clients.PPThe \fIinnd\fP server and its clients (most notably \fIctlinnd\fP)create.UX -domainsockets or named pipes.They are created inside a ``firewall'' directory that gives access permissionto a limited set of users.For example, assume the directory is \fI/usr/local/news/innd\fP and that itis owned by user news in group news and has mode 0770.Using these permissions, then only members of the news group can use\fIctlinnd\fP to create new groups because only they will be able tosend a message to the \fIinnd\fP socket..PPThis directory (which is specified by the \fI_PATH_INNDDIR\fP parameter)is also used to determine the user and group id of all sub-processes spawnedby \fIinnd\fP, as well as the owner of all news articles and files.The owner of this directory is set at installation time and specified inthe ``Ownerships and file modes'' section, above..NH 3Log and config files.PPINN keeps its databases, and some control files their own directory,typically named \fI/usr/local/news\fP.Log files are kept in \fI/var/log/news\fP.There are many parameters in this section that refer to files withinthis directory.Some sites will want to globally replace ``/usr/local/news'' with somethinglike ``/var/news'', and ``/usr/lib/newsbin'' with ``/var/newsbin''.PPThere are two files that contain access passwords,\fI_PATH_NNTPPASS\fP and \fI_PATH_NNRPACCESS\fP.The default location for these files is in \fI/usr/local/etc\fP, so that it isgenerally safe to export \fI/usr/local/news\fP (read-only is probably best)..PPINN programs do extensive logging, and the daily maintenance scriptsdo extensive summary reports and analysis of them.It might take you some time to learn your way around the INN logging system;start by reading the newslog manpages in the \fIdoc\fP directory..NH 3Innwatch configuration.PPThe INN server, \fIinnd\fP, does not contain any checks to see if thereis enough free space on the disk or if the system load average is low enoughto allow article reception.There are two reasons for this.The first reason is philosophical:  it is a mistake to bury this kind of policyinformation inside a program.For example, you don't want to have to recompile the program justbecause you moved to a different filesystem.(Yes, this could be partially answered by moving the information to anexternal config file, but any compiled rules are still likely to beincomplete.)The second reason is pragmatic:  there is no portable way to get standardmeasurements for the information needed.For example, C News provides three different routines to get the filesystemstatistics (with conditional compilation) while the ``get load average''file in IDA sendmail has over 700 lines..PPRather than get tangled up in such a mess of #ifdef's, INN uses anexternal program (shell script) that invokes \fIctlinnd\fP to stop and start theserver as necessary.The program, \fIinnwatch\fP, reads the control file \fIinnwatch.ctl\fP.\fIInnwatch\fP is documented in \fIdoc/news.daily.8\fP, while \fIinnwatch.ctl\fPis documented in \fIdoc/innwatch.ctl.5\fP..PPThe parameters in this section control when the server should stop acceptingarticles, and when it should start again.You will have to examine \fIsite/innwatch.ctl\fP and probably modify it,usually to check the amount of free space on the disks.For example, there is a line in the file that has this fragment in it:.DS!!! df . | awk 'NR == 2 { print $4 }' ! ....DEThis is looking at the fourth field of the second line to get the amountof freespace.You will have to change the ``2'' and ``4'' here, and on other lines, asappropriate for your system.(Changing the output of \fIdf\fP seems to be one of the things vendors liketo do most; it is not worth my time to have INN keep track of all of them.).PPThe parameter \fIINNWATCH_SLEEPTIME\fP specifies how frequently\fIinnwatch\fP should check the system \(em the other parameters shouldbe set with this in mind, eg: there needs to be enough free space on thefilesystem to last the next \fIINNWATCH_SLEEPTIME\fP seconds..PPThe \fIINNWATCH_xxxLOAD\fP parameters specify the load average atwhich different actions should be taken.They are integers, representing the load average multipled by 100.For example, if you want to throttle the server when your load reaches7.5, set \fIINNWATCH_HILOAD\fP to ``750.''.PPThe \fIINNWATCH_xxxSPACE\fP parameters specify the minimum amount of diskspace needed for each of INN's three major filesystems.The numbers are in ``local units,'' equivalent to whatever your \fIdf\fPuses (512-byte units, 1K blocks, etc)..PPThe \fIINNWATCH_SPOOLNODES\fP parameter specifies how many inodes mustbe available in your spool directory..NH 2Typical config.data changes.PPThe following sections show some of the changes that need to be made to\fIconfig.data\fP so that INN will compile.They are only samples; ``your mileage may vary.''.PPNote that if you are using the first release of \fIgcc2\fP, set\fIUSE_CHAR_CONST\fP to ``DONT''..PP.DS.UL "AIX".ta \w'HAVE_ST_BLKSIZE   'uDEFS	-I../include -D_NO_PROTO -U__STR__FORK	forkFREEVAL	void

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -