User Tools

Site Tools


en:developer:linux_source_install

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revisionBoth sides next revision
en:developer:linux_source_install [2014/04/13 23:52] – external edit 127.0.0.1en:developer:linux_source_install [2023/03/13 01:46] – external edit 127.0.0.1
Line 1: Line 1:
 +
 +
 +
 ====== Source Installation on Linux ====== ====== Source Installation on Linux ======
  
  
-<TABAREA tabs="Greenstone3,Greenstone2"> +<tabbox Greenstone3>
-<TAB>+
 ===== Greenstone3 ===== ===== Greenstone3 =====
 This walkthrough is for **Linux**. But it may have the side-effect of helping Windows users too. This walkthrough is for **Linux**. But it may have the side-effect of helping Windows users too.
Line 22: Line 24:
  
  
-You need to install it on the research partition, ELSE IT DOESN'T WORK! Go to /research and create folder <your-username>, if this folder isn't already there. Then work from there. +You need to install it on the research partition, ELSE IT DOESN'T WORK! Go to /Scratch and create folder your-username, if this folder isn't already there. Then work from there. 
-<code>$ /research/<your-username></code>+<code>$ /Scratch/your-username</code>
  
  
Line 31: Line 33:
  
  
-For students or developers at the University of Waikato: make sure these are installed in the RESEARCH partition, else it doesn't work! I'm assuming below that these will be installed in /research/<your-username>/sources+For students or developers at the University of Waikato: make sure these are installed in the RESEARCH partition, else it doesn't work! I'm assuming below that these will be installed in /Scratch/your-username/sources
 (**sources** is just a folder where I put the unzipped source code for Greenstone 3 related programs). (**sources** is just a folder where I put the unzipped source code for Greenstone 3 related programs).
 For everyone else, replace this with your FULL PATH to where the apr, apr-util and subversion will be installed. For everyone else, replace this with your FULL PATH to where the apr, apr-util and subversion will be installed.
Line 47: Line 49:
 The following is separated into multi-lines, but type them all on the same line in the x-term separated by spaces. Make sure you use the paths to subversion, apr and apr-util that are appropriate for your situation: The following is separated into multi-lines, but type them all on the same line in the x-term separated by spaces. Make sure you use the paths to subversion, apr and apr-util that are appropriate for your situation:
 <code> <code>
-$ ./configure    --prefix=/research/<your-username>/subversion+$ ./configure    --prefix=/Scratch/your-username/subversion
 --without-apxs --without-apxs
---with-apr=/research/<your-username>/apr/bin/apr-1-config +--with-apr=/Scratch/your-username/apr/bin/apr-1-config 
---with-apr-util=/research/<your-username>/apu/bin/apu-1-config+--with-apr-util=/Scratch/your-username/apu/bin/apu-1-config
 --with-neon=/usr/ --with-neon=/usr/
 </code> </code>
Line 56: Line 58:
 <code>make <code>make
 make install</code> make install</code>
-Now it's created a folder called 'subversion' in <your-username>, because that's what --prefix told it to do above. +Now it's created a folder called 'subversion' in your-username, because that's what --prefix told it to do above. 
  
  
 Next, add the path to the bin directory to the paths already exported: Next, add the path to the bin directory to the paths already exported:
-<code>$ export PATH=/research/<your-username>/subversion/bin:$PATH</code>+<code>$ export PATH=/Scratch/your-username/subversion/bin:$PATH</code>
 For more details, see [[en:developer:install_svn|Install SVN]] For more details, see [[en:developer:install_svn|Install SVN]]
  
Line 81: Line 83:
  
 ===== Checking out and installing Greenstone 3 and GLI ===== ===== Checking out and installing Greenstone 3 and GLI =====
 +
 +* Make sure $JAVA_HOME and $ANT_HOME are set, and that $JAVA_HOME/bin, $ANT_HOME/bin and your svn/bin are on the PATH.
 +* **If you're on Linux 64 bit,**
 +<code>export CFLAGS=-fPIC $CFLAGS</code>
  
   * **Checking out Greenstone 3 source code from subversion (SVN)**   * **Checking out Greenstone 3 source code from subversion (SVN)**
Line 88: Line 94:
  
    
-Go to /research/<your-username>/ (in the following, Greenstone 3 will be checked out into a folder called greenstone 3).+Go to /Scratch/your-username (in the following, Greenstone 3 will be checked out into a folder called greenstone 3).
  
  
Line 97: Line 103:
 [co stands for checkout, which will checkout code from SVN] [co stands for checkout, which will checkout code from SVN]
  
-Whenever you need to update with the latest source code from the SVN repository, cd to the $GSDL3HOME directory (your Greenstone installation directory, for example /research/<your-username>/greenstone3) and type:+Whenever you need to update with the latest source code from the SVN repository, cd to the $GSDL3HOME directory (your Greenstone installation directory, for example /Scratch/your-username/greenstone3) and type:
 <code>$ svn update</code> <code>$ svn update</code>
  
Line 126: Line 132:
  
  
-Update your .profile file, containing your settings, to export JAVA_HOME and update the PATH to point to your Java installation. Go to /research/<your-username>, then either use emacs (or some other text editor) to make the changes to the .profile file by launching it as:+Update your .profile file, containing your settings, to export JAVA_HOME and update the PATH to point to your Java installation. Go to /Scratch/your-username, then either use emacs (or some other text editor) to make the changes to the .profile file by launching it as:
 <code>$ emacs ~/.profile</code> <code>$ emacs ~/.profile</code>
 Find out where your Java installation is: Find out where your Java installation is:
