DSpace Manual for BALID Trainee

2 Comments

Training on DSpace Institutional Repository Organized by BALID Institute of Information Management (BIIM)

1-2 May 2014

Venue: CIRDAP

 

DSpace Installation on Debian

 Add root password and create dspace as a user and enter password for dspace at the time of Debian installation. While installing Debian, select Desktop Environment, SQL database, SSH server & Standard System options.

 First create a dspace user in debian for Dspace, if you did not add at the time of Debian installation.

root@dir:~#adduser dspace

Add source list

root@localhost:~#nano /etc/apt/sources.list

Comment or erase all and add the followings:

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

 

Upgrade the Software.

root@localhost:~#sudo apt-get update

root@localhost:~#sudo apt-get dist-upgrade

Then install other softwares as prerequisites for Dspace installation. It is a good approach to install sun-java6-jdk.

root@dir:~# apt-get install sun-java6-jdk

root@dir:~# apt-get install tomcat6

root@dir:~#apt-get install maven2

root@dir:~#apt-get install postgresql-8.4

 

(In training we are skipping the above four packages installation. We are going to install the above five packages with one command from CD.  In Training kits, we provide a CD which has all pre-requisites of Dspace installation in .deb file extension. You can install all .deb packages with one command. )

First in enter in the directory which contain .deb files

 root@localhost:~#cd /media/cdrom/ dspacepackages/

root@localhost:/media/cdrom/dspacepackages# dpkg -i *.deb

 

After installing prerequisite softwares, create dspace database in postgresql for Dspace.

 

root@dir:~# cd /home/dspace/

root@dir:/home/dspace# su postgres

postgres@dir:/home/dspace$ createuser -U postgres -d -A -P dspace

Enter password for new role:

Enter it again:

Shall the new role be allowed to create more new roles? (y/n) n

postgres@dir:/home/dspace$ exit

exit

root@dir:/home/dspace# su dspace

dspace@dir:~$ createdb -U dspace -E UNICODE dspace

dspace@dir:~$exit

 

Set Up Environment Variables:

root@dir:/home/dspace#sh -c ‘echo export PATH=$PATH:\”/usr/lib/jvm/java-6-sun/bin\” >> /etc/profile’

root@dir:/home/dspace# sh -c ‘echo export JAVA_HOME=\”/usr/lib/jvm/java-6-sun\” >> /etc/profile’

root@dir:/home/dspace# sh -c ‘echo export JRE_HOME=\”/usr/lib/jvm/java-6-sun/jre\” >> /etc/profile’

 

After that download the latest version of Dspace

root@dir:/home/dspace# wget http://skylink.dl.sourceforge.net/project/dspace/DSpace%20Stable/4.1/dspace-4.1-src-release.tar.gz

 

Untar the downloaded dspace

root@dir:/home/dspace#tar –zxvf dspace-4.1-src-release.tar.gz

 

We have dspace in training CD. We are not going to download it

root@dir:/home/dspace#tar –zxvf /media/cdrom/dspace-4.1-src-release.tar.gz

 

Set right configuration

root@dspace:/home/dspace# cd dspace-4.1-src-release/

root@dir:dapace-src-release#nano dspace/config/dspace.cfg

 

Thereafter build Dspace by running the following command

root@dir:/home/dspace/dspace-src-release#cd dspace

root@dir:/home/dspace/dspace-src-release/dspace# mvn package

 

[INFO] Scanning for projects…

Downloading: http://repo1.maven.org/maven2/org/dspace/dspace-pom/10/dspace-pom-10.pom

[WARNING] Unable to get resource ‘org.dspace:dspace-pom:pom:10’ from repository central

