Koha en Ubuntu - paquetes

From Koha Wiki
Jump to navigation Jump to search


This article is obsolete




Note.jpg

WARNING! This page is obsolete.
This page is no longer correct and exists for historical reasons only.

Introducción

Estas instrucciones se han probado con Ubuntu 12.04 LTS concretamente. Recomendamos una versión LTS, aunque una version mayor que 12.04 debería funcionar.

Las actuales versiones compatibles de Koha incluyen nuevas bibliotecas, que no son fáciles de conseguir en versiones LTS anteriores. Así que por favor, no intente instalar Koha o cualquier cosa antes de Ubuntu 12.04 LTS. Su éxito puede variar, y no será compatible.

No queremos participar en una guerra de redacción, por lo que cada vez que aparezca la palabra "nano", sientase libre para sustituir esta por su editor favorito (vi, emacs, etc.)

Hay tres formas de instalar Koha: paquetes, git y tarball.Estas instrucciones se centran en los paquetes de instalación. El método de instalación de paquetes es el método recomendado. Los Paquetes efectivamente hacen la mayor parte del trabajo difícil. Usted puede leer las Instrucciones de paquetes Debian para obtener información adicional. Si es capaz de ayudar en el desarrollo y mejora de Koha y esto no es para un entorno de producción, considere instalar una versión git. Git es un sistema de control de versiones. Trate de aprender control de versiones con git!

Los paquetes de instalación, la instalación de git y la instalacón del tarball todos tienen diferentes estructuras de directorios. No intente corregir problemas de tar o de git siguiendo estas instrucciones después.


Configuración de la Pre-Instalación

Notación

Las líneas que empiezan con el simbolo # o con el simbolo $ significa que el sufijo es un comando que se debe ejecutar en el shell. Es decir, la parte que sigue despues del prompt del sistema. No escriba o copie el # o $ parte. Por ejemplo:

$ sudo su -
...
# echo "Hola Mundo"

esto quiere decir que ejecute los comandos sudo- y echo "Hola mundo". Las lineas que comienzan con > significa que el sufijo es un comando que se debe ejecutar en un shell de MySQL. Por ejemplo,

> SHOW DATABASES;

esto mostrara las base de datos disponibles en el servidor MySQL.

Koha se publica mensualmente, por lo que mantener la documentación al día es difícil. En lugar de decir: 3.8.1, 3.8.2, 3.8.3, 3.8.4, o cualquier otro número específico, la convención es sustituir el último número con una x. Por ejemplo, la versión actual es parte de la serie 3.8.x y la antigua versión estable es la serie 3.6.x.

Instalar Ubuntu

Descarge e instale Ubuntu desde el sitio oficial.

Para mantener su instalación de Koha mínima y liberar recursos para el funcionamiento de la edición servidor es recomendable, aunque la edición de escritorio funcionará tambien.

Como Apache y MySQL se instalan en las instrucciones posteriores, no hay necesidad de seleccionar cualquier paquete extra durante la instalación de Ubuntu.

Agregar un repositorio de la Comunidad Koha

Si ha instalado Ubuntu, por defecto la versión de escritorio es llamado Unity. Ejecute el puntero del ratón sobre los iconos de la izquierda y encontrara "Dash Home" y la izquierda haga clic en él. Ahora ejecuta el puntero del ratón hasta el icono de lápices, al lado del icono de la casa en la parte inferior en el centro de la pantalla, y la izquierda haga clic en él. En la sección "instalado", a la izquierda haga clic en el enlace de ver resultados. Desplácese hacia abajo hasta que vea "Terminal". Haga doble clic en él. Ahora será capaz de entrar en los comandos en estas instrucciones.

Con la instalación de Ubuntu que hizo, tendrá que ajustar sus repositorios para instalar las bibliotecas Perl, que no pueden existir en los repositorios de Ubuntu por defecto. Así que antes de empezar, vamos a hacer:

$ sudo ls

This prevents the next command from looking like it hung when it is actually waiting for a password. Now, let's get the signing key:

$ wget -O- http://debian.koha-community.org/koha/gpg.asc | sudo apt-key add -

To install the repository for the 3.8 release, which is recommended, use the following command:

$ echo deb http://debian.koha-community.org/koha oldstable main | sudo tee /etc/apt/sources.list.d/koha.list

Hay actualmente tres repositorios activos : oldstable, squeeze, y squeeze-dev. As of 2012-12-10, they represent 3.8.x, 3.10.x, and master respectively. This will change when 3.12.x is released. They will represent 3.10.x, 3.12.x, and master respectively.

It is important to note that when 3.12.0 is released, there will be no repository available for 3.8.x as 3.10.x will be moved to oldstable. Este tipo de cambio se produce aproximadamente cada 6 meses.

If the latest version of Debian is no longer squeeze, please confirm these instructions on the mailing list or IRC channel.

Actualizando Ubuntu

Ahora que ha añadido los repositorios apropiados, asegurese de verificar que Ubuntu esta actualizado al dia. You may be prompted for the password of the user account you are signed in as.

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get clean

Este proceso, particularmente el paso de upgrade, puede tomar algun tiempo.

Metodo de Instalación

En este punto, vamos hacer una instalación por paquetes. It will simplify installation and upgrade steps later. If development and patching will be done, consider using a git installation. Para propositor historicos, For historical purposes, there is a tarball installation method as well.

Esto simplificará la instalación y la actualización de los pasos más adelante. Si se realiza el desarrollo y la aplicación de parches, considere el uso de una instalación de git. Párrafo historicos propositor, con fines históricos, hay un método de instalación del archivo tar también.

Descargar la ultima version de Koha

Do the following command:

$ sudo apt-get install koha-common

The latest version package (3.10.x using squeeze repository) seems to break slightly under Ubuntu. Simply:
sudo rm /etc/apt/sources.list.d/koha.list
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libdigest-jhash-perl libchi-perl libchi-driver-memcached-perl
Then repeat the steps from the Add A Koha Community Repository step again. This should generally not be needed when the installation process is working properly.

Pre-configuración de la Instalación Web

Configuración Inicial

Para configurar su servidor para usar con nombres DNS: Despues de instalar, edite /etc/koha/koha-sites.conf con detalles acerca de su sitio. Usted puede necesitar crear este archivo. Algunos ejemplos de contenidos podrian ser:

DOMAIN=".framisdooby.org"  # Change this to be your domain. Any instance will be a subdomain of this string.
INTRAPORT="80"  # TCP listening port for the administration interface
INTRAPREFIX=""  # For administration interface URL: Prefix to be added to the instance name.
INTRASUFFIX="-intra"  # For administration interface URL: Suffix to be added to the instance name.
DEFAULTSQL=""  # a value is generally not needed.
OPACPORT="80"  # TCP listening port for the users' interface (if you skip this, the apache default of 80 will be used)
OPACPREFIX=""  # For users' interface URL: Prefix to be added to the instance name.
OPACSUFFIX=""  # For users' interface URL: Suffix to be added to the instance name.
ZEBRA_MARC_FORMAT="marc21"  # Specifies format of MARC records to be indexed by Zebra. Possible values are 'marc21', 'normarc' and 'unimarc'
ZEBRA_LANGUAGE="en"  # Primary language for Zebra indexing. Possible values are 'en', 'fr' and 'nb'

Next, you will need to enable the Apache mod_rewrite module:

$ sudo a2enmod rewrite

Creación de una Instancia

Ahora usted necesita crear su primera instancia koha. This instance will need a database. It can be external or local. If you are uncertain, do a local installation.

If you will have a local database install mysql-server:

$ sudo apt-get install mysql-server

Replace "library" with the name of your library. If you want to have library.framisdooby.org, then instancename can probably be "library". Then use the following command to create a local database to create an instance called library:

$ sudo koha-create --create-db library

If you will be using an external database refer to the documentation

Ubuntu MySQL Security Tweak

There is a security risk in Ubuntu's MySQL default set up. Type the following commands:

$ mysql -u root -p
> USE mysql;
> SELECT host,user FROM user;

Under Ubuntu, newer versions of MySQL include anonymous connections. This is a security risk. They are listed with no username. Continue entering MySQL commands.

> DELETE FROM user WHERE user='';
> SELECT host,user FROM user;

The anonymous connections should be removed now. Continue entering MySQL commands.

> FLUSH PRIVILEGES;
> QUIT

The anonymous connections are removed.

Configurando Apache

Configuración por puertos por defecto

A continuación, escriba el siguiente comando:

$ sudo nano /etc/apache2/ports.conf

Asegúrese de que hay una línea sin comentarios como este en el archivo ports.conf (no añadir dos veces!)/u>:

Listen 80 

Si utiliza un conjunto diferente de números de puerto en el INTRAPORT y en el OPACPORT vuelva al paso Initial_Configuration , tendrá que tener un "Listen {INTRAPORT}" y "Listen {OPACPORT}", asegurandose de cambiar {INTRAPORT} y {OPACPORT} a los números de puerto que ha elegido.

Recuerde que usted elijio un prefijo o sufijo para el OPAC y un prefijo o sufijo para la Intranet en un paso anterior. Así es como sabe el puerto 80, que archivos van accesar, ya usa máquinas virtuales con nombres.

Make sure the NameVirtualHost line is uncommented like the following (do not add it twice!):

NameVirtualHost *:80

If you use a different set of port numbers in the INTRAPORT and OPACPORT back in the Initial_Configuration step, you will need to have a "NamedVirtualHost *:{INTRAPORT}" and "NamedVirtualHost *:{OPACPORT}", ensuring to change {INTRAPORT} and {OPACPORT} to the port numbers you chose.

Disable or Edit Default Site

If the default site is not needed:

$ sudo a2dissite 000-default

Now, skip to the next section.

If there is more than just one Koha website on this machine, you may wish to:

$ sudo nano /etc/apache2/sites-enabled/000-default

And change the port number it uses:

<VirtualHost *:4080>

Enable Modules and Site

Now enable the apache modules this config needs, enable koha's configuration, and restart apache. Replace "library" with the name of your library that you used in the "Instance Creation" section when you ran koha-create..

$ sudo a2enmod rewrite
$ sudo a2enmod deflate
$ sudo a2ensite library
$ sudo /etc/init.d/apache2 restart

Determinando una dirección IP

Supuestos

En una casa o en una LAN corporativa, es muy probable que la configuración de red se haya configurado con DHCP. Si usted está siendo alojado externamente sin embargo, el equipo probablemente se le ha dado una dirección IP estática, o puede estar detrás de un proxy inverso. Debido a las muchas posibles configuraciones complejas de redes en cuestión, estas instrucciones intentarán guiarlo en el primer caso más simple. Si usted no puede lograr llegar a la etapa de instalación Web, por favor, consulte a su administrador de sistemas, administrador de la red, o al departamento de Tecnologias de Información. No podemos ayudar a todos con sus configuraciones de red.

Direcciones IP privadas

Los siguientes rangos de IP no estarán disponible a través de Internet:

  • 10.0.0.0 - 10.255.255.255
  • 172.16.0.0 - 172.31.255.255
  • 192.168.0.0 - 192.168.255.255

Also, IP addresses in the range of 169.254.0.0 -169.254.255.255 are reserved for Automatic Private IP Addressing.

