Difference between revisions of "SUNScholar/Install DSpace/S08/Ubuntu-14.04"

From Libopedia
Jump to navigation Jump to search
(Created page with "<center> '''BACK TO STEP 8''' </center> ==Step 8. Enable the DSpace Java webapps on the Java Tomcat webapp server== The DSpace webapps have...")
 
 
(31 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
  '''[[SUNScholar/Install_DSpace/S08|BACK TO STEP 8]]'''
 
  '''[[SUNScholar/Install_DSpace/S08|BACK TO STEP 8]]'''
 
</center>
 
</center>
 +
===Step 8.0 Create web application shortcuts===
 +
We create shortcuts ([http://en.wikipedia.org/wiki/Symlink symlinks in the Unix world]) in the default Tomcat webapps folder, to the DSpace webapps in the '''$HOME/webapps''' folder by typing as follows:
  
==Step 8. Enable the DSpace Java webapps on the Java Tomcat webapp server==
+
cd /var/lib/tomcat7/webapps
The DSpace webapps have been compiled in the '''/home/dspace/webapps''' folder but Tomcat only serves up webapps in the '''/var/lib/tomcat6/webapps''' folder.
 
  
So, how do we get all the files into the Tomcat webapps folder ?
+
sudo ln -s /home/dspace/webapps/solr
  
There are several methods, but we are going to set it up so that if you change anything in the DSpace '''/home/dspace/webapps''' folder and then re-compile, the changes automatically occur in the Tomcat '''/var/lib/tomcat6/webapps''' folder. This also saves you from constantly copying webapps after a compile, which is a tricky business.
+
sudo ln -s /home/dspace/webapps/rest
 
 
We create shortcuts ([http://en.wikipedia.org/wiki/Symlink symlinks in the Unix world]) in the default Tomcat webapps folder, to the DSpace webapps in the '''/home/dspace/webapps''' folder by typing as follows:
 
 
 
sudo cd /var/lib/tomcat6/webapps
 
  
 
  sudo ln -s /home/dspace/webapps/oai
 
  sudo ln -s /home/dspace/webapps/oai
  
 
  sudo ln -s /home/dspace/webapps/sword
 
  sudo ln -s /home/dspace/webapps/sword
 
sudo ln -s /home/dspace/webapps/solr
 
 
The following is optional, but nice to have.
 
sudo ln -s /usr/share/tomcat6-admin/manager
 
  
 
===Step 8.1 Configure the default ROOT webapp===
 
===Step 8.1 Configure the default ROOT webapp===
DSpace has two web interfaces, the XMLUI and the JSPUI.
+
DSpace has two web interfaces, the XMLUI and the JSPUI. This procedure allows you to select which interface will be used as the ROOT webapp. In other words, the one that does not need a '''/xmlui''' or a '''/jspui''' URL addition.
 
 
This procedure allows you to select which interface will be used as the ROOT webapp.
 
 
 
In other words, the one that does not need a '''/xmlui''' or a '''/jspui''' URL addition.
 
  
 
Start by removing the default Tomcat ROOT webapp with the following command:
 
Start by removing the default Tomcat ROOT webapp with the following command:
  sudo rm -rf /var/lib/tomcat6/webapps/ROOT
+
  sudo rm -rf /var/lib/tomcat7/webapps/ROOT
 
Then apply one of the following.
 
Then apply one of the following.
 
*'''<font color="red"><u>Please Note: You can only choose one UI as the default ROOT Tomcat webapp!. The other can be referenced as "/" something if needed.</u></font>'''
 
*'''<font color="red"><u>Please Note: You can only choose one UI as the default ROOT Tomcat webapp!. The other can be referenced as "/" something if needed.</u></font>'''
 +
----
 
====Option A: [[SUNScholar/Theme|XMLUI]]====
 
====Option A: [[SUNScholar/Theme|XMLUI]]====
 +
----
 
''Complex setup but very customisable using modern web UI technologies and has a low server load.''
 
''Complex setup but very customisable using modern web UI technologies and has a low server load.''
  
 
Type the following to make the XMLUI the default interface.
 
Type the following to make the XMLUI the default interface.
  
  sudo cd /var/lib/tomcat6/webapps
+
  cd /var/lib/tomcat7/webapps
  
 
  sudo ln -s /home/dspace/webapps/xmlui ROOT
 
  sudo ln -s /home/dspace/webapps/xmlui ROOT
  
 +
----
 
====Option B: [[SUNScholar/Theme|JSPUI]]====
 
====Option B: [[SUNScholar/Theme|JSPUI]]====
 +
----
 
''Easy to setup but hard to customise and has a high server load.''
 
''Easy to setup but hard to customise and has a high server load.''
  
 
Type the following to make the JSPUI the default interface.
 
Type the following to make the JSPUI the default interface.
  
  sudo cd /var/lib/tomcat6/webapps
+
  cd /var/lib/tomcat7/webapps
  
 
  sudo ln -s /home/dspace/webapps/jspui ROOT
 
  sudo ln -s /home/dspace/webapps/jspui ROOT
Line 54: Line 46:
 
====Example listing of DSpace Java webapps in the Tomcat webapp folder====
 
====Example listing of DSpace Java webapps in the Tomcat webapp folder====
 
To get a listing of active Tomcat webapps type the following:
 
To get a listing of active Tomcat webapps type the following:
  sudo cd /var/lib/tomcat6/webapps
+
  cd /var/lib/tomcat7/webapps
  
 
  sudo ls -l
 
  sudo ls -l
Line 60: Line 52:
 
See example listing below.
 
See example listing below.
 
<pre>
 
<pre>
dspace@ir1:/var/lib/tomcat6/webapps$ ls -l
+
dspace@ir1:/var/lib/tomcat7/webapps$ ls -l
 
total 0
 
total 0
 
lrwxrwxrwx 1 root    root        24 2012-09-05 11:28 oai -> /home/dspace/webapps/oai
 
lrwxrwxrwx 1 root    root        24 2012-09-05 11:28 oai -> /home/dspace/webapps/oai
lrwxrwxrwx 1 root    root        26 2012-09-05 11:29 ROOT -> /home/dspace/webapps/xmlui
+
lrwxrwxrwx 1 root    root        25 2012-09-05 11:28 rest -> /home/dspace/webapps/rest
 +
lrwxrwxrwx 1 root    root        26 2012-09-05 11:28 ROOT -> /home/dspace/webapps/xmlui
 
lrwxrwxrwx 1 root    root        25 2012-09-05 11:28 solr -> /home/dspace/webapps/solr
 
lrwxrwxrwx 1 root    root        25 2012-09-05 11:28 solr -> /home/dspace/webapps/solr
lrwxrwxrwx 1 root    root        26 2012-09-05 11:29 sword -> /home/dspace/webapps/sword
+
lrwxrwxrwx 1 root    root        26 2012-09-05 11:28 sword -> /home/dspace/webapps/sword
 
</pre>
 
</pre>
  
 
===Step 8.2 Restart Tomcat Server===
 
===Step 8.2 Restart Tomcat Server===
 
Type the following.
 
Type the following.
  sudo /etc/init.d/tomcat6 restart
+
  sudo service tomcat7 restart
 +
You can view the restart log if you want by typing the following;
 +
tail -f /var/log/tomcat7/catalina.out
 +
 
 +
[[Category:Installation]]

Latest revision as of 22:18, 22 August 2016

BACK TO STEP 8

Step 8.0 Create web application shortcuts

We create shortcuts (symlinks in the Unix world) in the default Tomcat webapps folder, to the DSpace webapps in the $HOME/webapps folder by typing as follows:

cd /var/lib/tomcat7/webapps
sudo ln -s /home/dspace/webapps/solr
sudo ln -s /home/dspace/webapps/rest
sudo ln -s /home/dspace/webapps/oai
sudo ln -s /home/dspace/webapps/sword

Step 8.1 Configure the default ROOT webapp

DSpace has two web interfaces, the XMLUI and the JSPUI. This procedure allows you to select which interface will be used as the ROOT webapp. In other words, the one that does not need a /xmlui or a /jspui URL addition.

Start by removing the default Tomcat ROOT webapp with the following command:

sudo rm -rf /var/lib/tomcat7/webapps/ROOT

Then apply one of the following.

  • Please Note: You can only choose one UI as the default ROOT Tomcat webapp!. The other can be referenced as "/" something if needed.

Option A: XMLUI


Complex setup but very customisable using modern web UI technologies and has a low server load.

Type the following to make the XMLUI the default interface.

cd /var/lib/tomcat7/webapps
sudo ln -s /home/dspace/webapps/xmlui ROOT

Option B: JSPUI


Easy to setup but hard to customise and has a high server load.

Type the following to make the JSPUI the default interface.

cd /var/lib/tomcat7/webapps
sudo ln -s /home/dspace/webapps/jspui ROOT

Example listing of DSpace Java webapps in the Tomcat webapp folder

To get a listing of active Tomcat webapps type the following:

cd /var/lib/tomcat7/webapps
sudo ls -l

See example listing below.

dspace@ir1:/var/lib/tomcat7/webapps$ ls -l
total 0
lrwxrwxrwx 1 root    root         24 2012-09-05 11:28 oai -> /home/dspace/webapps/oai
lrwxrwxrwx 1 root    root         25 2012-09-05 11:28 rest -> /home/dspace/webapps/rest
lrwxrwxrwx 1 root    root         26 2012-09-05 11:28 ROOT -> /home/dspace/webapps/xmlui
lrwxrwxrwx 1 root    root         25 2012-09-05 11:28 solr -> /home/dspace/webapps/solr
lrwxrwxrwx 1 root    root         26 2012-09-05 11:28 sword -> /home/dspace/webapps/sword

Step 8.2 Restart Tomcat Server

Type the following.

sudo service tomcat7 restart

You can view the restart log if you want by typing the following;

tail -f /var/log/tomcat7/catalina.out