Sunday, 21 December 2014

INSTALL KOHA, DSPACE & CONTENT MANAGEMENT SYSTEM IN ONE SERVER

INSTALL KOHA, DSPACE & CONTENT
MANAGEMENT SYSTEM IN ONE SERVER
After installation of Ubuntu 12.04 LTS server, ensure that Internet
is working properly.
Note: It is advisable to install Koha and DSpace through SSH. It will
help you a lot in installation.
Please follow the procedure:
First run this command at server:
sudo apt-get install openssh-server
Note: After installation of ssh server, just leave the server and
connect the server through ssh client from any other windows
system.
To connect, anyone can use Putty or SSH Client.
(Download the software from Internet
http://www.filewatcher.com/m/SSHSecureShellClient-
3.2.9.exe.5517312-0.html and install in windows.)
Now, open SSH client and enter the IP address and Port (by default
port: 22)
Enter user and password. It will connect to the server.
Now Install Koha and DSpace.Koha installation on Ubuntu 12.04 on Server:
Note: Text in blue colors are the commands which have to be executed in order to install
Koha.
Open a terminal and apply following commands,
sudo su
Enter the password:
Add Koha package repository
wget -O- http://debian.koha-community.org/koha/gpg.asc | sudo apt-key add –
echo deb http://debian.koha-community.org/koha squeeze main | sudo tee /etc/apt/sources.list.d/koha.list
sudo apt-get update
sudo apt-get install koha-common
Initial Configuration
Create a new file (type the following command in terminal with root privilege)
vi /etc/koha/koha-sites.conf
Add the following lines and save.
(Note: when file is open, to insert these lines, first press INSERT button or I
then paste these in the file. Now, press SHIFT + : and then press wq. The file
will be saved and it will automatically be closed)
DOMAIN=".yourdomain.org
INTRAPORT="8000"
INTRAPREFIX=""
INTRASUFFIX="-intra"
DEFAULTSQL=""
OPACPORT="8001"
OPACPREFIX=""
OPACSUFFIX=""
ZEBRA_MARC_FORMAT="marc21"
ZEBRA_LANGUAGE="en" Adding ports
Open following file and add ports (type the following command in terminal with root privilege)
sudo vi /etc/apache2/ports.conf
Add two ports for Koha
(Note: When the file is open, to insert these lines, first press INSERT button or
I then paste these in the file. Now, press SHIFT + : and then press wq. The file
will be saved and it will automatically be closed)
Listen 8000
Listen 8001
Apply following commands,
sudo a2enmod rewrite
Configuration of UTF-8 in MySQL and Apache
Enable UTF-8 at MySQL
Open a Terminal and type following command,
sudo su
vi /etc/mysql/my.cnf (type the following command in terminal with root privilege)
(Note: When the file is open, to insert these lines, first press INSERT button or
I then paste these in the file. Now, press SHIFT + : and then press wq. The file
will be saved and it will automatically be closed)
[Under the Basic settings section, add the following,]
# UTF-8 Defaults for Koha
init-connect='SET NAMES utf8'
character-set-server=utf8
collation-server=utf8_general_ci
vi /etc/apache2/conf.d/charset
[Add the following two lines in] (type the following command in terminal with root privilege)
(Note: When the file is open, to insert these lines, first press INSERT button or
I then paste these in the file. Now, press SHIFT + : and then press wq. The file
will be saved and it will automatically be closed)
AddCharset UTF-8 .utf8
AddDefaultCharset UTF-8
Save the file and close the editor.
Instance creation
sudo apt-get install mysql-server
[Put a password for MySQL Root USER]
Apply following commands,sudo apt-get clean
sudo koha-create --create-db library
Ubuntu MySQL security Tweak
sudo su
mysql -u root -p
[Enter the MySQL Root password when it ask]
Execute the following commands,
USE mysql;
SELECT host,user FROM user;
DELETE FROM user WHERE user=''; SELECT host,user FROM user;
FLUSH PRIVILEGES;
QUIT
Configuring Apache
Execute the following commands in a terminal.
sudo a2enmod rewrite
sudo a2enmod deflate
sudo a2ensite library
sudo /etc/init.d/apache2 restart
Start web installation of Koha
The username to log in with will be koha_library and the password will be near the end of
/etc/koha/sites/library/koha-conf.xml
Apply the following command to see the koha login password,
sudo xmlstarlet sel -t -v 'yazgfs/config/pass' /etc/koha/sites/library/koha-conf.xml
Open following link,
http://127.0.1.1:8000
Zebra rebuild command
sudo su
koha-rebuild-zebra -v -f libraryInstalling DSpace 4.1 on Ubuntu 12.04 LTS
Note: Text in blue colors are the commands which have to be execute in order to install
DSpace-4.1.
Installation of prerequisite applications
Open Applications > Accessories > Terminal and execute following commands.
sudo apt-get install openjdk-7-jdk
sudo apt-get install postgresql
sudo apt-get install tomcat7
sudo apt-get install ant maven
Create the database user
sudo su postgres
createuser -U postgres -d -A -P dspace
Enter password for new role: [Enter a password e.g. dspace]
Shall the new role be allowed to create more new roles? (y/n) n
[Enter n and press enter button]
Type exit
Allow the database user (dspace) to connect to the database
[If the following command not open, check the postgresql version number and apply in the command]
sudo vi /etc/postgresql/9.1/main/pg_hba.conf
(type the above command in terminal with root privilege)
(Note: When the file is open, to insert these lines, first press INSERT button or
I then paste these in the file. Now, press SHIFT + : and then press wq. The file
will be saved and it will automatically be closed)
Add this line to the configuration file at the end:
local all dspace md5
save and close the file
Restart PostgreSQL :
sudo su
/etc/init.d/postgresql restartCreate Dspace user
sudo useradd -m dspace
sudo passwd dspace [enter a password for the new user dspace]
sudo mkdir /dspace
sudo chown dspace /dspace
Create the PostgreSQL 'dspace' database
sudo -u dspace createdb -U dspace -E UNICODE dspace
Configure Tomcat
[If the following command not open, check the tomcat version number and apply in the command]
sudo vi /etc/tomcat7/server.xml
(type the above command in terminal with root privilege)
(Note: When the file is open, to insert these lines, first press INSERT button or
I then paste these in the file. Now, press SHIFT + : and then press wq. The file
will be saved and it will automatically be closed)
Insert the following chunk of text just above the closing </Host>
<!-- Define a new context path for all DSpace web apps -->
<Context path="/xmlui" docBase="/dspace/webapps/xmlui" allowLinking="true"/>
<Context path="/sword" docBase="/dspace/webapps/sword" allowLinking="true"/>
<Context path="/oai" docBase="/dspace/webapps/oai" allowLinking="true"/>
<Context path="/jspui" docBase="/dspace/webapps/jspui" allowLinking="true"/>
<Context path="/lni" docBase="/dspace/webapps/lni" allowLinking="true"/>
<Context path="/solr" docBase="/dspace/webapps/solr" allowLinking="true"/>
save and close the file.
Create Dspace directory
sudo mkdir /build
sudo chmod -R 777 /build
cd /build Download Dsapce to /build directory
You can check latest version of Dspace from here.
Run the command mentioned below at command prompt. (Ensure that Internet is working).
wget http://sourceforge.net/projects/dspace/files/DSpace%20Stable/4.1/dspace-4.1-src-release.tar.gz
Extracting Dspace package
tar -zxf dspace-4.1-src-release.tar.gz
cd /build/dspace-4.1-src-release
mvn -fn package
cd dspace/target/dspace-4.1-build
sudo ant fresh_install
Fix Tomcat permissions, and restart the Tomcat server
sudo chown tomcat7:tomcat7 /dspace -R
Restart Tomcat
/etc/init.d/tomcat7 restart
Make an initial administrator account (an e-person) in DSpace:
/dspace/bin/dspace create-administrator
It will ask to enter email address for user login. Enter an email address (e.g. dspace@localhost).
Enter First name and surename (e.g. dspace)
Enter a password.
Open Dspace in your browser
You can load either one Dspace interface in a browser.
http://localhost:8080/xmlui
http://localhost:8080/jspuiInstallation of Wordpress/Joomla in Ubuntu 12.04 LTS Server:
First install phpmyadmin:
apt-get install phpmyadmin
(It will install and configure the same with MySQL. Please enter the root password when it asks during
configuration).
Now, open the browser through different system and type http://IP_adress_of_server/phpmyadmin
(It will open the phpmyadmin interface. Now create the database for wordpress/joomla. Please follow the screenshot
given below).
Enter the database name which you want to create (For ex: library) then click on create button. It will create the database
and give you the message.
Now, paste the wordpress/joomla folder in /var/www folder.
Now, open the browser and type http://IP_address_of_server/name_of_wordpress_folder (press enter)
It will open the installation page, where provide the necessary detail to install wordpress/joomla.
D. P. Tripathi
NIT Rourkela
References:
1. http://linuxhalwa.blogspot.in/2012/01/koha-installation-on-ubuntu-1004.html
2. http://linuxhalwa.blogspot.in/2014/04/installing-dspace-4x-on-ubuntu-1402-lts.html
3. https://wiki.duraspace.org/display/DSDOC4x/Installing+DSpace

No comments:

Post a Comment