Conflicts: packagekit:i386

There is a problem when I tried to upgrade my Ubuntu Server xenial. Problem Detail –

The following packages have unmet dependencies:
 libcjs0e : Conflicts: libcjs0 but 3.0.1-3build2 is to be installed
 python3-aptdaemon.pkcompat : Conflicts: packagekit
                              Conflicts: packagekit:i386

Just Remove the packages that not needed

apt purge python3-aptdaemon.pkcompat

And Run

apt update

And then

apt upgrade

Hope the problem has Solved!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

 

DSpace Database Backup & Restore

  1. Stop tomcat server: /etc/init.d/tomcat6 stop AND restart postgresql server
  2. Lonin in postgress database server and take backup dspace database-

Pg_dump –E UNICODE dspace>/home/dspace/dspace.sql

 

  1. Copy dspace assetstore directory in your desired place

Cp /home/dspace/assetstore/* /desiredLocation/

  1. Compress assetstore

tar cf- assetstore | gzip –c >assetstore.tgz

  1. Copy database file and assetstore to your computer

Scp /home/dspace/dspace.sql root@remotemachine:/root/desiredLocation/dspace.sql

Scp /home/dspace/assetstore.tgz root@remotemachine:/root/desiredLocation/

Setup Correct SAX Parser for Koha

To check SAX Parser for koha installation, run the following command

root@koha:/home/koha/koha-18.05.02# ./misc/sax_parser_print.pl
Koha wants something like:
XML::LibXML::SAX::Parser=HASH(0x81fe220)
You have:
XML::SAX::Expat=HASH(0xb028b0)
Looks bad, check the Koha wiki documentation at https://wiki.koha-community.org.

Now you have to find your SAX Parser file to set up the correct configuration 

root@koha:/home/koha/koha-18.05.02# find / -name “ParserDetails.ini”
/etc/perl/XML/SAX/ParserDetails.ini
/usr/share/perl5/XML/SAX/ParserDetails.ini

Then open the files to make change 

root@koha:/home/koha/koha-18.05.02# nano /etc/perl/XML/SAX/ParserDetails.ini

[XML::SAX::PurePerl]
http://xml.org/sax/features/namespaces = 1
[XML::LibXML::SAX]
http://xml.org/sax/features/namespaces = 1

[XML::LibXML::SAX::Parser]
http://xml.org/sax/features/namespaces = 1
[XML::SAX::Expat]
http://xml.org/sax/features/namespaces = 1

Move the Highlighted block at the end of the file

It looks like the following 

[XML::SAX::PurePerl]
http://xml.org/sax/features/namespaces = 1
[XML::LibXML::SAX]
http://xml.org/sax/features/namespaces = 1
[XML::SAX::Expat]
http://xml.org/sax/features/namespaces = 1
[XML::LibXML::SAX::Parser]
http://xml.org/sax/features/namespaces = 1

Then run the test again 

root@koha:/home/koha/koha-18.05.02# ./misc/sax_parser_print.pl
Koha wants something like:
XML::LibXML::SAX::Parser=HASH(0x81fe220)
You have:
XML::LibXML::SAX::Parser=HASH(0x1e1f8c8)
Looks good.

Solve!

Perl locale problem in Ubuntu

At the time of perl installation I faced the following problem

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_TIME = “bn_BD”,
LC_MONETARY = “bn_BD”,
LC_ADDRESS = “bn_BD”,
LC_TELEPHONE = “bn_BD”,
LC_NAME = “bn_BD”,
LC_MEASUREMENT = “bn_BD”,
LC_IDENTIFICATION = “bn_BD”,
LC_NUMERIC = “bn_BD”,
LC_PAPER = “bn_BD”,
LANG = “en_US.UTF-8”
are supported and installed on your system.
perl: warning: Falling back to a fallback locale (“en_US.UTF-8”).
locale: Cannot set LC_ALL to default locale: No such file or directory

I just exported LC_ALL from command line

root@library:/home/koha/koha-18.05.02# export LC_ALL=”en_US.UTF-8″

Check your locale

root@library:/home/koha/koha-18.05.02# locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE=”en_US.UTF-8″
LC_NUMERIC=”en_US.UTF-8″
LC_TIME=”en_US.UTF-8″
LC_COLLATE=”en_US.UTF-8″
LC_MONETARY=”en_US.UTF-8″
LC_MESSAGES=”en_US.UTF-8″
LC_PAPER=”en_US.UTF-8″
LC_NAME=”en_US.UTF-8″
LC_ADDRESS=”en_US.UTF-8″
LC_TELEPHONE=”en_US.UTF-8″
LC_MEASUREMENT=”en_US.UTF-8″
LC_IDENTIFICATION=”en_US.UTF-8″
LC_ALL=en_US.UTF-8

And try the following commands for permanent solutions

echo "LC_ALL=en_US.UTF-8" >> /etc/environment
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
locale-gen en_US.UTF-8

Now check your locale 

root@library:/home/koha/koha-18.05.02# locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE=”en_US.UTF-8″
LC_NUMERIC=”en_US.UTF-8″
LC_TIME=”en_US.UTF-8″
LC_COLLATE=”en_US.UTF-8″
LC_MONETARY=”en_US.UTF-8″
LC_MESSAGES=”en_US.UTF-8″
LC_PAPER=”en_US.UTF-8″
LC_NAME=”en_US.UTF-8″
LC_ADDRESS=”en_US.UTF-8″
LC_TELEPHONE=”en_US.UTF-8″
LC_MEASUREMENT=”en_US.UTF-8″
LC_IDENTIFICATION=”en_US.UTF-8″
LC_ALL=en_US.UTF-8

SOLVE!!!!!

 

DSpace Backup

Stop tomcat server:

/etc/init.d/tomcat6  AND restart postgresql server

Lonin in postgress database server and take backup dspace database-

Pg_dump –E UNICODE dspace>/home/dspace/dspace.sql

Copy dspace assetstore directory in your desired place

Cp /home/dspace/assetstore/* /desiredLocation/

Compress assetstore

tar cf- assetstore | gzip –c >assetstore.tgz

Copy database file and assetstore to your computer

Scp /home/dspace/dspace.sql root@remotemachine:/root/yourlocation/dspace.sql

Scp /home/dspace/assetstore.tgz root@remotemachine:/root/yourLocation/

Tomcat Manually install in Debian and Ubuntu (Without apt-get method)

First download apache tomcat

wget http://www-eu.apache.org/dist/tomcat/tomcat-7/v7.0.76/bin/apache-tomcat-7.0.76.tar.gz

Decompress the downloaded apache tomcat:

tar zxvf apache-tomcat-7.0.76.tar.gz

Now move the decompressed file in the following location:

mv apache-tomcat-7.0.76 /opt/tomcat

Install java

apt-get install default-jdk

Set the environment variables in .bashrc:

nano ~/.bashrc

Add the following lines to the end of the file:

export JAVA_HOME=/usr/lib/jvm/default-java
export CATALINA_HOME=/opt/tomcat

Simply save and exit .bashrc, then make the changes effective by running the following command:

. ~/.bashrc

To start Tomcat, run the following script:

$CATALINA_HOME/bin/startup.sh

You should get a result similar to:

Using CATALINA_BASE: /opt/tomcat
Using CATALINA_HOME: /opt/tomcat
Using CATALINA_TMPDIR: /opt/tomcat/temp
Using JRE_HOME: /usr/lib/jvm/default-java
Using CLASSPATH: /opt/tomcat/bin/bootstrap.jar:/opt/tomcat/bin/tomcat-juli.jar
Tomcat started.

Test through the web browser by the address:

http://locahots:8080

Koha installation process (as per BALID Koha training 3-7 September 2013)

Assume that you have two Debian user, one is default root, another is koha (which you have created during Debian installation process). Beside, both root and koha user password is same, for example 123. Moreover, you have set your host as localhost, you have no proxy behind net and you have Debian Koha dependency packages in your DVD. Then relax and be seated easily for going with the following-
To run all the command directly from the root, log in through root terminal directly by using root password (you may log in through normal terminal as super user for root by this command
koha@localhost:~$ su
Password:*** (Enter root password. e.g. 123)
Now it is time to update your existing software and packages. So you need to edit your Debian source list. The name of the file is sources.list and the path is /etc/apt/sources.list, which contains the description of source. So, open the file with a text processor by e.g. nano. To save the changes you’ve made, press Ctrl+O. To exit nano, type Ctrl+X.
root@localhost:~# nano /etc/apt/sources.list
After entering the command, you will find few lines of sources list. Use # in front of lines (which are uncommented) to make it comment. Your next task is to add the following lines at the end of previous commented lines.

deb http://security.debian.org/ squeeze/updates main contrib
deb-src http://security.debian.org/ squeeze/updates main contrib non- free
deb http://http.us.debian.org/debian/ squeeze contrib non-free main
deb-src http://http.us.debian.org/debian/ squeeze contrib non-free main
deb http://debian.koha-community.org/koha squeeze main
Add the key in gpg.asc to your APT trusted keys:
wget -O- http://debian.koha-community.org/koha/gpg.asc | sudo apt-key add –
Press Yes when prompted.
Now update and upgrade the system and have a nap! You may sometimes be asked to enter Y to confirm or allow.
root@localhost:~# apt-get update
root@localhost:~# apt-get upgrade
Hmmm, how long it takes? Now install MySQL
root@localhost:~# apt-get install mysql-server
Enter root password when prompted. Use the same password e.g.123
(If you found problem executing apt-get install command you may try aptitude install)
Enter or change directory which contains Debian Koha dependencies. In your case the path may be as follows
root@localhost:~# cd /media/cdrom/KohaDebPackages/
root@localhost:/media/cdrom/KohaDebPackages#

Use dpkg command, as it is a tool for installing an already available Debian package (because it does not download anything). To do this, we use its -i option.
root@localhost:/media/cdrom/KohaDebPackages# dpkg -i *.deb
How it makes the life so easier!
If any error occurred use the following command
root@localhost:~# apt-get –f install
Okay, now create Koha environment as follows
root@localhost:~# nano /etc/profile
You will find some programming statements after running above command, starts with if and ends with fi, this is a system-wide .profile file for the BASH. Now add the following two lines at the end of the lines of profile. These two lines are for exporting environment variable for Perl and Koha configuration.
export PERL5LIB=/usr/share/koha/lib
export KOHA_CONF=/etc/koha/koha-conf.xml
By default web server apache has 80 port, you will use it for OPAC. You need to add another port 8080 for your staff client interface. So now open the ports.conf file and add the 8080 port under the ‘Listen 80’ line
root@localhost:~# nano /etc/apache2/ports.conf
Listen 8080
Have you Koha source eg. koha-3.12.04.tar.gz or koha-latest-tar.gz file in your DVD? If yes then copy the file in your Koha directory or folder.. Now change your directory to Koha under Home as follows.
root@localhost:~# cd /home/koha
root@localhost:/home/koha#
Now ex tract Koha source file in the koha folder using following command.
root@localhost:/home/koha# tar -zxvf koha-3.12.04.tar.gz
Change directory to koha-3.12.04
root@localhost:/home/koha# cd koha-3.12.04
root@localhost:/home/koha/koha-3.12.04#
Now check which Perl dependency is missing
root@localhost:/home/koha/koha-3.12.04#./koha_perl_deps.pl -m –u
You will get a list which will show the number of missing module along with module name, version installed and required and whether the module is required or not. If you found ‘Yes’ under ‘Module is required’ column, than install it through CPAN, otherwise ignore those if you do not have enough time. But it is advisable to install all which are missing. During cpan configuration after giving the following command, make it automatically.
root@localhost:/home/koha/koha-3.12.04# cpan

cpan1> install MooseX::Storage
cpan2> install Data::Paginator
cpan3> install Test::WWW::Mechanize
cpan4> quit
Above modules are for example. Now you will have to create Koha database . Can you remember your MySQL root password? Yes, 123. Now run the following command.
root@localhost:# mysql -u root -p
Enter mysql root password:***
root@localhost:# create database koha;
exit
Perl programs such as Koha or the various Perl modules it uses can be installed using a series of commands:
perl Makefile.PL: This command checks for prerequisites and creates a configuration file needed by make make: This compiles the software and creates executables
make test: It runs test cases to ensure proper installation, flags errors, and warnings in case of problems make Install: This installs the executable files into proper directories in the server. Now first execute the following command
root@localhost:/home/koha/koha-3.12.04# perl Makefile.PL
After executing the command you have to go through a configuration by answering few questions. Press enter for default values other than the following Statements:

Please specify the user that owns the database to be used by Koha [katikoan] root
Please specify password of the user that owns the database to be used by koha [katikoan] 123
.
.
Execute the following commands next
root@localhost:/home/koha/koha-3.12.04# make
root@localhost:/home/koha/koha-3.12.04# make test
root@localhost:/home/koha/koha-3.12.04# make install
Koha’s files have now been installed. In order to use Koha’s command-line batch jobs, you should set the following environment variables:
root@localhost:/home/koha# export KOHA_CONF=/etc/koha/koha-conf.xml
root@localhost:/home/koha# export PERL5LIB=/usr/share/koha/lib
Now make Apache charset Unicode compliant.
root@localhost:/home/koha# nano /etc/apache2/conf.d/charset
#AddDefaultCharset UTF-8
AddCharset UTF-8 .utf8
AddDefaultCharset UTF-8
Now we create a symbolic link in Apache2 from koha. A symbolic link is just a pointer to the actual Koha file.

root@localhost:/home/koha# ln -s /etc/koha/koha-httpd.conf /etc/apache2/sites- available/koha
Koha uses Apache2’s Rewrite module to manipulate URLs. To allow this we need to enable the module using the a2enmod command
root@localhost:/home/koha# a2enmod rewrite
Enabling Koha’s virtual hosts we need to run a2ensite command
root@localhost:/home/koha# a2ensite koha
Finally we restart Apache2 to load the new configuration changes
root@localhost:/home/koha# /etc/ini.d/apache2 restart
Koha’s Zebra daemon script can be set up as a service and configured in the system start-up profile. This way we ensure that zebrasrv starts automatically when the machine reboots. To set up the script as a service we create a symbolic link to it from the /etc/init.d/ folder
root@localhost:/home/koha# ln -s /usr/share/koha/bin/koha-zebra-ctl.sh
/etc/init.d/koha-zebra-daemon
To setup this service in the start-up profile, we use the update-rc.d command
root@localhost:/home/koha# update-rc.d koha-zebra-daemon defaults
Now start koha web installation by pointing the admin page
http://localhost:8080 or http://127.0.1.1:8080 or http://127.0.0.1:8080

You can check what your IP Address is by typing ifconfig in the command line. To use koha from your LAN, do the following
root@localhost:/home/koha# nano /etc/koha/koha-httpd.conf
#OPAC Setup
Example Before:
<VirtualHost 127.0.0.1:80>
Example After:
<VirtualHost 127.0.0.1:80 123.123.123.123:80>
#Intranet Setup / Koha Admin Setup
Example Before:
<VirtualHost 127.0.0.1:8080>
Example After:
<VirtualHost 127.0.0.1:8080 123.123.123.123:8080>
Finally we restart Apache2 to load the new configuration changes
root@localhost:/home/koha# /etc/ini.d/apache2 restart
Next follow the rest of the part of Koha installation manual provided in the training programme.