(http://repo1.maven.org/maven2): Error transferring file: repo1.maven.org

[INFO] ————————————————————————

[ERROR] FATAL ERROR

[INFO] ————————————————————————

[INFO] Error building POM (may not be this project’s POM).

Project ID: org.dspace:dspace-parent:pom:1.8.2

Reason: Cannot find parent: org.dspace:dspace-pom for project: org.dspace:dspace

for project org.dspace:dspace-parent:pom:1.8.2

 

[INFO] ————————————————————————

[INFO] Trace

org.apache.maven.reactor.MavenExecutionException: Cannot find parent: org.dspace

If you have problem in your Internet connectivity, you will get the above messages. These messages

also can get, if you have proxy in your Internet connectivity. To solve this problem, set proxy in you

maven configuration file.

 

root@dir:/home/dspace/dspace-src-release/dspace#nano /etc/maven2/settings.xml

 

Uncomment and set you proxy in the following section-

<proxies>

<proxy>

<id>optional</id>

<active>true</active>

<protocol>http</protocol>

<username></username>

<password></password>

<host>proxy.iub.edu.bd</host>

<port>3000</port>

<nonProxyHosts>localhost</nonProxyHosts>

</proxy>

</proxies>

 

root@dir:/home/dspace/dspace-src-release/dspace# mvn package

root@dir:/home/dspace/dspace-src-release/dspace# cd target/dspace-4.1-build/

root@dir:/home/dspace/dspace-src-release/dspace/target/dspace-4.1-buildr# ant fresh_install

 

To complete installation, you should do the following:

Setup your Web servlet container (e.g. Tomcat) to look for your DSpace web applications in:

/home/dspace/webapps/

OR

copy any web applications from /home/dspace/webapps/ to the appropriate place for your servlet

container. (e.g. ‘$CATALINA_HOME/webapps’ for Tomcat)

 

root@dir:/home/dspace/dspace-src-release/dspace#cp -r /dspace/webapps/* /var/lib/tomcat6/webapps/

 

 

Create Dsapce administrator by using the command

root@dir:/home/dspace/dspace-src-release/dspace# /home/dspace/bin/dspace create-administrator

 

Assign permission to dspace installation directory

root@dir:/home/dspace/dspace-src-release/dspace#chmod -R 777 /dspace/*

 

Finally you can get your Dsapce by pointing the address in your web browser:

http://localhsot:8080/xmlui

 

If ant fresh_install fail to download GeoLiteCity do the following-

In order to use DSpace Solr Usage Statistics, you will need to

manually re-run:

ant update_geolite

OR

You may manually install this file by following these steps:

(1) Download the file from http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz

(2) Unzip it to create a file named ‘GeoLiteCity.dat’

(3) Copy that file to ‘/dspace/config/GeoLiteCity.dat’

Configuration and Customization of Dspace

We have to change the following sections at the time of DSpace installation. Before the command “mvn package”

The location of main Dspace configuration file is –   

dapace-src-release/dspace/config/dspace.cfg

 

##### Basic information ######

 

# DSpace installation directory

dspace.dir = ${dspace.install.dir} Put your Dspace installation Directory

 

# DSpace host name – should match base URL. Do not include port number.

dspace.hostname = ${dspace.hostname} Assign your hostname here

 

# DSpace base host URL. Include port number etc.

dspace.baseUrl = ${dspace.baseUrl}

 

# DSpace base URL. Include port number etc., but NOT trailing slash

# Change to xmlui if you wish to use the xmlui as the default, or remove

# “/jspui” and set webapp of your choice as the “ROOT” webapp in

# the servlet engine.

dspace.url = ${dspace.baseUrl}/xmlui

 

# Name of the site

dspace.name = ${dspace.name} Write your Dspace name here

 

# Default language for metadata values

default.language = ${default.language}

 

##### Database settings #####

 

# Database name (“oracle”, or “postgres”)

db.name = ${db.name}

 

# Database username and password

db.username = ${db.username}

db.password = ${db.password} Insert your database password here

 

# From address for mail

mail.from.address = ${mail.from.address} Put your E-mail Address here

 

# Currently limited to one recipient!

feedback.recipient = ${mail.feedback.recipient} Put your E-mail Address here

 

# General site administration (Webmaster) e-mail

mail.admin = ${mail.admin} Put your E-mail Address here

 

# Recipient for server errors and alerts

alert.recipient = ${mail.alert.recipient} Put your E-mail Address here

 

# Recipient for new user registration emails

registration.notify = ${mail.registration.notify} Put your E-mail Address here

 

 

# Boolean search operator to use, current supported values are OR and AND

# If this config item is missing or commented out, OR is used

# AND requires all search terms to be present

# OR requires one or more search terms to be present

search.operator = OR Define your default search operator here

 

##### Handle settings ######

#handle.canonical.prefix = ${dspace.url}/handle/ Uncomment it to use your own URL

# If omitted, the canonical URL prefix will be http://hdl.handle.net/

handle.canonical.prefix = ${handle.canonical.prefix} Comment it to use your own URL

 

# CNRI Handle prefix

handle.prefix = ${handle.prefix} Comment it to use your own URL

 

##### Settings for item count (strength) information ####

webui.strengths.show = false Change this to truefor enabling Item-counter

#

# The default is to use a cache

# webui.strengths.cache = true Uncomment this line

 

# Set to true to use local server URLs (i.e. http://myserver.myorg/handle/123456789/1)

webui.feed.localresolve = false Set it to true to use your own URL

 

#### Controlled Vocabulary Settings #####

# Enable or disable the controlled vocabulary add-on

# Warning: this feature is not compatible with WAI (it requires javascript to function)

#

# webui.controlledvocabulary.enable = true Uncomment this line to enable controlled vocabulary

Advertisements

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

Leave a comment

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.

Dspace installation on Debian Squeeze

8 Comments

I am mentioning my practical experience of Dspace installation on Debian Squeeze. I hope, you can do
it and this will help you.
First make a dspace user in debian for Dspace.
root@dir:~#adduser dspace
Then install other softwares as prerequisites for Dspace installation. It is a good approach to
install sun-java6.
root@dir:~# apt-get install sun-java6-jdk
root@dir:~#update-java-alternatives -v -s java-6-sun
root@dir:~# apt-get install tomcat6
root@dir:~#apt-get install maven2
root@dir:~#apt-get install postgresql-8.4
After installing prerequisite softwares, create dspace database in postgresql for Dspace use.
root@dir:~# cd /home/dspace/
root@dir:/home/dspace# su postgres
postgres@dir:/home/dspace$ createuser -U postgres -d -A -P dspace
Enter password for new role:
Enter it again:
Shall the new role be allowed to create more new roles? (y/n) n
postgres@dir:/home/dspace$ exit
exit
root@dir:/home/dspace# su dspace
dspace@dir:~$ createdb -U dspace -E UNICODE dspace
After that download the latest version of Dspace and set right configuration
root@dir:/home/dspace/dspace-1.8.2-src-release#nano dspace/config/dspace.cfg
Thereafter build Dspace by running the following command
root@dir:/home/dspace/dspace-1.8.2-src-release/dspace# mvn package
[INFO] Scanning for projects…
Downloading: http://repo1.maven.org/maven2/org/dspace/dspace-pom/10/dspace-pom-10.pom
[WARNING] Unable to get resource ‘org.dspace:dspace-pom:pom:10’ from repository central
(http://repo1.maven.org/maven2): Error transferring file: repo1.maven.org
[INFO] ————————————————————————
[ERROR] FATAL ERROR
[INFO] ————————————————————————
[INFO] Error building POM (may not be this project’s POM).
Project ID: org.dspace:dspace-parent:pom:1.8.2
Reason: Cannot find parent: org.dspace:dspace-pom for project: org.dspace:dspace-parent:pom:1.8.2
for project org.dspace:dspace-parent:pom:1.8.2
[INFO] ————————————————————————
[INFO] Trace
org.apache.maven.reactor.MavenExecutionException: Cannot find parent: org.dspace
If you have problem in your Internet connectivity, you will get the above messages. These messages
also can get, if you have proxy in your Internet connectivity. To solve this problem, set proxy in you
maven configuration file.
root@dir:/home/dspace/dspace-1.8.2-src-release/dspace#nano /etc/maven2/settings.xml
Uncomment and set you proxy in the following section-

optional
true
http

proxy.iub.edu.bd
3000
localhost

root@dir:/home/dspace/dspace-1.8.2-src-release/dspace# mvn package
root@dir:/home/dspace/dspace-1.8.2-src-release/dspace# cd target/dspace-1.8.2-build/
root@dir:/home/dspace/dspace-1.8.2-src-release/dspace/target/dspace-1.8.2-build# ant fresh_install

To complete installation, you should do the following:
Setup your Web servlet container (e.g. Tomcat) to look for your DSpace web applications in:

/home/dspace/webapps/
OR
copy any web applications from /home/dspace/webapps/ to the appropriate place for your servlet
container. (e.g. ‘$CATALINA_HOME/webapps’ for Tomcat)
Create E-person in Dsapce by using the command-
root@dir:/home/dspace/dspace-1.8.2-src-release/dspace# /home/dspace/bin/dspace create-administrator

Set Permission and owner for DSpace

root@dir:~#chmod -R 755 /home/dspace/

root@dir:~#chown -R dspace:dspace /home/dspace/
Finally you can get your Dsapce by pointing the address in your web browser:
http://localhsot:8080/xmlui

OR

http://localhost:8080/jspui

Essential Linux command for Administrators

Leave a comment

Find out KDE Desktop version:

konqueror --version

Find out Gnome Desktop version:

gnome-panel --version

Find out Mozilla browser version:

mozilla --version

Find out Firefox browser version:

firefox --version

Find out current Language:

set | egrep '^(LANG|LC_)'

Find out disk space usage:

df -h

Find/Estimate file space usage:

du -h

Find out version of Linux glibc:

ls -l /lib/libc-*.so /lib/libc.so*

Find out user limits:

ulimit -a

Find out installed device drivers (modules)

lsmod

Find out information about an X server:

xdpyinfo

It can find out:

  • Name of display:
  • Version number
  • Vendor name (such as The XFree86 Project)
  • Vendor release number
  • And XFree86 version number

Find out information about Linux CPU

cat /proc/cpuinfo

Find out information about Linux Memory

cat /proc/meminfo

OR

free -m

OR

free -g

Find out user shell name:

ps -p $$ | tail -1 | awk '{ print $4 }'

Dump Linux kernel variables

/sbin/sysctl -a

Find out running Linux kernel version:

uname -mrs
uname -a
cat /proc/version

Dump or display memory information and swap information:

free -m

Network card and IP address information:

ifconfig -a
ifconfig -a|less

Debian / Ubuntu Linux network configuration file (all interface eth0,eth1,…ethN)

more /etc/network/interfaces

Redhat / CentOS / Fedora Linux network configuration file (eth0)

more  /etc/sysconfig/network-scripts/ifcfg-eth0

Note replace eth1 for 2nd network card and so on.

Display routing information

route -n
route

Display list of all open ports

netstat -tulpn

View login related logs

tail -f /var/log/secure
vi /var/log/secure
grep 'something' /var/log/secure

View mail server related logs

tail -f /var/log/maillog
vi /var/log/maillog
grep 'something' /var/log/maillog

Find how long the system has been running

uname
w

Show who is logged on and what they are doing

w
who

Display list of tasks

top

Display all running process

ps aux
ps aux | grep process-name

Display list of all installed software on Redhat / CentOS / Fedora

rpm -qa
rpm -qa | grep 'software-name'
rpm -qa | less

Display list of all installed software on Debian / Ubuntu

dpkg --list

vmstat – System Activity, Hardware and System Information

The command vmstat reports information about processes, memory, paging, block IO, traps, and cpu activity.
# vmstat 3

Display Memory Utilization Slabinfo

# vmstat -m

Get Information About Active / Inactive Memory Pages

# vmstat -a

w – Find Out Who Is Logged on And What They Are Doing

w command displays information about the users currently on the machine, and their processes.
# w username
# w vivek

uptime – Tell How Long The System Has Been Running

The uptime command can be used to see how long the server has been running. The current time, how long the system has been running, how many users are currently logged on, and the system load averages for the past 1, 5, and 15 minutes.
# uptime

ps – Displays The Processes

ps command will report a snapshot of the current processes. To select all processes use the -A or -e option:
# ps -A

See Every Process Running As User nur

# ps -U nur -u nur u

Find Out The Top 10 Memory Consuming Process

# ps -auxf | sort -nr -k 4 | head -10

Keyboard Shortcuts for Bash ( Command Shell for Ubuntu, Debian, Suse, Redhat, Linux, etc)

The default shell on most Linux operating systems is called Bash. There are a couple of important hotkeys that you should get familiar with if you plan to spend a lot of time at the command line. These shortcuts will save you a ton of time if you learn them.

Ctrl + A Go to the beginning of the line you are currently typing on
Ctrl + E Go to the end of the line you are currently typing on
Ctrl + L Clears the Screen, similar to the clear command
Ctrl + U Clears the line before the cursor position. If you are at the end of the line, clears the entire line.
Ctrl + H Same as backspace
Ctrl + R Let’s you search through previously used commands
Ctrl + C Kill whatever you are running
Ctrl + D Exit the current shell
Ctrl + Z Puts whatever you are running into a suspended background process. fg restores it.
Ctrl + W Delete the word before the cursor
Ctrl + K Clear the line after the cursor
Ctrl + T Swap the last two characters before the cursor
Esc + T Swap the last two words before the cursor
Alt + F Move cursor forward one word on the current line
Alt + B Move cursor backward one word on the current line
Tab Auto-complete files and folder names

Remove DSpace port number in Debian

Leave a comment

There is a easy way to remove port number in DSpace URL. Just add port number 80 instead of 8080 in /etc/tocat6/server.xml. But is dangerous for production system. we have to use apache as fornt webserver instead of tomcat. This can be possible by using mod_proxy and mod_prory_ajp module of apache. And there is a another procedure which is port forwarding by using iptable. Port forwarding is the most easy to do that.

First see your present iptable by running the command

#iptables -L

This will produce the following output

 Chain INPUT (policy ACCEPT)
 target     prot opt source               destination

 Chain FORWARD (policy ACCEPT)
 target     prot opt source               destination

 Chain OUTPUT (policy ACCEPT)
 target     prot opt source               destination

This means it allows anyone access to anything from anywhere.

Lets make your own iptable

nano /etc/iptables.test.rules

Add your common rules and add the following line

*nat

-A PREROUTING -d your.ipad.ofma.chnn -p tcp –drop 80 -j DNAT — to your.ipad.ofyr.macn:8080

COMMIT

Activate this rules

iptables-restore < /etc/iptables.test.rules

Look the difference

iptables -L

Save this rules in master iptable file

iptables-save > /etc/iptables.up.rules

To make sure the iptables rules are started on a reboot we’ll create a new file:

nano /etc/network/if-pre-up.d/iptables

Add these lines to it:

#!/bin/bash

/sbin/iptables-restore < /etc/iptables.up.rules

The file needs to be executable so change the permissions:

chmod +x /etc/network/if-pre-up.d/iptables

Create koha, DSpace and vufind live DVD

Leave a comment

mysql chr set

Leave a comment

In /etc/mysql/my.conf, section [mysqld] I have insert:
init-connect = ‘SET NAMES utf8’
character-set-server=utf8
collation-server=utf8_general_

ci
character_set_client=utf8

In fact is what is written here:
http://wiki.koha-community.org/wiki/Encoding_and_Character_Sets_in_Koha

Well, if I do a check on mysql with root user I see:
mysql> show variables where variable_name LIKE “character_set%” OR
variable_name LIKE “collation%”;
+————————–+—————————-+
| Variable_name            | Value                      |
+————————–+—————————-+
| character_set_client     | latin1                     |
| character_set_connection | latin1                     |
| character_set_database   | utf8                       |
| character_set_filesystem | binary                     |
| character_set_results    | latin1                     |
| character_set_server     | utf8                       |
| character_set_system     | utf8                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
| collation_connection     | latin1_swedish_ci          |
| collation_database       | utf8_general_ci            |
| collation_server         | utf8_general_ci            |
+————————–+—————————-+
default-character-set=utf8
character-set-server=utf8

[mysql]
default-character-set=utf8

[client]
default-character-set=utf8

If you change conf file, please restart service (of course..)

Older Entries

%d bloggers like this: