inn-2.2 (NEWS)

  1. How to install
  2. Configure
  3. How to regist to syslog
  4. How to run
  5. How to test
  6. Maintenance
  7. How to expire
  8. Start script

How to install

  • Uninstall old version
    # rpm -e inn-1.7.2
    
  • Download from
    ftp://ftp.isc.org/isc/inn/
  • Home page
    http://www.isc.org/inn.html
    # cp /tmp/inn-2-2.tar.gz /usr/src
    # cd /usr/src
    # tar zxvf inn-2-2.tar.gz
    # cd inn-2.2
    # ./configure
    # make
    # make install
    

    Configure

  • /etc/passwd
    news:*:9:13:news:/usr/local/news:
    
  • ~/etc/inn.conf
    ##  $Revision: 1.24.2.1 $
    ##  inn.conf -- inn configuration data
    ##  Format:
    ##	:
    ##
    ##  See the inn.conf(5) man page for a full description of each
    ##  of these options
    ##
    ##  Blank values are allowed for certain parameters
    ## ---------------------------------
    # All parameters must exist
    #
    organization:		hoge-net
    server:			news
    #pathhost:		ns
    #moderatormailer:
    domain:			hoge.bt
    fromhost:		news.hoge.bt
    pathalias:
    complaints:
    mta:			/usr/sbin/sendmail -oi %s
    mailcmd:		/usr/local/news/bin/innmail
    checkincludedtext:	false
    maxforks:		10
    maxartsize:		1000000
    nicekids:		4
    nicenewnews:		0
    verifycancels:		false
    logcancelcomm:		false
    wanttrash:		false
    remembertrash:		true
    linecountfuzz:		0
    peertimeout:		3600
    clienttimeout:		600
    allownewnews:		true
    localmaxartsize:	1000000
    logartsize:		true
    logipaddr:		true
    logsitename:		true
    maxconnections:		50
    artcutoff:		14
    icdsynccount:		10
    hiscachesize:		0
    readertrack:		false
    strippostcc:		false
    status:			0
    timer:			0
    readerswhenstopped:	true
    noreader:		false
    extendeddbz:		false
    nnrpdoverstats:		false
    storeonxref:		true
    nnrpdcheckart:		true
    storemsgid:		true
    usecontrolchan:		false
    mergetogroups:		false
    backoffauth:		false
    backoffdb:		/usr/local/news/db/backoff
    backoffpostfast:	0L
    backoffpostslow:	1L
    backofftrigger:		10000L
    mimeversion:
    mimecontenttype:
    mimeencoding:
    refusecybercancels:	false
    activedenable:		false
    activedupdate:		30
    activedport:		1119
    nnrpperlauth:		false
    #
    # 
    # These options are unlikely to need changing in most situations
    #
    chaninacttime:		600
    chanretrytime:		300
    pauseretrytime:		300
    nntplinklog:		false
    nntpactsync:		200
    badiocount:		5
    blockbackoff:		120
    #
    # ---------------------------------
    # Changing these options can have an effect on the way articles are
    # stored and may require recreating the spool and/or database files
    #
    wireformat:		false
    xrefslave:		false
    nnrpdposthost:
    nnrpdpostport:		119
    spoolfirst:		false
    writelinks:		true
    storageapi:		false
    articlemmap:		false
    overviewmmap:		true
    bindaddress:		all
    sourceaddress:		any
    port:			119
    #
    ## Keywords-in-overview options
    ## Enabling this without stopping innd and deleting the existing overview
    ## database and adding  will probably confuse a lot of things. You must 
    ## have compiled this support in too.
    #
    keywords:		false
    keylimit:		512
    keyartlimit:		100000
    keymaxwords:		250
    #
    # Other options
    innflags:		
    doinnwatch:		true
    innwatchsleeptime:	600
    pgpverify:		false
    controlfailnotice:	false
    logcycles:		3
    innwatchpauseload:	1500
    innwatchhiload:		2000
    innwatchloload:		1000
    innwatchspoolspace:	8000
    innwatchbatchspace:	800
    innwatchlibspace:	25000
    innwatchspoolnodes:	200
    docnfsstat:		false
    #
    # ---------------------------------
    # Paths to various aspects of the news system
    #
    pathnews:		/usr/local/news
    pathbin:		/usr/local/news/bin
    pathfilter:		/usr/local/news/bin/filter
    pathcontrol:		/usr/local/news/bin/control
    pathdb:			/usr/local/news/db
    pathetc:		/usr/local/news/etc
    pathrun:		/usr/local/news/run
    pathlog:		/usr/local/news/log
    pathhttp:		/usr/local/news/log
    pathtmp:		/usr/local/news/tmp
    pathspool:		/usr/local/news/spool
    patharticles:		/usr/local/news/spool/articles
    pathoverview:		/usr/local/news/spool/overview
    pathoutgoing:		/usr/local/news/spool/outgoing
    pathincoming:		/usr/local/news/spool/incoming
    patharchive:		/usr/local/news/spool/archive
    pathuniover:		/usr/local/news/spool/uniover
    overviewname:		.overview
    #
    # ---------------------------------
    #
    
  • ~/db/active
    control 0000000000 0000000000 y
    junk 0000000000 0000000000 y
    local.hoge.general 0000000000 0000000000 y
    local.hoge.general 0000000000 0000000000 y
    local.imp.visual_basic 0000000000 0000000000 y
    
  • ~/bin/makehistory
    $ ~/bin/makehistory
    $ cd ~/db
    $ mv history.n.dir history.dir
    $ mv history.n.hash history.hash
    $ mv history.n.index history.index
    
  • ~/etc/nnrp.access
    ## Default is no access, no way to authentication, and no groups.
    *::::!*
    
    # Allow access from localhost
    localhost:Read Post:::*
    *:Read Post:::*
    

    How to regist to syslog

  • /etc/syslog.conf
    news.=crit                       /dev/console
    news.=crit                       /usr/local/news/log/news.crit
    news.=err                        /usr/local/news/log/news.err
    news.notice                      /usr/local/news/log/news.notice
    

    How to run

  • Run
    $ ~/bin/rc.news
    
  • /etc/rc.d/rc.sysinit
    ..............
    # News server
    /usr/local/news/bin/rc.news
    
  • Kill
    # ps x
    # kill 
    

    How to test

  • Check process
    $ ps x
      PID TTY STAT TIME COMMAND
      105  ?  S    0:00 /usr/local/news/bin/innd -p3
     3974  p1 S    0:00 su - news
     3975  p1 S    0:00 -sh
     3986  p1 R    0:00 ps x
    
  • Test by telnet
    $ telnet localhost nntp
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    200 ns.hoge.bt InterNetNews server INN 2.2 21-Jan-1999 ready
    LIST
    215
    control 0000000025 0000000001 y
    junk 0000000003 0000000004 y
    local.rim.general 0000000000 0000000001 y
    local.imp.general 0000000000 0000000001 y
    local.imp.visual_basic 0000000005 0000000001 y
    .
    QUIT
    205 .
    Connection closed by foreign host.
    

    Maintenance

  • How to make a new news group
    $ cd ~/bin/
    $ ./ctlinnd pause 'edit active'
    $ ./ctlinnd newgroup imp.visual_basic y
    $ ./ctlinnd reload active 'edit active'
    $../ctlinnd go 'edit active'
    
  • How to delete a news group
    $ cd ~/bin/
    $ ./ctlinnd pause 'edit active'
    $ ./ctlinnd rmgroup imp.visual_basic
    $ ./ctlinnd reload active 'edit active'
    $../ctlinnd go 'edit active'
    
    Don't delete control, junk, test and to news group.

    How to expire

  • ~/etc/expire.ctl
    pattern:modflag:keep:default:purge
    
    Format
    colums
    Pattern Pattern of news group
    modflag A - all group, M - moderarot group, U - non moderator group
    keep The lowest date when an article is stored
    default The default date when an article is stored
    purge The max date when an article is stored

    /remember/:7
    *:A:14:14:14
    local.*:never:never:never
    local.test::3:3:3
    
    If article expires before 14 days, we still remember it for 14 days in case we get offered it again. Depending on what you use for the innd -c flag and how paranoid you are about old news, you might want to make this 28, 30, etc.
    /remember/:14
    
    Keep for 1-10 days, allow Expires headers to work.
    *:A:1:10:never
    
    Some particular groups stay forever. Keep FAQ's for a month, so they're always available
    *.answers:M:1:35:90
    news.announce.*:M:1:35:90
    
    Some other recommendations. Uncomment if you want announce groups tend to be low-traffic, high signal.
    *.announce:M:1:30:90
    
    Weather forecasts
    *.weather:A:1:2:7
    

    Start script

  • /etc/rc.d/init.d/innd
    #! /bin/sh
    #
    # innd          InterNet News System
    #
    # chkconfig: 345 95 05
    # description: inn is the most popular server for Usenet news. It allows \
    #              you to setup local news servers. It can be difficult to \
    #              set up properly though, so be sure to read /usr/doc/inn* \
    #              before trying.
    # processname: innd
    # pidfile: /var/run/news/innd.pid
    
    # Source function library.
    . /etc/rc.d/init.d/functions
    
    # Get config.
    . /etc/sysconfig/network
    
    # Check that networking is up.
    if [ ${NETWORKING} = "no" ]
    then
            exit 0
    fi
    
    [ -d /etc/news ] || exit 0
    [ -d /usr/lib/news ] || exit 0
    [ -d /var/spool/news ] || exit 0
    
    # See how we were called.
    case "$1" in
      start)
            echo -n "Starting INND system: "
            su news -c ". /etc/rc.d/init.d/functions ; daemon /etc/rc.d/rc.news"
            touch /var/lock/subsys/innd
            echo
            ;;
      stop)
            if [ -f /var/run/news/innd.pid ]
            then
                    echo -n "Stopping INND service: "
                    killproc innd
                    rm -f /var/run/news/innd.pid
                    echo
            fi
            if [ -f /var/run/news/innwatch.pid ]
            then
                    echo -n "Stopping INNWatch service: "
                    killproc innwatch -9
                    rm -f /var/run/news/innwatch.pid
                    echo
            fi
            if [ -f /var/run/news/innfeed.pid ]
            then
                    echo -n "Stopping INNFeed service: "
                    killproc innfeed -9
                    rm -f /var/run/news/innfeed.pid
                    echo
            fi
            if [ -f /var/run/news/actived.pid ]
            then
                    echo -n "Stopping INN actived service: "
                    killproc actived -9
                    rm -f /var/run/news/actived.pid
                    echo
            fi
            rm -f /var/lock/subsys/innd /var/lock/news/*
            ;;
      status)
            status innd
            ;;
      restart)
            echo -n "Restarting INN Service: "
            killproc innd -HUP
            echo
            ;;
      *)
            echo "Usage: $0 {start|stop|status|restart}"
            exit 1
            ;;
    esac
    
    exit 0
    
    

    Back
    Google
    Web www.grape-info.com