:





  :
http://lib.ru/DOWNLOAD/mirroring.txt



                 ,
               :

     1.   url 
     2.  email-   
     3.           
         .
     4.          ,
               .
         -  ,    "  "  
         , As Soon As Possible.



           23   2004    40  ,
 - 4.6 Gb,   - 50-100Mb  .
        a (lib.ru) -  40 Gb
, 500,000 , 35-40    ,
                  30 - 500
   .



                    anonymous   ftp  
  .
          cpio.gz   liYYMMDD.cpz ( . 2 )
( YY - , MM - , DD -   )
               liYYMMDD.r01,
liYYMMDD.r02  ..

           -  Unix- 
  httpd        perl,  gzip,   glimpse,
   /usr/bin  /usr/local/bin
         glimpse  
http://lib.ru/WEBMASTER/locale.c
      (   KOI8  glimpse   -
      search. )



 1.     usera

   moshkow   UID=555  HOME=/home/moshkow

 2.    HOME 

 cd ~moshkow
 cat li20040123.cgz | gunzip | cpio -idmv
 cat li??????.r?? li??????.r??? | gunzip | cpio -idmv

                    
 ~moshkow/public_html/
      ~moshkow/public_html/book/
  "" (  2004-)  4700 Mb

 3.      ,     cgi-bin , 
   CGI  html-KOI

     :
 koi, win, lat, alt, iso, mac

 html-KOI,  html-windows,  html-volapuk, html-alt, html-mac,
html-iso_8859_5
 koi.cgi, win.cgi, lat.cgi, alt.cgi, iso.cgi, mac.cgi
   .

 cd /usr/local/etc/httpd/cgi-bin   #     ?
 cd /home/httpd/cgi-bin            #     ?

 ln -s /home/moshkow/public_html/bin/html-KOI.pl  koi
 ln -s koi win
 ln -s koi lat
 ln -s koi alt
 ln -s koi iso
 ln -s koi mac

     :      cgi-bin    
,  acces.conf httpd    cgi-  
   FollowSymLinks  :

<Directory /home/httpd/cgi-bin>
Options FollowSymLinks
</Directory>

 4.  :
http://your.host.name/cgi-bin/koi/    ....
   
http://your.host.name/cgi-bin/html-KOI/    ....

    conf/srm.conf   :

ScriptAlias /library/koi /home/moshkow/public_html/bin/koi
ScriptAlias /library/win /home/moshkow/public_html/bin/win
ScriptAlias /library/lat /home/moshkow/public_html/bin/lat
ScriptAlias /library/alt /home/moshkow/public_html/bin/alt
ScriptAlias /library/iso /home/moshkow/public_html/bin/iso
ScriptAlias /library/mac /home/moshkow/public_html/bin/mac

      :

http://your.host.name/library/koi/

 5.      1    ,        
     html-KOI    
    .

 6.  ,     /usr/bin/perl

 7.      -   koi8, 
   cgi- html-KOI  -
    



    :
http://lib.ru/WEBMASTER/libformat.txt



     ,   
 __  glimpse.  ,
    /usr/local/bin/glimpse    
                  ~moshkow/public_html/bin/glimpse
 FreeBSD,Linux,Solaris binaries  glimpse    .
  glimpse  
  http://lib.ru/WEBMASTER/locale.c
  http://kulichki.com/moshkow/WEBMASTER/locale.c
 glimpse - :
  ftp://ftp.cs.arizona.edu/glimpse/glimpse-4.1.src.tar.gz
  http://kulichki.com/moshkow/SOFTWARE/glimpse-4.1.src.tar.gz




                     
-gzip-    TXT-  .       
     guzip-  .   
                 -  CPU
...                What-s-new... 
 ,             100Kb  
    .

 su - moshkow
 cd ~moshkow
 find public_html/book -type f -size +200 \
         -mtime +60 -name "*.txt" -exec gzip {} \; -print


                     Feel free to point to my
                     mistakes in this paragraph.
                             Sorry for my bad english.

 1. Create     user

   moshkow   UID=555  HOME=/home/moshkow

 2. Extract archieve in moshkow's HOME directory

 cd ~moshkow
 cat li??????.r?? li??????.r??? | gunzip | cpio -idmv

 all content of library goes to
 ~moshkow/public_html/
 all e-texts goes to ~moshkow/public_html/book/
 full size of library at (Feb 1998) ~ 500 Mb

 3.  Link cgi-script html-KOI to your sgi-directory