Si usted tiene un computador en la misma red (como en su casa o en general en un escenario de una LAN corporativa), puede utilizar un navegador gráfico agradable y la dirección IP se determina para ejecutar los pasos de instalación web, y utilizar Koha después. Si usted tiene un sitio alojado con un nombre de dominio completo, es posible que pueda usar este. De lo contrario, su situación requiere la ayuda de su proveedor de hosting o del administrador de red. En cualquier caso, las instrucciones dadas por escrito funcionaran para configurar Koha.


Determinando Direcciones

Determinar si hay al menos una tarjeta de red en ella. Escriba lo siguiente:

$ sudo ifconfig

Esto debería dar una salida como:

eth0      Link encap:Ethernet  HWaddr 08:00:27:14:22:6c
          inet addr:192.168.69.38  Bcast:192.168.69.255  Mask:255.255.255.0
          inet6 addr: fe80::a00:27ff:fe14:226c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:24087 errors:0 dropped:0 overruns:0 frame:0
          TX packets:29550 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2968198 (2.9 MB)  TX bytes:4828089 (4.8 MB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:11 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3794 (3.7 KB)  TX bytes:3794 (3.7 KB)

In this example, there is "eth0" and "lo". "lo" is not accessible from another machine. "eth0" has an "inet addr" (IP Address) of "192.168.69.38".

If this IP address was not listed in the private IP addresses section above, it may be possible to use it as well. So when the web install steps are reached, instead of installing lynx and using it, Firefox (or any other browser) can be used from another machine by typing "http://" plus the name you have set for the intranet client (staff client) into the address bar. This is an external address. Attempt external addresses before private ones.

This example has a private IP address: "192.168.69.38". So when the web install steps are reached, instead of installing lynx and using it, Firefox (or any other browser) can be used from another machine on the same network by typing "http://library-intra.framisdooby.org/" into the address bar. This is because you will have put the address (eg. 192.168.69.38) and the fully qualified domain name into the /etc/hosts file of that other machine. If there is more than one network card (e.g. eth1, eth2, etc.), attempt the IP Addresses in order until you have success or all fail. A typical failure is some sort of "time out" page. Eventually, you may just have to do a local install using 127.0.0.1, because other machines could not reach it.

Tweak Hosts File

The default configuration for the packages installation is based on fully qualified domain name set up. Since your fully qualified domain name may not be active yet, edit the /etc/hosts file to include it:

$ sudo nano /etc/hosts

Add at the bottom, and the address you determined and what should be the fully qualified domain name. For example:

127.0.0.1		library.framisdooby.org
127.0.0.1		library-intra.framisdooby.org

If you were able to determine an IP address in the previous step, edit the other machine's /etc/hosts file with that IP address instead of 127.0.0.1.

Fully Qualified Domain Name

If you are hosted and you happen to know the fully qualified domain name (e.g. library-intra.frammisdooby.org), you can attempt "http://library-intra.frammisdooby.org:80/". This should not fail, if you have put the correct information into the hosts file.

Instalacion Web

Now you can visit your admininstration website to continue with the Koha web installer.

The user name to log in with will be koha_library and the password will be near the end of /etc/koha/sites/library/koha-conf.xml, where library is the instance name used by the koha-create command in the Instance Creation section. Make sure to replace library with your instance name. You will need to be root to view this You could also use this command:

$ sudo xmlstarlet sel -t -v 'yazgfs/config/pass' /etc/koha/sites/library/koha-conf.xml

to print it out.

Do this by navigating to your staff client page. The INTRAPREFIX, instance name, and INTRASUFFIX you used followed by the DOMAIN, a colon, and the INTRAPORT you gave in the Initial Configuration section make up the url. For example: http://library-intra.framisdooby.org:80

You can do this by installing lynx and going there on your koha machine:

$ sudo apt-get install lynx
$ lynx http://library-intra.framisdooby.org:80

Lynx navigational keys include: tab to go between fields, enter (when not on text fields) to toggle or click, space to change pages (when not on text fields), Q to quit (when not on text fields). Arrows also work.

Paso 1 del Instalador Web

Seleccione idioma

Use en for English.

Click Siguiente

It will check to make sure all dependencies are installed. You will have to install all items listed here, before you can continue.

It should say: All dependencies installed.

Click Siguiente.

Paso 2 del Instalador Web

This shows the Database Settings. All of the entries listed on this page were given to it when you ran the file Makefile.PL.

Click Siguiente

It will check to make sure it can connect to mysql, that the kohadata database exists, and the user koha has all of the required privileges on the database kohadata.

It should say:

Connection established.

Database kohadata exists.

User koha has all required privileges on database kohadata.

Click Siguiente.

Paso 3 del Instalador Web

We are now ready to create the database tables and fill them with some default data.

Click Siguiente.


It should say:

Success

*Database tables created

Click Siguiente.

We are ready to do some basic configuration. Please install basic configuration settings to continue the installation.

Click on the link install basic configuration settings.

Select your MARC flavour.

Select Marc21.

Click Next.

Select Default Settings.

(Select everything, if you are testing.)

You may find it helpful to select all of the optional MARC frameworks.

The one option that would be better to leave unchecked and to setup yourself in Koha is (sample_libraries). It adds about 10 sample libraries to koha. It is easy to enter your Library’s information in Koha and you will need to do that anyway.

Click Importar.

It shows a list of items added and will report any errors here as well.

Click Finalizar.

Felicitaciones , Configuración Completeda.

Your page will be redirected ot the login page after completing installation.

Configuración de su biblioteca en Koha

After the web install, you should be redirected to the staff client login screen.

Login with koha user name y password.

Click on the More dropdown menu.

Select Administration.

Select Libraries, branches and groups under the “Basic Parameters” heading.

Click en New Library and enter your information into the form.

Click Submit.

Su biblioteca esta ahora configurada en Koha.

Terminando la instalación Base

El staff client, o la pagina administrativa, puede ser accedida en:

http://{INTRAPREFIX}{InstanceName}{INTRASUFFIX}{DOMAIN}:{INTRAPORT}

The OPAC, or client page, can be accessed at:

http://{OPACPREFIX}{InstanceName}{OPACSUFFIX}{DOMAIN}:{OPACPORT}

Donde los valores de {DOMAIN}, {INTRAPORT}, {INTRAPREFIX}, {INTRASUFFIX}, {OPACPORT}, {OPACPREFIX}, y {OPACSUFFIX} were defined in the Initial Configuration step, and {InstanceName} was defined in the Instance Creation step, though the example given said library.

Ahora debería tener una instalación de Koha funcional

Instrucciones de Upgrade

Si está ejecutando en otro idioma que no sea Inglés, por favor cambiar a Inglés antes de hacer la actualización, el sistema de plantillas ha cambiado y tendrán que ser regeneradas las plantillas. Una vez que haya actualizado, por favor, regenere sus plantillas en los idiomas elegidos.

$ sudo apt-get update
$ sudo apt-get upgrade

En general, esto debe actualizar el koha-common. Sin embargo, en casos especiales, puede que tenga que:

$ sudo apt-get dist-upgrade

Debido a las dependencias de koha han aumentado.

Koha 3.4.x or later no longer stores items in biblio records. If you are upgrading from a version older than Koha 3.4.x, run the following command which may take a long time (several hours) to complete for large databases: koha-upgrade-to-3.4

It is always safest to run a full reindex after an upgrade, where {instance} is the name of your instance:

$ koha-rebuild-zebra -v -f {instance}

Instrucciones de Desinstalación

El método de instalación de paquete es único en el que ya está previsto un comando de eliminación. Determina qué instancias tiene:

$ koha-list

Y a continuación para cada instancia:

$ sudo koha-remove {instance}

Si encuentra cualquir problema, por favor envie una solicitud de ayuda a la lista de correo o al canal de irc.

Despues de desinstalar todas las instancias, desinstale el paquete koha-common:

$ sudo apt-get remove koha-common