Install
$ wget https://github.com/hieplpvip/canon_printer/raw/master/canon_lbp_setup.sh
$ chmod +x canon_lbp_setup.sh
$ ./canon_lbp_setup.sh
$ wget https://github.com/hieplpvip/canon_printer/raw/master/canon_lbp_setup.sh
$ chmod +x canon_lbp_setup.sh
$ ./canon_lbp_setup.sh
I. Backup
Apply following commands,
sudo su - postgres
pg_dump dspace > dspace.backup
The backup will create in /var/lib/postgresql/
Create backup of asseststore and log
sudo zip -r assetstore.zip /dspace/assetstore
sudo zip -r log.zip /dspace/log
It is advisable to copy the following folders also to dspace folder to restore as previous
1. Solr 2. upload 3. webapps 4. config 5.bin
II. Restoration
Copy the assetstore, log folders, and database backup to home folder.
Extract the assetstore and log folders.
Stop Tomcat server
sudo service tomcat stop
Remove assetstore and log folders from the newly installed dspace
sudo rm -rf /dspace/assetstore
sudo rm -rf /dspace/log/
Move old assetstore and log folders to /dspace folder.
sudo mv assetstore /dspace
sudo mv log /dspace
Restoration of database
Restart PostgreSQL
sudo systemctl stop postgresql
sudo systemctl start postgresql
Delete the existing dspace database and create a new one. Commands for this
sudo -u postgres psql
DROP DATABASE dspace;
CREATE DATABASE dspace;
\quit
Restore dspace backup from the home folder
sudo su postgres
psql -f dspace.backup dspace
Install pgcrypto postgres extension
psql --username=postgres dspace -c "CREATE EXTENSION pgcrypto;"
exit
Execute the following commands one by one,
sudo /dspace/bin/dspace database info
sudo /dspace/bin/dspace database migrate
sudo /dspace/bin/dspace index-discovery -b
sudo /dspace/bin/dspace filter-media
sudo /dspace/bin/dspace index-discovery
sudo /dspace/bin/dspace index-discovery -o
Restart Tomcat
sudo service tomcat start
sudo apt-get -y install libapache2-mod-php php-mbstring php-pear php php-dev php-gd php-intl php-json php-ldap php-mysql php-xml php-soap
sudo su cd /tmp
wget https://github.com/vufind-org/vufind/releases/download/v7.0.1/vufind_7.0.1.deb
sudo dpkg -i vufind_7.0.1.debsudo mv vufind-7.0.1 /usr/local/vufind
cd /usr/local/vufind
php install.php
##set some permissions to allow Apache to write configuration and cache files to disk:
sudo chown -R www-data:www-data /usr/local/vufind/local/cache
sudo chown -R www-data:www-data /usr/local/vufind/local/config
Note: (not mandatory) If you plan to use VuFind's command line tools, you also need a separate cache for that
mkdir /usr/local/vufind/local/cache/cli
sudo chmod 777 /usr/local/vufind/local/cache/cli
sudo ln -s /usr/local/vufind/local/httpd-vufind.conf /etc/apache2/conf-enabled/vufind.conf
sudo /etc/init.d/apache2 reload
##Settingup environment variable
sudo sh -c 'echo export JAVA_HOME=\"/usr/lib/jvm/default-java\" > /etc/profile.d/vufind.sh'
sudo sh -c 'echo export VUFIND_HOME=\"/usr/local/vufind\" >> /etc/profile.d/vufind.sh'
sudo sh -c 'echo export VUFIND_LOCAL_DIR=\"/usr/local/vufind/local\" >> /etc/profile.d/vufind.sh'
##After creating the file, you must load it manually for the changes to take effect without forcing you to log out and back in again:
source /etc/profile.d/vufind.sh
cd /usr/local/vufind/
./solr.sh start
b. Open a web browser, and browse
http://your-server-name/vufind/Install/Home
Note: If you don't want to have to manually start and stop Solr every time you
turn on or shut down your server, you can set it up to run
automatically.
edit the file
sudo gedit /etc/init.d/vufind
copy and paste the following line
#!/bin/sh
### BEGIN INIT INFO
# Provides: vufind
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: VuFind init script
### END INIT INFO
cd /usr/local/vufind
./solr.sh $*
then, Make the script executable
chmod +x /etc/init.d/vufind
Add the script to the Ubuntu startup
update-rc.d vufind defaults
Solr commands
service vufind start
service vufind stop
service vufind restart
service vufind check
a. Indexing Koha with VuFind
Copy your marc_local.properties
cp /usr/local/vufind/import/marc_local.properties /usr/local/vufind/local/import/
b. Add following line in the file,
id = 999c, first
$ sudo gedit /usr/local/vufind/local/import/marc_local.properties
#collection = "collection"
institution = "My University"
#building = "Library A"
id = 999c, first
c. set driver for koha
$sudo gedit /usr/local/vufind/local/config/vufind/config.ini
Make sure that following lines in the file,
[Catalog]
driver = "Koha"
d. change koha connection set up
$sudo gedit /usr/local/vufind/local/config/vufind/Koha.ini
[Catalog]
host = localhost
port = 3306
username = mysqluser
password = mysqlpass
database = koha_database
url = http://library.myuniversity.edu/
[Location_Codes]
AV = "Audio Visual"
CART = "Book Cart"
CHILD = "Children's Area"
DISPLAY = "On Display"
FIC = "Fiction"
GEN = "General Stacks"
Note:The Koha username may not be the MySQL root user. It is safest to have
an alternate user for such things. This MySQL user needs to have access
to the Koha database.
The MySQL password should be the MySQL password that corresponds to the
MySQL username. If you want to test this, from the command line you can
run:
$mysql -u [mysqluser] -p [kohadatabase]
e. Export MARC record
Open Koha Go to Tool > Export Data
koha.mrc will be downloaded
Import into VuFind
cd /usr/local/vufind
./import-marc.sh koha.mrc
f. Restart solr
cd /usr/local/vufind/
./solr.sh status