Line 166: Line 172:
  
  
-Go to $GSDLHOME, Greenstone3 home directory (which in the example above is /research/<your-username>/greenstone3):+Go to $GSDLHOME, Greenstone3 home directory (which in the example above is /Scratch/your-username/greenstone3):
 <code>$ ant prepare</code> <code>$ ant prepare</code>
 Press 'y' to accept port 8080 if nothing has been deployed there already, which should be the case. Else see further below on changing port number [[#Changing the port number where tomcat is installed]]. Press 'y' to accept port 8080 if nothing has been deployed there already, which should be the case. Else see further below on changing port number [[#Changing the port number where tomcat is installed]].
Line 225: Line 231:
 In your greenstone3 home folder, $GSDLHOME: In your greenstone3 home folder, $GSDLHOME:
 <code>$ ant stop</code> <code>$ ant stop</code>
-Then, deploy (as written in the [[http://www.greenstone.org/docs/greenstone3/manual.pdf|Greenstone 3 manual]], p. 5):+Then, deploy (as written in the [[http://files.greenstone.org/technical/gs3manual.pdf|Greenstone 3 manual]], p. 5):
 <code>$ ant deploy-localsite</code> <code>$ ant deploy-localsite</code>
 Check that it works, by **starting** tomcat again and going to: Check that it works, by **starting** tomcat again and going to:
Line 231: Line 237:
 Make sure that the page appears. You can also look at the wsdl file for the gs3 web service that's been exposed:  Make sure that the page appears. You can also look at the wsdl file for the gs3 web service that's been exposed: 
 <code>http://localhost:8080/greenstone3/services/localsite?wsdl</code> <code>http://localhost:8080/greenstone3/services/localsite?wsdl</code>
-You can also deploy other sites, see the [[http://www.greenstone.org/docs/greenstone3/manual.pdf|Greenstone 3 Developer's Manual]].+You can also deploy other sites, see the [[http://files.greenstone.org/technical/gs3manual.pdf|Greenstone 3 Developer's Manual]].
  
  
Line 345: Line 351:
  
  
-</TAB> +<tabbox Greenstone2>
-<!--############################################################################# +
-############################################################################# +
-############################################################################# +
-#############################################################################--> +
-<TAB>+
 ===== Greenstone2 ===== ===== Greenstone2 =====
 NB: These instructions will apply from 7th June 2007 NB: These instructions will apply from 7th June 2007
Line 365: Line 366:
  
 <code> <code>
-mkdir /research/xxx (create a place for your research files if you haven't already) +mkdir /Scratch/xxx (create a place for your research files if you haven't already) 
-cd /research/xxx +cd /Scratch/xxx 
 svn co http://svn.greenstone.org/gsdl/trunk gsdl svn co http://svn.greenstone.org/gsdl/trunk gsdl
 </code> </code>
Line 383: Line 384:
 </code> </code>
  
-Now greenstone is installed in ''/research/xxx/gsdl''+Now greenstone is installed in ''/Scratch/xxx/gsdl''
  
 ==== 2. If you want to use the GLI ====  ==== 2. If you want to use the GLI ==== 
Line 406: Line 407:
 Unpack the tar file: Unpack the tar file:
 <code> <code>
-cd /research/xxx+cd /Scratch/xxx
 tar -xzf apache_2.x.x.tar.gz tar -xzf apache_2.x.x.tar.gz
 </code> </code>
Line 413: Line 414:
 <code> <code>
 cd apache_2.x.x cd apache_2.x.x
-./configure --prefix=/research/xxx/httpd+./configure --prefix=/Scratch/xxx/httpd
 make make
 make install make install
 </code> </code>
-Now apache is installed in ''/research/xxx/httpd''+Now apache is installed in ''/Scratch/xxx/httpd''
  
 To start and stop apache, type To start and stop apache, type
 <code> <code>
- /research/xxx/httpd/bin/apachectl start + /Scratch/xxx/httpd/bin/apachectl start 
- /research/xxx/httpd/bin/apachectl stop+ /Scratch/xxx/httpd/bin/apachectl stop
 </code> </code>
-To change the port that apache runs on, edit the ''/research/xxx/conf/httpd.conf'' file and +To change the port that apache runs on, edit the ''/Scratch/xxx/conf/httpd.conf'' file and 
 change the Port or Listen directive to the correct port - ''8080'' is a good choice.  change the Port or Listen directive to the correct port - ''8080'' is a good choice. 
 After restarting apache you will then be able to access your apache installation at  After restarting apache you will then be able to access your apache installation at 
Line 437: Line 438:
 This is the way I used: This is the way I used:
 <code> <code>
-cd /research/xxx/httpd/cgi-bin +cd /Scratch/xxx/httpd/cgi-bin 
-ln -s /research/xxx/httpd/gsdl +ln -s /Scratch/xxx/httpd/gsdl 
-ln -s /research/xxx/gsdl/cgi-bin/library +ln -s /Scratch/xxx/gsdl/cgi-bin/library 
-cp /research/xxx/gsdl/cgi-bin/gsdlsite.cfg . +cp /Scratch/xxx/gsdl/cgi-bin/gsdlsite.cfg . 
-cd /research/xxx/htdocs +cd /Scratch/xxx/htdocs 
-ln -s /research/xxx/gsdl+ln -s /Scratch/xxx/gsdl
 </code> </code>
  
Line 448: Line 449:
 Make sure the following are uncommented and set like this: Make sure the following are uncommented and set like this:
 <code> <code>
-gsdlhome /research/xxx/gsdl+gsdlhome /Scratch/xxx/gsdl
 httpprefix /gsdl httpprefix /gsdl
 httpimg /gsdl/images httpimg /gsdl/images
 </code> </code>
-Now you need to edit apaches config file ''/research/xxx/httpd/conf/httpd.conf''+Now you need to edit apaches config file ''/Scratch/xxx/httpd/conf/httpd.conf''
    
-In the ''<Directory "/research/xxx/httpd/cgi-bin">'' bit, change 'Options None' to 'Options +In the ''<Directory "/Scratch/xxx/httpd/cgi-bin">'' bit, change 'Options None' to 'Options 
 FollowSymlinks' FollowSymlinks'
  
Line 485: Line 486:
 installation, run: installation, run:
 <code> <code>
-cd /research/xxx/gsdl +cd /Scratch/xxx/gsdl 
 svn update svn update
 make clean make clean
Line 528: Line 529:
  
 5. make install 5. make install
-</TAB+</tabbox
-</TABAREA>+