You can name scripts as
 koi, win, lat, alt, iso, mac
Or koi.cgi, win.cgi, lat.cgi, alt.cgi, iso.cgi, mac.cgi
  on your taste

 cd /usr/local/etc/httpd/cgi-bin   # (or where it is?)
 cd /home/httpd/cgi-bin            # (or where it is?)

 ln -s /home/moshkow/public_html/bin/html-KOI  koi
 ln -s koi win
 ln -s koi lat
 ln -s koi alt
 ln -s koi iso
 ln -s koi mac

   Note:  Your cgi-directory should have permition for using
symlink in it so add into acces.conf Option FollowSymLinks  for
cgi-directory some like:

<Directory /home/httpd/cgi-bin>
Options FollowSymLinks
</Directory>

 4. And now - you can use it:
http://your.host.name/cgi-bin/koi/    ....

Also you can insert into conf/srm.conf somethiing like:

ScriptAlias /library/koi /home/moshkow/public_html/bin/koi
ScriptAlias /library/win /home/moshkow/public_html/bin/win
ScriptAlias /library/lat /home/moshkow/public_html/bin/lat
ScriptAlias /library/alt /home/moshkow/public_html/bin/alt
ScriptAlias /library/iso /home/moshkow/public_html/bin/iso
ScriptAlias /library/mac /home/moshkow/public_html/bin/mac

 And now - you can use it with url:

http://your.host.name/library/koi/

 6.  You should have perl (or symlink to real location of perl) at

/usr/bin/perl



     .   
               
.

   httpd.conf:

<Directory /home/moshkow/public_html>
CharsetTurnOff on
CharsetMatchLanguage on
</Directory>

  httpd.conf

<IfModule mod_charset.c>
...
# CharsetDisable directive turns off all charset processing.
<Directory /home/moshkow/public_html/bin>
CharsetDisable on
</Directory>
...
</IfModule>

   /home/moshkow/public_html  .htaccess   
  (? . -doc)



             2004.  
         
.

 Updates      anonymous  ftp   /pub/moshkow/.library/
     cpio.gzip

 apYYYYMMDD.cpz

( YYYY - , MM - , DD -   update)
,     1Mb

 apYYYYMMDD.r??




    -     , 
     5 .  
  .
  apYYYYMMDD.cpz
          YYYYMMDD -   
              
  apLAST.cpz

       :

 1. ftp  apTODAY.cpz  apYYMMDD.cpz
 2.       moshkow
     su moshkow
     cd ~moshkow
     cat apTODAY.cpz | gunzip | cpio -idmv

     
  /home/moshkow/public_html/bin/libraryadmin -getlast
  # ,    , 
  #          
  #  crontab    .



               cgi-,    
      Unix    NT    
.        4       , 
       .
  : http://www.belpsb.minsk.by/moshkow/
  NT,    webmaster@belpsb.minsk.by




                       
  .

     : uudecode - gzip - cpio

       -  1-7   .      
   8  .   sendmail.cf   max 1Mb

                 , 
  UID moshkow . (     -   root !!!)

                .procmailrc
 .forward   /etc/aliases

       sendmail.cf    
   . ,     .

       ,     .



  /usr/locale/sbin/script:
#!/bin/sh
TMP=/tmp/$$
mkdir $TMP
cd $TMP || exit 1

sed -e '/^begin [0-9]/ s%/%_%g' |\
uudecode

cd ~moshkow

if zcat $TMP/* > /dev/null ; then
  if zcat $TMP/* | cpio -it > /dev/null ; then
     zcat $TMP/* | cpio -idmv "public_html/*"
     rm -rf $TMP
     else echo bad archieve
     fi
   else echo bad gzip archieve
   fi | mail -s "mirror.firm.ru report" mirroradmin moshkow@ipsun.ras.ru

Last-modified: Sun, 10 Apr 2005 07:00:52 GMT
: