lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Solr Wiki] Update of "HowToCompileSolr" by BillKrat
Date Sun, 01 Apr 2012 13:53:58 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "HowToCompileSolr" page has been changed by BillKrat:
http://wiki.apache.org/solr/HowToCompileSolr

New page:
'''Windows 7 / Windows 8 -  how to compile Solr '''

Word Document version of this blogs content: [[http://www.global-webnet.com/Blog/file.axd?file=2012/4/SolrSetup.docx|SolrSetup.docx
(904.43 kb)]]

 1. '''Development IDE''': http://www.eclipse.org/downloads/ - Java EE developers
  * Copy eclipse folder to c:\Java
  * Executed Eclipse:
   * Workspace prompt, input => c:\java\EclipseWorkspace
 1. I already had the '''Java JRE''' installed (may have impacted steps, i.e., 6c)
 1. '''Java Development Kit (JDK)''' http://www.oracle.com/technetwork/java/javase/downloads/index.html
 1. '''TortoiseSVN''' - http://tortoisesvn.net/downloads.html
  * Executed TortoiseSVN installation msi
   * Selected “command line client tools”
   * Created c:\java\LuceneSolr folder
   * Right click c:\java\LuceneSolr – selected “SVN Checkout”
   * Solr website for source code: http://lucene.apache.org/solr/versioncontrol.html
    1. Input (fig 2): http://svn.apache.org/repos/asf/lucene/dev/  Clicked button
    1. Selected lucene3661
    1. Clicked “Head” button (then clicked OK to accept default)
    1. Clicked OK (exited Head wizard)
    1. Clicked OK (exited Checkout window)  download starts
 1. '''Linux environment''': http://cygwin.com/ - setup.exe
  * Root directory c:\Java (root when within Cygwin)
  * Package directory c:\Java\Cygwin (installation files)
  * Add “curl” and click on All icon (see arrow in figure 1), required to import xml data.
 1. '''Ant''' - http://ant.apache.org/bindownload.cgi
  * Unzip apache-ant-<ver>-bin.zip to c:\java\Ant
  * Add bin folder to path (fig 3)
  * {{http://www.global-webnet.net/BlogEngine/Themes/StarGazer/images/computer-head-bang.gif||height="20",width="18"}}
Note: Ant will not execute at this point!  You must copy the tool.jar file from its location
in the JDK to the JRE<ver>\Lib folder (fig 4)
  * Test Ant from command prompt – should get “Build.xml does not exist!” message.
 1. '''Compile application'''
  * Navigate to c:\Java\LuceneSolr folder
  * Type “ant compile”  (fig 5) – there will be a number of warnings (patient may be
required the first time)
  * Navigate to the c:\Java\LuceneSolr\Solr folder
  * Type “ant dist” - you must do this from the Solr source code folder.  Ant will create
a “dist” folder and place the compiled .war and .jar files in it.
  * Navigate to the c:\Java\LuceneSolr\solr\dist folder and copy the apace-solr-<ver>-SNAPSHOT.war
file to the c:\Java\LuceneSolr\solr\example\webapps folder (fig 6) – be sure to rename it
to solr.war
 1. '''Start application'''
  * Navigate to c:\java\LuceneSolr\solr\example
  * Type “java –jar start.jar” (fig 7)
 1. '''Import Data'''
  * Launch CygWin application using Icon generated on desktop (fig 8)
  * Type “cd /” to change to root folder – you will find the contents of the Java folder
if you followed my folder structure naming conventions.   I find this layout makes navigation
easier as you pretty much follow the same steps that you would from a command prompt.
  * Type “ls-al” to view contents of folder (optional)
  * Type “cd LuceneSolr/Solr/example/exampledocs”, note - if you do an “ls-al” here
you will find all of the sample .xml files.
  * Type “./post.sh *.xml” to import all sample data into the currently running solr core.
 Note: if you did not install “curl” in step 5c this will not work.   The “.” before
the post.sh command is important, without it the environment will not find the file (unlike
MS command prompt the current directory is not considered in the default path).
 1. Launch Solr
  * http://localhost.:8983/solr/admin - likewise you can now execute the links on the Tutorials
page<<BR>> at this link => http://lucene.apache.org/solr/tutorial.html<<BR>>
{{http://www.global-webnet.com/Blog/image.axd?picture=2012/4/Step10.jpg}}

{{http://www.global-webnet.com/Blog/image.axd?picture=2012/4/Fig1.jpg}}
'''Figure 1''' - Cygwin package selection - "curl"

{{http://www.global-webnet.com/Blog/image.axd?picture=2012/4/Fig2.png}}
'''Figure 2''' - Source code repository

{{http://www.global-webnet.com/Blog/image.axd?picture=2012/4/Fig3.jpg}}
'''Figure 3''' - Add Ant bin to path

{{http://www.global-webnet.com/Blog/image.axd?picture=2012/4/Fig4.jpg}}
'''Figure 4''' - Copy tools.jar to Jre7/Lib

{{http://www.global-webnet.com/Blog/image.axd?picture=2012/4/Fig5.png}}
'''Figure 5''' - Compile the application

{{http://www.global-webnet.com/Blog/image.axd?picture=2012/4/Fig6.PNG}} '''Figure 6''' - Copy
compiled war file to webapps folder

{{http://www.global-webnet.com/Blog/image.axd?picture=2012/4/Fig7.jpg}}
'''Figure 7''' - Start Solr using Jetty

{{http://www.global-webnet.com/Blog/image.axd?picture=2012/4/Fig8.jpg}}
'''Figure 8''' - Launching CygWin

{{http://www.global-webnet.com/Blog/image.axd?picture=2012/4/Fig9.jpg}}
'''Figure 9''' - using post.sh to import files

Mime
View raw message