koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha-doc/en/sysadmin/installation Installing_Koha_on_Fed


From: skemotah
Subject: [Koha-cvs] CVS: koha-doc/en/sysadmin/installation Installing_Koha_on_Fedora.xml,NONE,1.1
Date: Sun, 02 Jan 2005 06:12:42 -0800

Update of /cvsroot/koha/koha-doc/en/sysadmin/installation
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14771

Added Files:
        Installing_Koha_on_Fedora.xml 
Log Message:
Load original version

--- NEW FILE ---
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd";>
<article>
  <title>Installing Koha 2.2 on Fedora Core (1, 2, 3)</title>

  <articleinfo>
    <pubdate>2005-01-03</pubdate>

    <author>
      <firstname>Joshua</firstname>

      <surname>Ferraro</surname>
    </author>

    <revhistory>
      <revision>
        <revnumber>2.2.0</revnumber>

        <date>2004-12-23</date>

        <revdescription>
          <para>Changes made by Joshua Ferraro. Original Document</para>
        </revdescription>
      </revision>
    </revhistory>
  </articleinfo>

  <section>
    <title>Using this document</title>

    <section>
      <title id="copyright">Copyright and License</title>

      <para>Copyright 2004, 2005 Joshua Ferraro <email>jmf (at)
      kados.org</email></para>

      <para>This document is related to Koha and is licensed to you under the
      GNU General Public License version 2 or later (<ulink
      
url="http://www.gnu.org/licenses/gpl.html";>http://www.gnu.org/licenses/gpl.html</ulink>).
      Koha-related documents may be reproduced and distributed in whole or in
      part, in any medium physical or electronic, as long as this copyright
      notice is retained on all copies.</para>

      <para>You may create a derivative work and distribute it provided that
      you: <orderedlist>
          <listitem>
            <para>License the derivative work with this same license, or the
            Linux Documentation Project License (<ulink
            
url="http://www.tldp.org/COPYRIGHT.html";>http://www.tldp.org/COPYRIGHT.html</ulink>).
            Include a copyright notice and at least a pointer to the license
            used.</para>
          </listitem>

          <listitem>
            <para>Give due credit to previous authors and major
            contributors.</para>
          </listitem>
        </orderedlist></para>

      <para>Commercial redistribution is allowed and encouraged; however, the
      author would like to be notified of any such distributions.</para>
    </section>

    <section>
      <title id="disclaimer">Disclaimer</title>

      <para>No liability for the contents of this document can be accepted.
      Use the concepts, examples and information at your own risk. There may
      be errors and inaccuracies, that could be damaging to your system.
      Proceed with caution, and although this is highly unlikely, the
      author(s) do not take any responsibility.</para>

      <para>All copyrights are held by their by their respective owners,
      unless specifically noted otherwise. Use of a term in this document
      should not be regarded as affecting the validity of any trademark or
      service mark. Naming of particular products or brands should not be seen
      as endorsements.</para>
    </section>
  </section>

  <section>
    <title>Introduction</title>

    <section>
      <title>Prior Knowledge and Assumptions</title>

      <para>In this document I assume that you are running a standard
      installation of <application>Fedora Core</application> (1, 2, or 3). If
      you need help setting up <application>Fedora Core</application> on your
      machine please see the Fedora installation manual available from <ulink
      url="http://fedora.redhat.com";>http://fedora.redhat.com</ulink>. I would
      highly recommend using the latest release of <application>Fedora
      Core</application> as the shelf-life of these distributions is only
      about 12 months. If you need a longer shelf life for your
      <application>Koha</application> machines I recommend either
      <application>Red Hat Enterprise Linux</application> (AS or ES) or a
      distro like <application>Debian</application> which does not charge for
      a subscription service and has a much longer shelf life. If, like me,
      you expect that you will be upgrading your
      <application>Koha</application> installation every 6 months or so the
      <application>Fedora Core</application> series are a good choice.</para>

      <para>For more information about <application>Fedora Core</application>
      see the release notes for the distro you have chosen:</para>

      <variablelist>
        <varlistentry>
          <term>Core 1:</term>

          <listitem>
            <para><ulink
            
url="http://download.fedora.redhat.com/pub/fedora/linux/core/1/i386/os/RELEASE-NOTES-en.html";>http://download.fedora.redhat.com/pub/fedora/linux/core/1/i386/os/RELEASE-NOTES-en.html</ulink></para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>Core 2:</term>

          <listitem>
            <para><ulink
            
url="http://download.fedora.redhat.com/pub/fedora/linux/core/2/i386/os/RELEASE-NOTES-en.html";>http://download.fedora.redhat.com/pub/fedora/linux/core/2/i386/os/RELEASE-NOTES-en.html</ulink></para>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>Core 3:</term>

          <listitem>
            <para><ulink
            
url="http://download.fedora.redhat.com/pub/fedora/linux/core/3/i386/os/RELEASE-NOTES-en.html";>http://download.fedora.redhat.com/pub/fedora/linux/core/3/i386/os/RELEASE-NOTES-en.htm</ulink>l</para>
          </listitem>
        </varlistentry>
      </variablelist>

      <para>If you already have some knowledge about
      <application>Linux</application> or other Unices it will be easier to
      understand this manual, however, no intermediate steps are necessary
      subsequent to the installation of <application>Fedora Core</application>
      before beginning the <application>Koha</application> installation. This
      guide is a "cookbook" for installing dependencies for
      <application>Koha</application> on <application>Fedora
      Core</application>.</para>
    </section>

    <section>
      <title>Internet Connection</title>

      <para>This guide assumes that the <application>Koha</application> server
      has a dedicated Internet connection -- a high-speed connection is best.
      It is possible to install <application>Koha</application> without a
      dedicated Internet connection, but this guide does not go into how to do
      that.</para>
    </section>

    <section>
      <title>Package Group Selections</title>

      <para>During a CD installation of <application>Fedora Core</application>
      you have the option of selecting "Package Groups" for installation --
      you can also access this utility after installation.<tip>
          <para>It can be found from the "hat" menu under <userinput>System
          Settings --&gt; Add/Remove Applications</userinput></para>
        </tip></para>

      <para>You'll want to install the following package groups:</para>

      <itemizedlist>
        <listitem>
          <para>Web Server</para>
        </listitem>

        <listitem>
          <para>MySQL Database<note>
              <para>Careful, Core 1 and 2 hide this option ... use the
              <userinput>Details</userinput> button to select
              <application>MySQL</application> and de-select
              <application>PostgreSQL</application></para>
            </note></para>
        </listitem>

        <listitem>
          <para>Development Tools</para>
        </listitem>

        <listitem>
          <para>Administration Tools (optional but a good idea)</para>
        </listitem>

        <listitem>
          <para>System Tools (optional but a good idea)</para>
        </listitem>
      </itemizedlist>

      <para>I don't generally recommend installing "Everything". Mainly this
      is because the more applications you have installed and running on your
      system the more complex the maintenance becomes. Running unused
      applications may also open up your system to attacks that would
      otherwise not be an issue.</para>
    </section>

    <section>
      <title>Firewall Configuration</title>

      <para>I would highly recommend utilizing the default firewall features
      that come with <application>Fedora Core</application>. However, you'll
      want to allow access to <command>http/https</command> (port 80 and 8080)
      as well as <command>ssh</command> (port 22). You can configure the
      firewall during the initial install or subsequently using the "Security
      Level" utility in the "hat" menu.</para>
    </section>

    <section>
      <title>A Note On The Graphical User Interface (GUI)</title>

      <para><application>Fedora Core</application> will always default to
      installing and loading your GUI (by default this is
      <application>X.org</application> and <application>Gnome</application>).
      In the past I have always disabled installation of the GUI on a
      production server, but lately I've taken to installing it and then
      tweaking the startup procedures so that the GUI does not load by default
      but must be started manually (so during normal operations the GUI does
      not waste precious resources). This is mainly because I find some of the
      GUI tools to be quite useful when I'm physically on-location and working
      on a server. To disable the GUI subsequent to installation simply edit
      <filename>/etc/inittab</filename> and make the default runlevel 3
      instead of 5. To start the GUI afterwards type
      <userinput>startx</userinput> at the command prompt.</para>

      <para>If the machine on which you will install
      <application>Koha</application> is nearby you can log in locally to
      perform the <application>Koha</application> install. But most folks find
      it more convenient to log in remotely using an <command>SSH</command> or
      a <command>Telnet</command> client. If you are running
      <application>Windows</application> you can start
      <command>Telnet</command> by clicking
      <userinput>Start-&gt;Run</userinput> from the start menu and typing
      <userinput>telnet</userinput>. Or you can download the free
      <command>SSH</command> program <command>PuTTy</command> from <ulink
      
url="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html";>http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html</ulink>.
      <command>SSH</command> is a more secure and robust terminal emulator
      standard and is a better choice.</para>

      <para>For many of the commands it will be necessary to have superuser
      privileges on the <application>Koha</application> server. However, it's
      generally not a good idea to log into your server directly as the root
      user. It's better to use the <command>su</command> utility to allow your
      regular user to obtain superuser privileges. For 
example,<literallayout>address@hidden:~$ su
password:
koha:/home/jmf#</literallayout>The <prompt>#</prompt> tells you that you have
      root privileges. If you want to return to your regular user type
      <userinput>exit</userinput>.</para>
    </section>

    <section>
      <title>Update Your System</title>

      <para><application>Fedora Core</application> has a rapid development
      pace. There are usually daily updates or bugfixes to applications in the
      system. Be sure your installation is up-to-date. You can install updates
      either using the <command>up2date</command> application (or it's GUI
      equivalent) or by using the new tool <command>yum</command>. To install
      updates using <command>yum</command> type:<literallayout>address@hidden 
yum update</literallayout></para>

      <para>You can also use <command>yum</command> to install programs that
      have been packaged for <application>Fedora Core</application>. See the
      <command>yum</command> <command>man</command> page for more
      information.</para>
    </section>
  </section>

  <section>
    <title>Dependencies</title>

    <para><application>Koha</application> is built with a number of related
    open source web-based technologies which are sometimes designated with the
    acronym L.A.M.P. L.A.M.P. refers to <application>Linux</application> (the
    GNU/Linux operating system), <application>Apache</application> (a robust
    web server application), <application>MySQL</application> (a Relational
    Database Management System using the SQL standard) and Perl/Python/PHP
    (three common scripting languages). <application>Koha</application> was
    originally designed for a GNU/Linux system running
    <application>Apache</application> and <application>MySQL</application> and
    is written almost entirely in <application>Perl</application>. In order to
    install and use <application>Koha</application> it is necessary first to
    install and configure these dependencies.</para>

    <section>
      <title>Perl</title>

      <para>The majority of <application>Koha</application> is written in
      <application>Perl</application> -- a high-level programming or scripting
      language. <application>Perl</application>'s functionality and usefulness
      has been extended and enhanced through the development and free
      distribution of modules (programming libraries) within the
      <application>Perl</application> community. The vast majority of these
      modules are available through the Perl Network
      <emphasis>CPAN</emphasis>. Others are available for download from the
      module developer's website or <command>ftp</command> server. Some of
      these modules have also been packaged directly into <application>Fedora
      Core</application>'s packaging system.</para>

      <para><application>Koha</application> relies on several of these
      extended module libraries for its functions and getting all of these
      modules set up can be the most challenging part of the
      <application>Koha</application> installation.
      <application>Perl</application> itself is installed by default on a
      <application>Fedora Core</application> system so you needn't install it.
      The extended <application>Perl</application> modules that are not
      available via <application>Fedora Core</application>'s packaging system
      are available on the Perl Network <command>CPAN</command>.
      <application>Perl</application> has a utility that can be run to
      automatically install modules from <command>CPAN</command> and it's
      pretty good about keeping track of dependencies within
      <application>Perl</application> itself, but it cannot handle
      dependencies outside the <application>Perl</application> base. So before
      we can install these modules we need to install their dependencies which
      are outside of <application>Perl</application>.</para>

      <section>
        <title>Configuring Perl's CPAN utility while installing
        MARC::Record</title>

        <para>The first time you use <application>Perl</application>'s
        <command>CPAN</command> utility it will configure itself. So we can
        start that process by telling <application>Perl</application> to
        install the <filename>MARC::Record</filename> module from the
        <command>CPAN</command> network:<literallayout>koha:/# perl -MCPAN -e 
'install "MARC::Record"'</literallayout>You
        should get the following 
message:<literallayout>/usr/share/perl/5.6.1/CPAN/Config.pm initialized.

CPAN is the world-wide archive of perl resources. It 
consists of about 100 sites that all replicate the same
contents all around the globe.  Many countries have at
least one CPAN site already. The resources found on CPAN
are easily accessible with the CPAN.pm module. If you want
to use CPAN.pm, you have to configure it properly.

If you do not want to enter a dialog now, you can answer
'no' to this question and I'll try to autoconfigure. (Note:
you can revisit this dialog anytime later by typing 'o conf
init' at the cpan prompt.)

Are you ready for manual configuration? [yes]</literallayout></para>

        <para>The setup process will take a while. It should be safe to answer
        all the questions with the default answers. You can safely ignore the
        utilities' attempts to get you to upgrade or install other
        <application>Perl</application> modules but you should allow it to
        prepend prerequisites. You can also set it to automatically build
        <application>Perl</application> prerequisites without asking by typing
        <userinput>follow</userinput> at the following 
prompt:<literallayout>The CPAN module can detect when a module that which you 
are
trying to build depends on prerequisites. If this happens,
it can build the prerequisites for you automatically
('follow'), ask you for confirmation ('ask'), or just
ignore them ('ignore'). Please set your policy to one of
the three values.

Policy on building prerequisites (follow, ask or ignore)? 
[ask]</literallayout>Eventually you may get the following
        message:<literallayout>Now we need to know where your favorite CPAN 
sites are located. Push
a few sites onto the array (just in case the first on the array won't
work). If you are mirroring CPAN to your local workstation, specify a
file: URL.

First, pick a nearby continent and country (you can pick several of
each, separated by spaces, or none if you just want to keep your
existing selections). Then, you will be presented with a list of URLs
of CPAN mirrors in the countries you selected, along with previously
selected URLs. Select some of those URLs, or just keep the old list.
Finally, you will be prompted for any extra URLs -- file:, ftp:, or
http: -- that host a CPAN mirror.

(1) Africa
(2) Asia
(3) Central America
(4) Europe
(5) North America
(6) Oceania
(7) South America
Select your continent (or several nearby continents) []</literallayout>Proceed
        by selecting the numeric value for your location. You may be prompted
        for a more specific location and finally you will be able to select
        several URLs for <command>CPAN</command> to use to download your
        modules from. It's a good idea to select a few just in case some of
        them are not operational or are slow.</para>
      </section>

      <section>
        <title>The Yaz Toolkit</title>

        <para>As long as everything went smoothly with the
        <command>CPAN</command> installation, <application>Perl</application>
        should finish the install and return you to the command prompt. We're
        almost ready to install the remaining <application>Perl</application>
        modules but one of them, namely <filename>Net::Z3950</filename>, has a
        non-Perl dependency that we need to install first called
        <application>Yaz</application>.</para>

        <para>As of this writing Indexdata, who wrote and maintains the
        <application>Yaz</application> toolkit has made packages available for
        <application>Fedora Core</application> 2 and 3. These can be
        downloaded from their <command>ftp</command> site: <ulink
        
url="http://ftp.indexdata.dk/pub/yaz/redhat/";>http://ftp.indexdata.dk/pub/yaz/redhat/</ulink>.
        You'll need the <filename>yaz</filename>, <filename>libyaz</filename>
        and <filename>libyaz-devel</filename> packages (the latest version
        should be fine and if you don't find a package for your specific
        version of <application>Fedora Core</application> a previous version
        should work). Navigate to a convenient spot and 
type:<literallayout>address@hidden wget 
http://ftp.indexdata.dk/pub/yaz/redhat/fc2/libyaz-2.0.28-1.i386.rpm
address@hidden wget 
http://ftp.indexdata.dk/pub/yaz/redhat/fc2/yaz-2.0.28-1.i386.rpm
address@hidden wget 
http://ftp.indexdata.dk/pub/yaz/redhat/fc2/libyaz-devel-2.0.28-1.i386.rpm</literallayout></para>

        <para>Now you should have three rpms that can be installed with the
        <command>rpm</command> utility thusly:<literallayout>address@hidden rpm 
-i yaz*
address@hidden rpm -i libyaz*</literallayout>(the * is a wildcard).</para>
      </section>

      <section>
        <title>Installing the Remaining Perl Modules</title>

        <para>At this point we can install the other
        <application>Perl</application> modules:<literallayout>address@hidden 
perl -MCPAN -e 'install Event'
address@hidden perl -MCPAN -e 'install Net::Z3950'
address@hidden perl -MCPAN -e 'install Digest::MD5'
address@hidden perl -MCPAN -e 'install "HTML::Template"'
address@hidden perl -MCPAN -e 'install "Mail::Sendmail"'
address@hidden perl -MCPAN -e 'install "PDF::API2"'</literallayout></para>

        <para>That should take care of the <application>Perl</application>
        installation and configuration as well as all the modules. If we left
        any <application>Perl</application> modules out
        <application>Koha</application> will warn us when we run the install
        script and will give instructions on how to install them.</para>
      </section>
    </section>

    <section>
      <title>MySQL</title>

      <para>For a database <application>Koha</application> uses
      <application>MySQL</application> — a free SQL-query-based Relational
      Database Management System. The installation and basic configuration of
      <application>MySQL</application> on a Debian system is quite simple.
      More advanced topics such as database optimization and
      <application>MySQL</application> administration are documented online at
      <ulink
      
url="http://www.mysql.com/doc/en/index.html";>http://www.mysql.com/doc/en/index.html</ulink>.
      It would be well worth your while to familiarize yourself with the basic
      functionality and behaviour that you can expect from
      <application>MySQL</application>. Chapter 5, <citetitle>Database
      Administration</citetitle>, is especially relevant for using
      <application>Koha</application>.</para>

      <para>To install the <application>MySQL</application> server on your
      <application>Fedora Core</application> machine 
type:<literallayout>address@hidden yum install mysql-server</literallayout>After
      installing <application>MySQL</application> you will need to start it by
      typing:<literallayout>address@hidden /etc/init.d/mysqld 
start</literallayout></para>

      <para>Note that If <application>MySQL</application> fails to start you
      may need to adjust selinux. To do that type the
      following:<literallayout>address@hidden ~]# setenforce 0
address@hidden ~]# mysql_install_db
Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
Installing all prepared tables
041201 17:07:25  /usr/libexec/mysqld: Shutdown Complete

To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
This is done with:
/usr/bin/mysqladmin -u root  password 'new-password'
/usr/bin/mysqladmin -u root -h koha.athenscounty.lib.oh.us  password 
'new-password'
See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr ; /usr/bin/safe_mysqld &amp;

You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; run-all-tests

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com

address@hidden ~]# setenforce 1</literallayout>Then start up
      <application>MySQL</application> again and you should be good to
      go.</para>

      <para>It's a good idea to set the <application>MySQL</application>
      administrator password right away. You will need to have this password
      handy later in the installation so make sure you write it down. You can
      set the password from the command line 
thusly:<literallayout>address@hidden mysqladmin password [type your new 
password here]</literallayout>but
      leave out the brackets.</para>
    </section>

    <section>
      <title>Apache</title>

      <para>According to the <application>Apache</application> website,
      <application>Apache</application> has been the most popular web server
      on the Internet since April of 1996. Additionally, the October 2003
      <citetitle>Netcraft Web Server Survey</citetitle> found that over 64% of
      websites on the Internet use <application>Apache</application>, making
      it more popular than all other web servers combined. You can see the
      survey at <ulink
      url="http://news.netcraft.com/";>http://news.netcraft.com/</ulink>.
      Additionally, you can find out more about the Apache Software Foundation
      on their website at <ulink
      url="http://www.apache.org/";>http://www.apache.org/</ulink>.</para>

      <para>We will have to configure <application>Apache</application> for
      <application>Koha</application> later on in the install, but for now you
      should know that <application>Apache</application>'s configuration files
      are kept in <filename>/etc/httpd/conf/httpd.conf</filename> and
      <application>Apache</application>'s log files are in
      <filename>/var/log/httpd</filename>.</para>
    </section>

    <section>
      <title>Conclusion</title>

      <para>Well, that's it, we've installed all the dependencies for
      <application>Koha</application> on <application>Fedora
      Core</application>. Now you are ready to download
      <application>Koha</application> from <ulink
      url="http://www.koha.org";>http://www.koha.org</ulink> and install it
      following the directions in the <filename>INSTALL</filename>
      file.</para>
    </section>
  </section>
</article>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]