Microsoft PowerPoint - EP_Installation by sofiaie


									Installation of EPrints software
     and test archive set up
                  Filbert Minj
  National Centre for Science Information
         Indian Institute of Science
           Bangalore – 560 012
 INDEST-NCSI Workshop on Institutional
     IISc, Bangalore, 27-29 July 2004
       Outline of Presentation
• Requirements (H/W, S/W)
• Go through the steps involved in installation
  of Eprints and dependent software
• Demo of Eprints Installation using script
        Requirements - H/W
• For demo purpose
  • Intel Pentium II processor with 64MB RAM
    will give reasonably good performance
• For production system
  • Intel P4 processor
  • 512MB RAM
  • 20Gb of disk space
             Requirements - S/W
•       GNU/Linux ( works
        just fine.
    •     In fact it is the development platform
    •     We have tested it on red Hat Linux 7.2, 8.0,
          9.0 and Fedora Core 1
•       The Apache WWW server
    Requirements - S/W Cont…
•   The Perl programming language,
    ( also included with most
    GNU/Linux distributions.
•   The mod_perl ( module
    for Apache, which significantly increases the
    performance of Perl scripts.
•   The MySQL Database
    (, a free database
    Requirements - S/W Cont…
•    Some additional perl modules
    1.    MIME-Base64-3.01 module
    2.    XML-Parser-2.34 module
    3.    Unicode-String-2.06 module
    4. module
    5.    DBI-1.42 module
    6.    Data-ShowTable-3.3 module
    7.    Msql-Mysql-modules-1.2219
    8.    Parse-RecDescent-1.94
    9.    Tie-IxHash-1.21
    10.   ExtUtils::XSBuilder-0.25
    11.   libapreq2-2.02_02-dev (for Apache 2.0.x) or
          libapreq-1.3 (Apache 1.3.x)
    Requirements - S/W Cont…
•   The EPrints Software
         Requirements - Packages
• GCC (C/C++ Compiler)
   – Select Development Tools while installing Linux
• Perl
   – Select Development Tools while installing Linux
• Lynx – a text based Internet browser
   – Select Text based Internet
• Image Magic
   – Select Graphics
• LaTex
   – Select Authoring and Publishing
Installation Steps Follows…
   Options- Apache Installation
• Apache 1.3.x
  – mod_perl version 1.2x
  – libapreq-1.3
• Apache 2.0.x
  – mod_perl version 1.99.14 (tobe version 2)
  – libapreq2-2.02_02-dev
         Step-1Apache Installation
•   tar -zxvf httpd-2.0.49.tar.gz
•   cd httpd-2.0.49
•   ./configure --prefix=/usr/local/apache2 --enable-so
•   make
•   make install
•   Edit /usr/local/apache2/conf/httpd.conf file, locate
    for a line #ServerName
    Replace with IP address or
    hostname of your machine. Uncomment the line.
      Step-2 Mod_perl (1.99.x)
• tar -zxvf mod_perl-2.0-current.tar.gz
• cd mod_perl-1.99_14
• perl Makefile.PL
• make
• make install
• Add a line with the text below in
  /usr/local/apache2/conf/httpd.conf file
   – LoadModule perl_module modules/
     Step-3 MySQL Installation
• tar -zxvf mysql-standard-4.0.18-pc-linux-
• mv mysql-standard-4.0.18-pc-linux-i686 mysql
• /usr/sbin/groupadd mysql
   – Create mysql group
• /usr/sbin/useradd -g mysql mysql
   – Create mysql user to run MySQL server
• Go to mysql directory
   – (#cd mysql)
• scripts/mysql_install_db
   – Run script to install MySQL database
    Step-3 MySQL Installation
• chown -R mysql.mysql data
  – change the ownership and group of data
    directory to mysql
• chown -R root *
• chgrp -R mysql *
• bin/mysqld_safe --user=mysql &
  – Start MySQL server
    Step-4 MySQL perl module
• tar -zxvf Msql-Mysql-modules-1.2219.tar.gz
• cd Msql-Mysql-modules-1.2219
• perl Makefile.PL --noprompt --nomsql-install --
• cd mysql
• perl Makefile.PL
• make
• make install
  Step-5 libapreq2-2.02_02-dev
• tar -zxvf libapreq2-2.02_02-dev.tar.gz
• cd libapreq2-2.02-dev
• perl Makefile.PL --with-apache2-
• make
• make install
      Step-6 Installing other Perl
•   tar -zxvf modulename-version-no.tar.gz
•   cd modulename-version-no
•   perl Makefile.PL
•   make
•   make install
         Step-7 EPrints software
• /usr/sbin/groupadd eprints
    – Create eprints group
• /usr/sbin/useradd -g eprints -d /opt/eprints2
    – Create eprints user
•   tar -zxvf eprints-2.3.4.tar.gz
•   cd eprints-2.3.4
•   ./configure --with-apache=2 --disable-diskfree
•   ./
 EPrints Archive configuration
• su –l eprints (become eprints user)
• bin/configure_archive
• Inputs to be given:
   – Archive ID:
      • This is unique internal ID in EPrints
      • This could be combination of alphabets and numbers starts
        with alphabets
      • Space char is not allowed
      • e.g. IISc, Indest, Demo, test etc.
   – Hostname: IP No. or hostname of your machine
     (e.g.: or
   – Webserver Port: Enter default
   – Alias: Enter default
    EPrints Archive configuration
• Administrator Email :
• Archive name:
    – Enter Archive name which will be displayed in the
      home page of Eprints Archive (e.g. ePrints@IISc)
•   Database name: Accept default
•   MySQL host: Accept default
•   MySQL Port: Accept default
•   MySQL Socket: Accept default
•   Database user: Enter eprints
•   Database password: Enter eprints
  EPrints Archive configuration
• Create Database: Enter default
• MySQL root password: Enter default (Enter
  password if MySQL password is set)
• Create config files: Enter default
• bin/create_tables <ArchiveID>
• unset LANG
• bin/import_subjects <ArchiveID>
  – Continue (yes/no): Enter yes
• bin/generate_static <ArchiveID>
   EPrints Archive configuration
• bin/generate_apacheconf
• bin/create_user <ArchiveID> <username> <email>
  admin <password>
   – e.g. bin/create_user iisc admin eprints@localhost admin
• bin/generate_views <ArchiveID>
   – Generates browse views
• bin/ indexer start
   – Starting indexer for full text search feature
• In case creation of archive fails then use the
  command below to erase the archive and repeat the
  steps archive configuration
• bin/erase_archive <ArchiveID>
     Editing httpd.conf file and
     starting apache web server
• Open /usr/local/apache2/conf/httpd.conf file
• Replace default user and group with eprints
• Add a line with the text below
  – Include /opt/eprints2/cfg/apache.conf
• /usr/local/apache2/bin/apachectl start
  – Start apache web server
Automatic Execution of required
• When new documents added browse view
  has to generated from eprints account
• crontab –e
• mm(0-59) hh(0-23) dayofmo(1-31)
  monthofyear(1-12) dayofweek(0-6 with
  0=Sunday)       command
• * 1 * * * /opt/eprints2/bin/generate_views
   To operate the subscriptions
         (alert service)
• 0 0 * * * /opt/eprints/bin/subs_daily
• 15 0 * * 0 /opt/eprints/bin/subs_weekly
• 30 0 1 * * /opt/eprints/bin/subs_monthly
    Starting Apache and MySQL at
               boot time
•    cp /usr/local/apache2/bin/apachectl /etc/init.d/
    –   chkconfig --add apachectl
•    cp /usr/local/mysql/support-files/mysql.server
    –   chkconfig --add mysql.server
•    If the above chkconfig does not work
    –   cd /etc/rc3.d OR cd /etc/rc.d/rc3.d
    –   ln –s ../init.d/apachectl S85httpd
    –   ln –s ../init/mysql.server S99mysqld
Installing EPrints using Script
developed at NCSI (by Filbert
       and Ramnishath)
    Requirements for the script
• bash shell required (default shell in Linux)
• APACHE (HTTP Server) should not be
  running (if running please stop it using the
  command (#/etc/init.d/httpd stop)).
• MySQL should not be running. (if running
  please stop it using the command
  (#/etc/init.d/mysqld stop)).
     Requirements for the script
• Around 155 MB hard disk space should be
  available in any directory to copy and to make all
  the dependent software.
   – Note: Dependent software takes 35 MB hard disk
• Around 150 MB hard disk space should be
  available in /usr/local file system to install
   – Note: APACHE will get installed in /usr/local/apache2
     and MySQL will get installed in /usr/local/mysql
     Requirements for the script
• Around 6 MB hard disk space should be
  available in root (/) file system to install
  EPrints software.
   – Note: EPrints software gets installed in
  Installing EPrints using Script
• Run the script (./ or sh
• It will ask many inputs to given
• Takes around 30 minutes in a P-III machine

To top