<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.crosswire.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=JMarsden</id>
		<title>CrossWire Bible Society - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.crosswire.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=JMarsden"/>
		<link rel="alternate" type="text/html" href="https://wiki.crosswire.org/Special:Contributions/JMarsden"/>
		<updated>2026-06-06T15:41:02Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.27.7</generator>

	<entry>
		<id>https://wiki.crosswire.org/index.php?title=Tutorial:Compiling_%26_Installing_SWORD&amp;diff=6740</id>
		<title>Tutorial:Compiling &amp; Installing SWORD</title>
		<link rel="alternate" type="text/html" href="https://wiki.crosswire.org/index.php?title=Tutorial:Compiling_%26_Installing_SWORD&amp;diff=6740"/>
				<updated>2009-09-06T04:30:53Z</updated>
		
		<summary type="html">&lt;p&gt;JMarsden: /* Debian or Ubuntu */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Aims==&lt;br /&gt;
&lt;br /&gt;
This page is intended to help anyone who needs to get started obtaining and compiling the very latest SWORD source code, and then installing and testing it on their machine, on a Linux (or possibly other Unix-like) operating system.  &lt;br /&gt;
&lt;br /&gt;
''NOTE: This process includes making Internet connections to crosswire.org, to download SWORD source code and a sample SWORD module.''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
There are four main steps involved:&lt;br /&gt;
&lt;br /&gt;
* Installing all the necessary software packages&lt;br /&gt;
* Downloading the latest development SWORD source code&lt;br /&gt;
* Compiling and installing SWORD&lt;br /&gt;
* Testing that the new SWORD installation is basically working&lt;br /&gt;
&lt;br /&gt;
All of these can be scripted for a specific Linux distribution, and some sample scripts are provided below.  An explanation of each step is also provided, in case you want to understand what the script does (!), or there is no script for your particular Linux distribution.  &lt;br /&gt;
&lt;br /&gt;
==Scripts for some Linux distributions==&lt;br /&gt;
&lt;br /&gt;
The bash scripts below use [http://en.wikipedia.org/wiki/Sudo sudo] to become root when necessary, see below for more details on that.&lt;br /&gt;
&lt;br /&gt;
===Debian or Ubuntu===&lt;br /&gt;
&lt;br /&gt;
'''Note that official SWORD packages exist, please only use this script if you truly need to compile from source, and do NOT have the packaged version of SWORD installed.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash                                                                                                                 &lt;br /&gt;
PKGS=&amp;quot;subversion build-essential autotools-dev pkg-config libz-dev libclucene-dev libicu-dev libcurl4-gnutls-dev&amp;quot;&lt;br /&gt;
sudo apt-get install $PKGS -y&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh --enable-shared &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Fedora 10 or Fedora 11===&lt;br /&gt;
&lt;br /&gt;
'''Note that official SWORD packages exist, please only use this script if you truly need to compile from source, and do NOT have the packaged version of SWORD installed.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;subversion gcc-c++ make libtool icu zlib-devel clucene-core-devel libicu-devel libcurl-devel&amp;quot;&lt;br /&gt;
sudo yum install $PKGS -y&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh --enable-shared &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mandriva===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;colorsvn gcc-c++ make libtool icu zlib1-devel libclucene-devel libicu-devel libcurl-devel automake&amp;quot;&lt;br /&gt;
sudo urpmi $PKGS&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh --enable-shared &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Red Hat Enterprise Linux or CentOS===&lt;br /&gt;
&lt;br /&gt;
Note this script is a little more complex than most, because RHEL 5.x and CentOS 5.x lack the '''cluccene-core-devel''' library package.  This means the script must manually download a source RPM package, rebuild it and install it, before it can work with the SWORD source code.  And before it can do that, it has to make sure there is an appropriate setup for building RPMs from source in place.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;subversion gcc-c++ make libtool icu zlib-devel libicu-devel libcurl-devel findutils rpm-build&amp;quot;&lt;br /&gt;
sudo yum install $PKGS -y&lt;br /&gt;
if [ ! -f ~/.rpmmacros ]; then&lt;br /&gt;
  cat &amp;gt;&amp;gt;~/.rpmmacros &amp;lt;&amp;lt;EOF&lt;br /&gt;
%_topdir        ~/rpm&lt;br /&gt;
%_tmppath       %{_topdir}/tmp&lt;br /&gt;
EOF&lt;br /&gt;
  mkdir -p ~/rpm/{BUILD,SOURCES,SPECS,SRPMS,tmp} ~/rpm/RPMS/{athlon,i386,i486,i586,i686,noarch}&lt;br /&gt;
fi&lt;br /&gt;
rpmbuild --rebuild http://download.fedora.redhat.com/pub/fedora/linux/releases/10/Fedora/source/SRPMS/clucene-0.9.21-1.fc10.src.rpm&lt;br /&gt;
sudo rpm -Uvh `find ~/rpm/RPMS/ -type f -name &amp;quot;*clucene*rpm&amp;quot; ! -name &amp;quot;*-debuginfo*&amp;quot;`&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh --enable-shared &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Test script==&lt;br /&gt;
&lt;br /&gt;
The is a very basic test; in particular it does not check indexed search functions at all.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
unset SWORD_PATH&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This test script should output (after a lot of debugging information):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
John 3:16: &lt;br /&gt;
For God so loved the world, that he gave his only begotten Son, &lt;br /&gt;
that whosoever believeth in him should not perish, but have everlasting life.&lt;br /&gt;
&lt;br /&gt;
(KJV)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Becoming root (using sudo)==&lt;br /&gt;
&lt;br /&gt;
In order to install software (including installing SWORD itself), you will need to be able to temporarily &amp;quot;become&amp;quot; root.&lt;br /&gt;
&lt;br /&gt;
Most Linux (and several *BSD) distributions include a tool called sudo than can do this very conveniently, once set up, without having to repeatedly enter a root password.  On some Linux distributions (including Ubuntu) this is already set up for you during the installation process.  On others, you will need to&lt;br /&gt;
&lt;br /&gt;
* Become root (i.e. obtain a root command shell) in some other way (log in as root, or use su, and type in the root password when prompted for it).&lt;br /&gt;
* Use the command &amp;lt;pre&amp;gt;visudo&amp;lt;/pre&amp;gt; to edit the sudo configuration file.&lt;br /&gt;
* Add a line &amp;lt;pre&amp;gt;yourusername ALL=(ALL) ALL&amp;lt;/pre&amp;gt; to the file, save the change and and exit your text editor.&lt;br /&gt;
&lt;br /&gt;
* After that, you should be able to type &amp;lt;pre&amp;gt;sudo id&amp;lt;/pre&amp;gt; to run the (harmless) command id as root.  sudo will prompt you for your own password, but if it is used more than once within a short period, will &amp;quot;remember&amp;quot; that you have already provided it and not ask for it again.  This is very convenient.&lt;br /&gt;
&lt;br /&gt;
==Installing necessary software packages==&lt;br /&gt;
&lt;br /&gt;
Starting from a fairly minimal Linux installation, a C++ compiler and several other libraries and tools must be added to the system before compiling SWORD.  These come in packages. The command to install packages varies between different Linux distributions.  A few examples follow:&lt;br /&gt;
&lt;br /&gt;
;Fedora, Red Hat Enterprise Linux, CentOS:&lt;br /&gt;
 sudo yum install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Debian, Ubuntu, Mint:&lt;br /&gt;
 sudo apt-get install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Mandriva:&lt;br /&gt;
 sudo urpmi &amp;lt;list of packages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These packaging tools will automatically install additional dependent packages, so the ones you request will work once installed.&lt;br /&gt;
&lt;br /&gt;
Package names vary too, but generally the following packages must be installed:&lt;br /&gt;
&lt;br /&gt;
* subversion (a tool used to obtain the latest SWORD source code, see below)&lt;br /&gt;
* the GNU C++ compiler, often in a package named g++ or gcc-c++&lt;br /&gt;
* make&lt;br /&gt;
* libtool &lt;br /&gt;
* icu&lt;br /&gt;
* zlib-devel (sometimes named zlib1-devel or zlib1g-dev)&lt;br /&gt;
* clucene-core-devel (sometimes named libclucene-dev)&lt;br /&gt;
* libicu-devel (sometimes named libicu-dev)&lt;br /&gt;
* libcurl-devel (named libcurl4-gnutls-dev on Debian-derived systems)&lt;br /&gt;
&lt;br /&gt;
These will generally automatically &amp;quot;pull in&amp;quot; other necessary packages such as binutils, automake and autoconf as dependencies.&lt;br /&gt;
&lt;br /&gt;
==Downloading the SWORD source code==&lt;br /&gt;
&lt;br /&gt;
The single command &amp;lt;pre&amp;gt;svn http://crosswire.org/sword/svn/trunk sword&amp;lt;/pre&amp;gt; will download the current development code of SWORD, into a directory called sword.  Once the command finishes, you should be able to do &amp;lt;pre&amp;gt;cd sword&amp;lt;/pre&amp;gt; and look at all the source code you just downloaded.&lt;br /&gt;
&lt;br /&gt;
==Compiling and installing SWORD==&lt;br /&gt;
&lt;br /&gt;
The INSTALL file contains all the details, but if all is well, after cd sword (i.e., from inside the SWORD source code directory) the command line &amp;lt;pre&amp;gt;./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh --enable-shared &amp;amp;&amp;amp; make&amp;lt;/pre&amp;gt; to configure and compile SWORD.  &lt;br /&gt;
&lt;br /&gt;
If this fails, make sure all the necessary packages are installed on your system, and after that, please ask for help in the [http://crosswire.org/forums/ Crosswire forums] or on the sword-devel mailing list.&lt;br /&gt;
&lt;br /&gt;
To install SWORD, after successfully compiling SWORD, you can do &amp;lt;pre&amp;gt;sudo make install &amp;amp;&amp;amp; sudo make install_config&amp;lt;/pre&amp;gt; to install SWORD and a default configuration file on your machine.&lt;br /&gt;
&lt;br /&gt;
==Testing a new SWORD installation==&lt;br /&gt;
&lt;br /&gt;
As a very basic test, you can download and install the KJV SWORD &amp;quot;module&amp;quot; and then check that the command line bible reader diatheke can read a verse from it.    The commands to do this (using the usual bash shell) are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that displays a bunch of text, and then something very similar to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
John 3:16: &lt;br /&gt;
For God so loved the world, that he gave his only begotten Son, &lt;br /&gt;
that whosoever believeth in him should not perish, but have everlasting life.&lt;br /&gt;
&lt;br /&gt;
(KJV)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then the SWORD installation is basically working.&lt;/div&gt;</summary>
		<author><name>JMarsden</name></author>	</entry>

	<entry>
		<id>https://wiki.crosswire.org/index.php?title=Tutorial:Compiling_%26_Installing_SWORD&amp;diff=6739</id>
		<title>Tutorial:Compiling &amp; Installing SWORD</title>
		<link rel="alternate" type="text/html" href="https://wiki.crosswire.org/index.php?title=Tutorial:Compiling_%26_Installing_SWORD&amp;diff=6739"/>
				<updated>2009-09-04T05:23:08Z</updated>
		
		<summary type="html">&lt;p&gt;JMarsden: /* Compiling and installing SWORD */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Aims==&lt;br /&gt;
&lt;br /&gt;
This page is intended to help anyone who needs to get started obtaining and compiling the very latest SWORD source code, and then installing and testing it on their machine, on a Linux (or possibly other Unix-like) operating system.  &lt;br /&gt;
&lt;br /&gt;
''NOTE: This process includes making Internet connections to crosswire.org, to download SWORD source code and a sample SWORD module.''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
There are four main steps involved:&lt;br /&gt;
&lt;br /&gt;
* Installing all the necessary software packages&lt;br /&gt;
* Downloading the latest development SWORD source code&lt;br /&gt;
* Compiling and installing SWORD&lt;br /&gt;
* Testing that the new SWORD installation is basically working&lt;br /&gt;
&lt;br /&gt;
All of these can be scripted for a specific Linux distribution, and some sample scripts are provided below.  An explanation of each step is also provided, in case you want to understand what the script does (!), or there is no script for your particular Linux distribution.  &lt;br /&gt;
&lt;br /&gt;
==Scripts for some Linux distributions==&lt;br /&gt;
&lt;br /&gt;
The bash scripts below use [http://en.wikipedia.org/wiki/Sudo sudo] to become root when necessary, see below for more details on that.&lt;br /&gt;
&lt;br /&gt;
===Debian or Ubuntu===&lt;br /&gt;
&lt;br /&gt;
'''Note that official SWORD packages exist, please only use this script if you truly need to compile from source, and do NOT have the packaged version of SWORD installed.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash                                                                                                                 &lt;br /&gt;
PKGS=&amp;quot;subversion build-essential autotools-dev pkg-config libz-dev libclucene-dev libicu-dev libcurl4-gnutls--dev&amp;quot;&lt;br /&gt;
sudo apt-get install $PKGS -y&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh --enable-shared &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Fedora 10 or Fedora 11===&lt;br /&gt;
&lt;br /&gt;
'''Note that official SWORD packages exist, please only use this script if you truly need to compile from source, and do NOT have the packaged version of SWORD installed.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;subversion gcc-c++ make libtool icu zlib-devel clucene-core-devel libicu-devel libcurl-devel&amp;quot;&lt;br /&gt;
sudo yum install $PKGS -y&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh --enable-shared &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mandriva===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;colorsvn gcc-c++ make libtool icu zlib1-devel libclucene-devel libicu-devel libcurl-devel automake&amp;quot;&lt;br /&gt;
sudo urpmi $PKGS&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh --enable-shared &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Red Hat Enterprise Linux or CentOS===&lt;br /&gt;
&lt;br /&gt;
Note this script is a little more complex than most, because RHEL 5.x and CentOS 5.x lack the '''cluccene-core-devel''' library package.  This means the script must manually download a source RPM package, rebuild it and install it, before it can work with the SWORD source code.  And before it can do that, it has to make sure there is an appropriate setup for building RPMs from source in place.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;subversion gcc-c++ make libtool icu zlib-devel libicu-devel libcurl-devel findutils rpm-build&amp;quot;&lt;br /&gt;
sudo yum install $PKGS -y&lt;br /&gt;
if [ ! -f ~/.rpmmacros ]; then&lt;br /&gt;
  cat &amp;gt;&amp;gt;~/.rpmmacros &amp;lt;&amp;lt;EOF&lt;br /&gt;
%_topdir        ~/rpm&lt;br /&gt;
%_tmppath       %{_topdir}/tmp&lt;br /&gt;
EOF&lt;br /&gt;
  mkdir -p ~/rpm/{BUILD,SOURCES,SPECS,SRPMS,tmp} ~/rpm/RPMS/{athlon,i386,i486,i586,i686,noarch}&lt;br /&gt;
fi&lt;br /&gt;
rpmbuild --rebuild http://download.fedora.redhat.com/pub/fedora/linux/releases/10/Fedora/source/SRPMS/clucene-0.9.21-1.fc10.src.rpm&lt;br /&gt;
sudo rpm -Uvh `find ~/rpm/RPMS/ -type f -name &amp;quot;*clucene*rpm&amp;quot; ! -name &amp;quot;*-debuginfo*&amp;quot;`&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh --enable-shared &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Test script==&lt;br /&gt;
&lt;br /&gt;
The is a very basic test; in particular it does not check indexed search functions at all.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
unset SWORD_PATH&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This test script should output (after a lot of debugging information):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
John 3:16: &lt;br /&gt;
For God so loved the world, that he gave his only begotten Son, &lt;br /&gt;
that whosoever believeth in him should not perish, but have everlasting life.&lt;br /&gt;
&lt;br /&gt;
(KJV)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Becoming root (using sudo)==&lt;br /&gt;
&lt;br /&gt;
In order to install software (including installing SWORD itself), you will need to be able to temporarily &amp;quot;become&amp;quot; root.&lt;br /&gt;
&lt;br /&gt;
Most Linux (and several *BSD) distributions include a tool called sudo than can do this very conveniently, once set up, without having to repeatedly enter a root password.  On some Linux distributions (including Ubuntu) this is already set up for you during the installation process.  On others, you will need to&lt;br /&gt;
&lt;br /&gt;
* Become root (i.e. obtain a root command shell) in some other way (log in as root, or use su, and type in the root password when prompted for it).&lt;br /&gt;
* Use the command &amp;lt;pre&amp;gt;visudo&amp;lt;/pre&amp;gt; to edit the sudo configuration file.&lt;br /&gt;
* Add a line &amp;lt;pre&amp;gt;yourusername ALL=(ALL) ALL&amp;lt;/pre&amp;gt; to the file, save the change and and exit your text editor.&lt;br /&gt;
&lt;br /&gt;
* After that, you should be able to type &amp;lt;pre&amp;gt;sudo id&amp;lt;/pre&amp;gt; to run the (harmless) command id as root.  sudo will prompt you for your own password, but if it is used more than once within a short period, will &amp;quot;remember&amp;quot; that you have already provided it and not ask for it again.  This is very convenient.&lt;br /&gt;
&lt;br /&gt;
==Installing necessary software packages==&lt;br /&gt;
&lt;br /&gt;
Starting from a fairly minimal Linux installation, a C++ compiler and several other libraries and tools must be added to the system before compiling SWORD.  These come in packages. The command to install packages varies between different Linux distributions.  A few examples follow:&lt;br /&gt;
&lt;br /&gt;
;Fedora, Red Hat Enterprise Linux, CentOS:&lt;br /&gt;
 sudo yum install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Debian, Ubuntu, Mint:&lt;br /&gt;
 sudo apt-get install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Mandriva:&lt;br /&gt;
 sudo urpmi &amp;lt;list of packages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These packaging tools will automatically install additional dependent packages, so the ones you request will work once installed.&lt;br /&gt;
&lt;br /&gt;
Package names vary too, but generally the following packages must be installed:&lt;br /&gt;
&lt;br /&gt;
* subversion (a tool used to obtain the latest SWORD source code, see below)&lt;br /&gt;
* the GNU C++ compiler, often in a package named g++ or gcc-c++&lt;br /&gt;
* make&lt;br /&gt;
* libtool &lt;br /&gt;
* icu&lt;br /&gt;
* zlib-devel (sometimes named zlib1-devel or zlib1g-dev)&lt;br /&gt;
* clucene-core-devel (sometimes named libclucene-dev)&lt;br /&gt;
* libicu-devel (sometimes named libicu-dev)&lt;br /&gt;
* libcurl-devel (named libcurl4-gnutls-dev on Debian-derived systems)&lt;br /&gt;
&lt;br /&gt;
These will generally automatically &amp;quot;pull in&amp;quot; other necessary packages such as binutils, automake and autoconf as dependencies.&lt;br /&gt;
&lt;br /&gt;
==Downloading the SWORD source code==&lt;br /&gt;
&lt;br /&gt;
The single command &amp;lt;pre&amp;gt;svn http://crosswire.org/sword/svn/trunk sword&amp;lt;/pre&amp;gt; will download the current development code of SWORD, into a directory called sword.  Once the command finishes, you should be able to do &amp;lt;pre&amp;gt;cd sword&amp;lt;/pre&amp;gt; and look at all the source code you just downloaded.&lt;br /&gt;
&lt;br /&gt;
==Compiling and installing SWORD==&lt;br /&gt;
&lt;br /&gt;
The INSTALL file contains all the details, but if all is well, after cd sword (i.e., from inside the SWORD source code directory) the command line &amp;lt;pre&amp;gt;./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh --enable-shared &amp;amp;&amp;amp; make&amp;lt;/pre&amp;gt; to configure and compile SWORD.  &lt;br /&gt;
&lt;br /&gt;
If this fails, make sure all the necessary packages are installed on your system, and after that, please ask for help in the [http://crosswire.org/forums/ Crosswire forums] or on the sword-devel mailing list.&lt;br /&gt;
&lt;br /&gt;
To install SWORD, after successfully compiling SWORD, you can do &amp;lt;pre&amp;gt;sudo make install &amp;amp;&amp;amp; sudo make install_config&amp;lt;/pre&amp;gt; to install SWORD and a default configuration file on your machine.&lt;br /&gt;
&lt;br /&gt;
==Testing a new SWORD installation==&lt;br /&gt;
&lt;br /&gt;
As a very basic test, you can download and install the KJV SWORD &amp;quot;module&amp;quot; and then check that the command line bible reader diatheke can read a verse from it.    The commands to do this (using the usual bash shell) are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that displays a bunch of text, and then something very similar to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
John 3:16: &lt;br /&gt;
For God so loved the world, that he gave his only begotten Son, &lt;br /&gt;
that whosoever believeth in him should not perish, but have everlasting life.&lt;br /&gt;
&lt;br /&gt;
(KJV)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then the SWORD installation is basically working.&lt;/div&gt;</summary>
		<author><name>JMarsden</name></author>	</entry>

	<entry>
		<id>https://wiki.crosswire.org/index.php?title=Tutorial:Compiling_%26_Installing_SWORD&amp;diff=6738</id>
		<title>Tutorial:Compiling &amp; Installing SWORD</title>
		<link rel="alternate" type="text/html" href="https://wiki.crosswire.org/index.php?title=Tutorial:Compiling_%26_Installing_SWORD&amp;diff=6738"/>
				<updated>2009-09-04T05:19:21Z</updated>
		
		<summary type="html">&lt;p&gt;JMarsden: /* Test script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Aims==&lt;br /&gt;
&lt;br /&gt;
This page is intended to help anyone who needs to get started obtaining and compiling the very latest SWORD source code, and then installing and testing it on their machine, on a Linux (or possibly other Unix-like) operating system.  &lt;br /&gt;
&lt;br /&gt;
''NOTE: This process includes making Internet connections to crosswire.org, to download SWORD source code and a sample SWORD module.''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
There are four main steps involved:&lt;br /&gt;
&lt;br /&gt;
* Installing all the necessary software packages&lt;br /&gt;
* Downloading the latest development SWORD source code&lt;br /&gt;
* Compiling and installing SWORD&lt;br /&gt;
* Testing that the new SWORD installation is basically working&lt;br /&gt;
&lt;br /&gt;
All of these can be scripted for a specific Linux distribution, and some sample scripts are provided below.  An explanation of each step is also provided, in case you want to understand what the script does (!), or there is no script for your particular Linux distribution.  &lt;br /&gt;
&lt;br /&gt;
==Scripts for some Linux distributions==&lt;br /&gt;
&lt;br /&gt;
The bash scripts below use [http://en.wikipedia.org/wiki/Sudo sudo] to become root when necessary, see below for more details on that.&lt;br /&gt;
&lt;br /&gt;
===Debian or Ubuntu===&lt;br /&gt;
&lt;br /&gt;
'''Note that official SWORD packages exist, please only use this script if you truly need to compile from source, and do NOT have the packaged version of SWORD installed.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash                                                                                                                 &lt;br /&gt;
PKGS=&amp;quot;subversion build-essential autotools-dev pkg-config libz-dev libclucene-dev libicu-dev libcurl4-gnutls--dev&amp;quot;&lt;br /&gt;
sudo apt-get install $PKGS -y&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh --enable-shared &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Fedora 10 or Fedora 11===&lt;br /&gt;
&lt;br /&gt;
'''Note that official SWORD packages exist, please only use this script if you truly need to compile from source, and do NOT have the packaged version of SWORD installed.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;subversion gcc-c++ make libtool icu zlib-devel clucene-core-devel libicu-devel libcurl-devel&amp;quot;&lt;br /&gt;
sudo yum install $PKGS -y&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh --enable-shared &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mandriva===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;colorsvn gcc-c++ make libtool icu zlib1-devel libclucene-devel libicu-devel libcurl-devel automake&amp;quot;&lt;br /&gt;
sudo urpmi $PKGS&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh --enable-shared &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Red Hat Enterprise Linux or CentOS===&lt;br /&gt;
&lt;br /&gt;
Note this script is a little more complex than most, because RHEL 5.x and CentOS 5.x lack the '''cluccene-core-devel''' library package.  This means the script must manually download a source RPM package, rebuild it and install it, before it can work with the SWORD source code.  And before it can do that, it has to make sure there is an appropriate setup for building RPMs from source in place.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;subversion gcc-c++ make libtool icu zlib-devel libicu-devel libcurl-devel findutils rpm-build&amp;quot;&lt;br /&gt;
sudo yum install $PKGS -y&lt;br /&gt;
if [ ! -f ~/.rpmmacros ]; then&lt;br /&gt;
  cat &amp;gt;&amp;gt;~/.rpmmacros &amp;lt;&amp;lt;EOF&lt;br /&gt;
%_topdir        ~/rpm&lt;br /&gt;
%_tmppath       %{_topdir}/tmp&lt;br /&gt;
EOF&lt;br /&gt;
  mkdir -p ~/rpm/{BUILD,SOURCES,SPECS,SRPMS,tmp} ~/rpm/RPMS/{athlon,i386,i486,i586,i686,noarch}&lt;br /&gt;
fi&lt;br /&gt;
rpmbuild --rebuild http://download.fedora.redhat.com/pub/fedora/linux/releases/10/Fedora/source/SRPMS/clucene-0.9.21-1.fc10.src.rpm&lt;br /&gt;
sudo rpm -Uvh `find ~/rpm/RPMS/ -type f -name &amp;quot;*clucene*rpm&amp;quot; ! -name &amp;quot;*-debuginfo*&amp;quot;`&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh --enable-shared &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Test script==&lt;br /&gt;
&lt;br /&gt;
The is a very basic test; in particular it does not check indexed search functions at all.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
unset SWORD_PATH&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This test script should output (after a lot of debugging information):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
John 3:16: &lt;br /&gt;
For God so loved the world, that he gave his only begotten Son, &lt;br /&gt;
that whosoever believeth in him should not perish, but have everlasting life.&lt;br /&gt;
&lt;br /&gt;
(KJV)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Becoming root (using sudo)==&lt;br /&gt;
&lt;br /&gt;
In order to install software (including installing SWORD itself), you will need to be able to temporarily &amp;quot;become&amp;quot; root.&lt;br /&gt;
&lt;br /&gt;
Most Linux (and several *BSD) distributions include a tool called sudo than can do this very conveniently, once set up, without having to repeatedly enter a root password.  On some Linux distributions (including Ubuntu) this is already set up for you during the installation process.  On others, you will need to&lt;br /&gt;
&lt;br /&gt;
* Become root (i.e. obtain a root command shell) in some other way (log in as root, or use su, and type in the root password when prompted for it).&lt;br /&gt;
* Use the command &amp;lt;pre&amp;gt;visudo&amp;lt;/pre&amp;gt; to edit the sudo configuration file.&lt;br /&gt;
* Add a line &amp;lt;pre&amp;gt;yourusername ALL=(ALL) ALL&amp;lt;/pre&amp;gt; to the file, save the change and and exit your text editor.&lt;br /&gt;
&lt;br /&gt;
* After that, you should be able to type &amp;lt;pre&amp;gt;sudo id&amp;lt;/pre&amp;gt; to run the (harmless) command id as root.  sudo will prompt you for your own password, but if it is used more than once within a short period, will &amp;quot;remember&amp;quot; that you have already provided it and not ask for it again.  This is very convenient.&lt;br /&gt;
&lt;br /&gt;
==Installing necessary software packages==&lt;br /&gt;
&lt;br /&gt;
Starting from a fairly minimal Linux installation, a C++ compiler and several other libraries and tools must be added to the system before compiling SWORD.  These come in packages. The command to install packages varies between different Linux distributions.  A few examples follow:&lt;br /&gt;
&lt;br /&gt;
;Fedora, Red Hat Enterprise Linux, CentOS:&lt;br /&gt;
 sudo yum install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Debian, Ubuntu, Mint:&lt;br /&gt;
 sudo apt-get install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Mandriva:&lt;br /&gt;
 sudo urpmi &amp;lt;list of packages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These packaging tools will automatically install additional dependent packages, so the ones you request will work once installed.&lt;br /&gt;
&lt;br /&gt;
Package names vary too, but generally the following packages must be installed:&lt;br /&gt;
&lt;br /&gt;
* subversion (a tool used to obtain the latest SWORD source code, see below)&lt;br /&gt;
* the GNU C++ compiler, often in a package named g++ or gcc-c++&lt;br /&gt;
* make&lt;br /&gt;
* libtool &lt;br /&gt;
* icu&lt;br /&gt;
* zlib-devel (sometimes named zlib1-devel or zlib1g-dev)&lt;br /&gt;
* clucene-core-devel (sometimes named libclucene-dev)&lt;br /&gt;
* libicu-devel (sometimes named libicu-dev)&lt;br /&gt;
* libcurl-devel (named libcurl4-gnutls-dev on Debian-derived systems)&lt;br /&gt;
&lt;br /&gt;
These will generally automatically &amp;quot;pull in&amp;quot; other necessary packages such as binutils, automake and autoconf as dependencies.&lt;br /&gt;
&lt;br /&gt;
==Downloading the SWORD source code==&lt;br /&gt;
&lt;br /&gt;
The single command &amp;lt;pre&amp;gt;svn http://crosswire.org/sword/svn/trunk sword&amp;lt;/pre&amp;gt; will download the current development code of SWORD, into a directory called sword.  Once the command finishes, you should be able to do &amp;lt;pre&amp;gt;cd sword&amp;lt;/pre&amp;gt; and look at all the source code you just downloaded.&lt;br /&gt;
&lt;br /&gt;
==Compiling and installing SWORD==&lt;br /&gt;
&lt;br /&gt;
The INSTALL file contains all the details, but if all is well, after cd sword (i.e., from inside the SWORD source code directory) the command line &amp;lt;pre&amp;gt;./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make&amp;lt;/pre&amp;gt; to configure and compile SWORD.  &lt;br /&gt;
&lt;br /&gt;
If this fails, make sure all the necessary packages are installed on your system, and after that, please ask for help in the [http://crosswire.org/forums/ Crosswire forums] or on the sword-devel mailing list.&lt;br /&gt;
&lt;br /&gt;
To install SWORD, after successfully compiling SWORD, you can do &amp;lt;pre&amp;gt;sudo make install &amp;amp;&amp;amp; sudo make install_config&amp;lt;/pre&amp;gt; to install SWORD and a default configuration file on your machine.&lt;br /&gt;
&lt;br /&gt;
==Testing a new SWORD installation==&lt;br /&gt;
&lt;br /&gt;
As a very basic test, you can download and install the KJV SWORD &amp;quot;module&amp;quot; and then check that the command line bible reader diatheke can read a verse from it.    The commands to do this (using the usual bash shell) are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that displays a bunch of text, and then something very similar to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
John 3:16: &lt;br /&gt;
For God so loved the world, that he gave his only begotten Son, &lt;br /&gt;
that whosoever believeth in him should not perish, but have everlasting life.&lt;br /&gt;
&lt;br /&gt;
(KJV)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then the SWORD installation is basically working.&lt;/div&gt;</summary>
		<author><name>JMarsden</name></author>	</entry>

	<entry>
		<id>https://wiki.crosswire.org/index.php?title=Tutorial:Compiling_%26_Installing_SWORD&amp;diff=6737</id>
		<title>Tutorial:Compiling &amp; Installing SWORD</title>
		<link rel="alternate" type="text/html" href="https://wiki.crosswire.org/index.php?title=Tutorial:Compiling_%26_Installing_SWORD&amp;diff=6737"/>
				<updated>2009-09-04T05:18:32Z</updated>
		
		<summary type="html">&lt;p&gt;JMarsden: /* Test script */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Aims==&lt;br /&gt;
&lt;br /&gt;
This page is intended to help anyone who needs to get started obtaining and compiling the very latest SWORD source code, and then installing and testing it on their machine, on a Linux (or possibly other Unix-like) operating system.  &lt;br /&gt;
&lt;br /&gt;
''NOTE: This process includes making Internet connections to crosswire.org, to download SWORD source code and a sample SWORD module.''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
There are four main steps involved:&lt;br /&gt;
&lt;br /&gt;
* Installing all the necessary software packages&lt;br /&gt;
* Downloading the latest development SWORD source code&lt;br /&gt;
* Compiling and installing SWORD&lt;br /&gt;
* Testing that the new SWORD installation is basically working&lt;br /&gt;
&lt;br /&gt;
All of these can be scripted for a specific Linux distribution, and some sample scripts are provided below.  An explanation of each step is also provided, in case you want to understand what the script does (!), or there is no script for your particular Linux distribution.  &lt;br /&gt;
&lt;br /&gt;
==Scripts for some Linux distributions==&lt;br /&gt;
&lt;br /&gt;
The bash scripts below use [http://en.wikipedia.org/wiki/Sudo sudo] to become root when necessary, see below for more details on that.&lt;br /&gt;
&lt;br /&gt;
===Debian or Ubuntu===&lt;br /&gt;
&lt;br /&gt;
'''Note that official SWORD packages exist, please only use this script if you truly need to compile from source, and do NOT have the packaged version of SWORD installed.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash                                                                                                                 &lt;br /&gt;
PKGS=&amp;quot;subversion build-essential autotools-dev pkg-config libz-dev libclucene-dev libicu-dev libcurl4-gnutls--dev&amp;quot;&lt;br /&gt;
sudo apt-get install $PKGS -y&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh --enable-shared &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Fedora 10 or Fedora 11===&lt;br /&gt;
&lt;br /&gt;
'''Note that official SWORD packages exist, please only use this script if you truly need to compile from source, and do NOT have the packaged version of SWORD installed.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;subversion gcc-c++ make libtool icu zlib-devel clucene-core-devel libicu-devel libcurl-devel&amp;quot;&lt;br /&gt;
sudo yum install $PKGS -y&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh --enable-shared &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mandriva===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;colorsvn gcc-c++ make libtool icu zlib1-devel libclucene-devel libicu-devel libcurl-devel automake&amp;quot;&lt;br /&gt;
sudo urpmi $PKGS&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh --enable-shared &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Red Hat Enterprise Linux or CentOS===&lt;br /&gt;
&lt;br /&gt;
Note this script is a little more complex than most, because RHEL 5.x and CentOS 5.x lack the '''cluccene-core-devel''' library package.  This means the script must manually download a source RPM package, rebuild it and install it, before it can work with the SWORD source code.  And before it can do that, it has to make sure there is an appropriate setup for building RPMs from source in place.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;subversion gcc-c++ make libtool icu zlib-devel libicu-devel libcurl-devel findutils rpm-build&amp;quot;&lt;br /&gt;
sudo yum install $PKGS -y&lt;br /&gt;
if [ ! -f ~/.rpmmacros ]; then&lt;br /&gt;
  cat &amp;gt;&amp;gt;~/.rpmmacros &amp;lt;&amp;lt;EOF&lt;br /&gt;
%_topdir        ~/rpm&lt;br /&gt;
%_tmppath       %{_topdir}/tmp&lt;br /&gt;
EOF&lt;br /&gt;
  mkdir -p ~/rpm/{BUILD,SOURCES,SPECS,SRPMS,tmp} ~/rpm/RPMS/{athlon,i386,i486,i586,i686,noarch}&lt;br /&gt;
fi&lt;br /&gt;
rpmbuild --rebuild http://download.fedora.redhat.com/pub/fedora/linux/releases/10/Fedora/source/SRPMS/clucene-0.9.21-1.fc10.src.rpm&lt;br /&gt;
sudo rpm -Uvh `find ~/rpm/RPMS/ -type f -name &amp;quot;*clucene*rpm&amp;quot; ! -name &amp;quot;*-debuginfo*&amp;quot;`&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh --enable-shared &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Test script==&lt;br /&gt;
&lt;br /&gt;
The is a very basic test; in particular it does not check indexed search functions at all.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This test script should output (after a lot of debugging information):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
John 3:16: &lt;br /&gt;
For God so loved the world, that he gave his only begotten Son, &lt;br /&gt;
that whosoever believeth in him should not perish, but have everlasting life.&lt;br /&gt;
&lt;br /&gt;
(KJV)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Becoming root (using sudo)==&lt;br /&gt;
&lt;br /&gt;
In order to install software (including installing SWORD itself), you will need to be able to temporarily &amp;quot;become&amp;quot; root.&lt;br /&gt;
&lt;br /&gt;
Most Linux (and several *BSD) distributions include a tool called sudo than can do this very conveniently, once set up, without having to repeatedly enter a root password.  On some Linux distributions (including Ubuntu) this is already set up for you during the installation process.  On others, you will need to&lt;br /&gt;
&lt;br /&gt;
* Become root (i.e. obtain a root command shell) in some other way (log in as root, or use su, and type in the root password when prompted for it).&lt;br /&gt;
* Use the command &amp;lt;pre&amp;gt;visudo&amp;lt;/pre&amp;gt; to edit the sudo configuration file.&lt;br /&gt;
* Add a line &amp;lt;pre&amp;gt;yourusername ALL=(ALL) ALL&amp;lt;/pre&amp;gt; to the file, save the change and and exit your text editor.&lt;br /&gt;
&lt;br /&gt;
* After that, you should be able to type &amp;lt;pre&amp;gt;sudo id&amp;lt;/pre&amp;gt; to run the (harmless) command id as root.  sudo will prompt you for your own password, but if it is used more than once within a short period, will &amp;quot;remember&amp;quot; that you have already provided it and not ask for it again.  This is very convenient.&lt;br /&gt;
&lt;br /&gt;
==Installing necessary software packages==&lt;br /&gt;
&lt;br /&gt;
Starting from a fairly minimal Linux installation, a C++ compiler and several other libraries and tools must be added to the system before compiling SWORD.  These come in packages. The command to install packages varies between different Linux distributions.  A few examples follow:&lt;br /&gt;
&lt;br /&gt;
;Fedora, Red Hat Enterprise Linux, CentOS:&lt;br /&gt;
 sudo yum install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Debian, Ubuntu, Mint:&lt;br /&gt;
 sudo apt-get install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Mandriva:&lt;br /&gt;
 sudo urpmi &amp;lt;list of packages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These packaging tools will automatically install additional dependent packages, so the ones you request will work once installed.&lt;br /&gt;
&lt;br /&gt;
Package names vary too, but generally the following packages must be installed:&lt;br /&gt;
&lt;br /&gt;
* subversion (a tool used to obtain the latest SWORD source code, see below)&lt;br /&gt;
* the GNU C++ compiler, often in a package named g++ or gcc-c++&lt;br /&gt;
* make&lt;br /&gt;
* libtool &lt;br /&gt;
* icu&lt;br /&gt;
* zlib-devel (sometimes named zlib1-devel or zlib1g-dev)&lt;br /&gt;
* clucene-core-devel (sometimes named libclucene-dev)&lt;br /&gt;
* libicu-devel (sometimes named libicu-dev)&lt;br /&gt;
* libcurl-devel (named libcurl4-gnutls-dev on Debian-derived systems)&lt;br /&gt;
&lt;br /&gt;
These will generally automatically &amp;quot;pull in&amp;quot; other necessary packages such as binutils, automake and autoconf as dependencies.&lt;br /&gt;
&lt;br /&gt;
==Downloading the SWORD source code==&lt;br /&gt;
&lt;br /&gt;
The single command &amp;lt;pre&amp;gt;svn http://crosswire.org/sword/svn/trunk sword&amp;lt;/pre&amp;gt; will download the current development code of SWORD, into a directory called sword.  Once the command finishes, you should be able to do &amp;lt;pre&amp;gt;cd sword&amp;lt;/pre&amp;gt; and look at all the source code you just downloaded.&lt;br /&gt;
&lt;br /&gt;
==Compiling and installing SWORD==&lt;br /&gt;
&lt;br /&gt;
The INSTALL file contains all the details, but if all is well, after cd sword (i.e., from inside the SWORD source code directory) the command line &amp;lt;pre&amp;gt;./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make&amp;lt;/pre&amp;gt; to configure and compile SWORD.  &lt;br /&gt;
&lt;br /&gt;
If this fails, make sure all the necessary packages are installed on your system, and after that, please ask for help in the [http://crosswire.org/forums/ Crosswire forums] or on the sword-devel mailing list.&lt;br /&gt;
&lt;br /&gt;
To install SWORD, after successfully compiling SWORD, you can do &amp;lt;pre&amp;gt;sudo make install &amp;amp;&amp;amp; sudo make install_config&amp;lt;/pre&amp;gt; to install SWORD and a default configuration file on your machine.&lt;br /&gt;
&lt;br /&gt;
==Testing a new SWORD installation==&lt;br /&gt;
&lt;br /&gt;
As a very basic test, you can download and install the KJV SWORD &amp;quot;module&amp;quot; and then check that the command line bible reader diatheke can read a verse from it.    The commands to do this (using the usual bash shell) are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that displays a bunch of text, and then something very similar to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
John 3:16: &lt;br /&gt;
For God so loved the world, that he gave his only begotten Son, &lt;br /&gt;
that whosoever believeth in him should not perish, but have everlasting life.&lt;br /&gt;
&lt;br /&gt;
(KJV)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then the SWORD installation is basically working.&lt;/div&gt;</summary>
		<author><name>JMarsden</name></author>	</entry>

	<entry>
		<id>https://wiki.crosswire.org/index.php?title=Tutorial:Compiling_%26_Installing_SWORD&amp;diff=6736</id>
		<title>Tutorial:Compiling &amp; Installing SWORD</title>
		<link rel="alternate" type="text/html" href="https://wiki.crosswire.org/index.php?title=Tutorial:Compiling_%26_Installing_SWORD&amp;diff=6736"/>
				<updated>2009-09-04T05:16:34Z</updated>
		
		<summary type="html">&lt;p&gt;JMarsden: /* Red Hat Enterprise Linux or CentOS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Aims==&lt;br /&gt;
&lt;br /&gt;
This page is intended to help anyone who needs to get started obtaining and compiling the very latest SWORD source code, and then installing and testing it on their machine, on a Linux (or possibly other Unix-like) operating system.  &lt;br /&gt;
&lt;br /&gt;
''NOTE: This process includes making Internet connections to crosswire.org, to download SWORD source code and a sample SWORD module.''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
There are four main steps involved:&lt;br /&gt;
&lt;br /&gt;
* Installing all the necessary software packages&lt;br /&gt;
* Downloading the latest development SWORD source code&lt;br /&gt;
* Compiling and installing SWORD&lt;br /&gt;
* Testing that the new SWORD installation is basically working&lt;br /&gt;
&lt;br /&gt;
All of these can be scripted for a specific Linux distribution, and some sample scripts are provided below.  An explanation of each step is also provided, in case you want to understand what the script does (!), or there is no script for your particular Linux distribution.  &lt;br /&gt;
&lt;br /&gt;
==Scripts for some Linux distributions==&lt;br /&gt;
&lt;br /&gt;
The bash scripts below use [http://en.wikipedia.org/wiki/Sudo sudo] to become root when necessary, see below for more details on that.&lt;br /&gt;
&lt;br /&gt;
===Debian or Ubuntu===&lt;br /&gt;
&lt;br /&gt;
'''Note that official SWORD packages exist, please only use this script if you truly need to compile from source, and do NOT have the packaged version of SWORD installed.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash                                                                                                                 &lt;br /&gt;
PKGS=&amp;quot;subversion build-essential autotools-dev pkg-config libz-dev libclucene-dev libicu-dev libcurl4-gnutls--dev&amp;quot;&lt;br /&gt;
sudo apt-get install $PKGS -y&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh --enable-shared &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Fedora 10 or Fedora 11===&lt;br /&gt;
&lt;br /&gt;
'''Note that official SWORD packages exist, please only use this script if you truly need to compile from source, and do NOT have the packaged version of SWORD installed.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;subversion gcc-c++ make libtool icu zlib-devel clucene-core-devel libicu-devel libcurl-devel&amp;quot;&lt;br /&gt;
sudo yum install $PKGS -y&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh --enable-shared &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mandriva===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;colorsvn gcc-c++ make libtool icu zlib1-devel libclucene-devel libicu-devel libcurl-devel automake&amp;quot;&lt;br /&gt;
sudo urpmi $PKGS&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh --enable-shared &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Red Hat Enterprise Linux or CentOS===&lt;br /&gt;
&lt;br /&gt;
Note this script is a little more complex than most, because RHEL 5.x and CentOS 5.x lack the '''cluccene-core-devel''' library package.  This means the script must manually download a source RPM package, rebuild it and install it, before it can work with the SWORD source code.  And before it can do that, it has to make sure there is an appropriate setup for building RPMs from source in place.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;subversion gcc-c++ make libtool icu zlib-devel libicu-devel libcurl-devel findutils rpm-build&amp;quot;&lt;br /&gt;
sudo yum install $PKGS -y&lt;br /&gt;
if [ ! -f ~/.rpmmacros ]; then&lt;br /&gt;
  cat &amp;gt;&amp;gt;~/.rpmmacros &amp;lt;&amp;lt;EOF&lt;br /&gt;
%_topdir        ~/rpm&lt;br /&gt;
%_tmppath       %{_topdir}/tmp&lt;br /&gt;
EOF&lt;br /&gt;
  mkdir -p ~/rpm/{BUILD,SOURCES,SPECS,SRPMS,tmp} ~/rpm/RPMS/{athlon,i386,i486,i586,i686,noarch}&lt;br /&gt;
fi&lt;br /&gt;
rpmbuild --rebuild http://download.fedora.redhat.com/pub/fedora/linux/releases/10/Fedora/source/SRPMS/clucene-0.9.21-1.fc10.src.rpm&lt;br /&gt;
sudo rpm -Uvh `find ~/rpm/RPMS/ -type f -name &amp;quot;*clucene*rpm&amp;quot; ! -name &amp;quot;*-debuginfo*&amp;quot;`&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh --enable-shared &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Test script==&lt;br /&gt;
&lt;br /&gt;
The is a very basic test; in particular it does not check indexed search functions at all.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Becoming root (using sudo)==&lt;br /&gt;
&lt;br /&gt;
In order to install software (including installing SWORD itself), you will need to be able to temporarily &amp;quot;become&amp;quot; root.&lt;br /&gt;
&lt;br /&gt;
Most Linux (and several *BSD) distributions include a tool called sudo than can do this very conveniently, once set up, without having to repeatedly enter a root password.  On some Linux distributions (including Ubuntu) this is already set up for you during the installation process.  On others, you will need to&lt;br /&gt;
&lt;br /&gt;
* Become root (i.e. obtain a root command shell) in some other way (log in as root, or use su, and type in the root password when prompted for it).&lt;br /&gt;
* Use the command &amp;lt;pre&amp;gt;visudo&amp;lt;/pre&amp;gt; to edit the sudo configuration file.&lt;br /&gt;
* Add a line &amp;lt;pre&amp;gt;yourusername ALL=(ALL) ALL&amp;lt;/pre&amp;gt; to the file, save the change and and exit your text editor.&lt;br /&gt;
&lt;br /&gt;
* After that, you should be able to type &amp;lt;pre&amp;gt;sudo id&amp;lt;/pre&amp;gt; to run the (harmless) command id as root.  sudo will prompt you for your own password, but if it is used more than once within a short period, will &amp;quot;remember&amp;quot; that you have already provided it and not ask for it again.  This is very convenient.&lt;br /&gt;
&lt;br /&gt;
==Installing necessary software packages==&lt;br /&gt;
&lt;br /&gt;
Starting from a fairly minimal Linux installation, a C++ compiler and several other libraries and tools must be added to the system before compiling SWORD.  These come in packages. The command to install packages varies between different Linux distributions.  A few examples follow:&lt;br /&gt;
&lt;br /&gt;
;Fedora, Red Hat Enterprise Linux, CentOS:&lt;br /&gt;
 sudo yum install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Debian, Ubuntu, Mint:&lt;br /&gt;
 sudo apt-get install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Mandriva:&lt;br /&gt;
 sudo urpmi &amp;lt;list of packages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These packaging tools will automatically install additional dependent packages, so the ones you request will work once installed.&lt;br /&gt;
&lt;br /&gt;
Package names vary too, but generally the following packages must be installed:&lt;br /&gt;
&lt;br /&gt;
* subversion (a tool used to obtain the latest SWORD source code, see below)&lt;br /&gt;
* the GNU C++ compiler, often in a package named g++ or gcc-c++&lt;br /&gt;
* make&lt;br /&gt;
* libtool &lt;br /&gt;
* icu&lt;br /&gt;
* zlib-devel (sometimes named zlib1-devel or zlib1g-dev)&lt;br /&gt;
* clucene-core-devel (sometimes named libclucene-dev)&lt;br /&gt;
* libicu-devel (sometimes named libicu-dev)&lt;br /&gt;
* libcurl-devel (named libcurl4-gnutls-dev on Debian-derived systems)&lt;br /&gt;
&lt;br /&gt;
These will generally automatically &amp;quot;pull in&amp;quot; other necessary packages such as binutils, automake and autoconf as dependencies.&lt;br /&gt;
&lt;br /&gt;
==Downloading the SWORD source code==&lt;br /&gt;
&lt;br /&gt;
The single command &amp;lt;pre&amp;gt;svn http://crosswire.org/sword/svn/trunk sword&amp;lt;/pre&amp;gt; will download the current development code of SWORD, into a directory called sword.  Once the command finishes, you should be able to do &amp;lt;pre&amp;gt;cd sword&amp;lt;/pre&amp;gt; and look at all the source code you just downloaded.&lt;br /&gt;
&lt;br /&gt;
==Compiling and installing SWORD==&lt;br /&gt;
&lt;br /&gt;
The INSTALL file contains all the details, but if all is well, after cd sword (i.e., from inside the SWORD source code directory) the command line &amp;lt;pre&amp;gt;./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make&amp;lt;/pre&amp;gt; to configure and compile SWORD.  &lt;br /&gt;
&lt;br /&gt;
If this fails, make sure all the necessary packages are installed on your system, and after that, please ask for help in the [http://crosswire.org/forums/ Crosswire forums] or on the sword-devel mailing list.&lt;br /&gt;
&lt;br /&gt;
To install SWORD, after successfully compiling SWORD, you can do &amp;lt;pre&amp;gt;sudo make install &amp;amp;&amp;amp; sudo make install_config&amp;lt;/pre&amp;gt; to install SWORD and a default configuration file on your machine.&lt;br /&gt;
&lt;br /&gt;
==Testing a new SWORD installation==&lt;br /&gt;
&lt;br /&gt;
As a very basic test, you can download and install the KJV SWORD &amp;quot;module&amp;quot; and then check that the command line bible reader diatheke can read a verse from it.    The commands to do this (using the usual bash shell) are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that displays a bunch of text, and then something very similar to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
John 3:16: &lt;br /&gt;
For God so loved the world, that he gave his only begotten Son, &lt;br /&gt;
that whosoever believeth in him should not perish, but have everlasting life.&lt;br /&gt;
&lt;br /&gt;
(KJV)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then the SWORD installation is basically working.&lt;/div&gt;</summary>
		<author><name>JMarsden</name></author>	</entry>

	<entry>
		<id>https://wiki.crosswire.org/index.php?title=Tutorial:Compiling_%26_Installing_SWORD&amp;diff=6735</id>
		<title>Tutorial:Compiling &amp; Installing SWORD</title>
		<link rel="alternate" type="text/html" href="https://wiki.crosswire.org/index.php?title=Tutorial:Compiling_%26_Installing_SWORD&amp;diff=6735"/>
				<updated>2009-09-04T02:58:21Z</updated>
		
		<summary type="html">&lt;p&gt;JMarsden: /* Red Hat Enterprise Linux or CentOS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Aims==&lt;br /&gt;
&lt;br /&gt;
This page is intended to help anyone who needs to get started obtaining and compiling the very latest SWORD source code, and then installing and testing it on their machine, on a Linux (or possibly other Unix-like) operating system.  &lt;br /&gt;
&lt;br /&gt;
''NOTE: This process includes making Internet connections to crosswire.org, to download SWORD source code and a sample SWORD module.''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
There are four main steps involved:&lt;br /&gt;
&lt;br /&gt;
* Installing all the necessary software packages&lt;br /&gt;
* Downloading the latest development SWORD source code&lt;br /&gt;
* Compiling and installing SWORD&lt;br /&gt;
* Testing that the new SWORD installation is basically working&lt;br /&gt;
&lt;br /&gt;
All of these can be scripted for a specific Linux distribution, and some sample scripts are provided below.  An explanation of each step is also provided, in case you want to understand what the script does (!), or there is no script for your particular Linux distribution.  &lt;br /&gt;
&lt;br /&gt;
==Scripts for some Linux distributions==&lt;br /&gt;
&lt;br /&gt;
The bash scripts below use [http://en.wikipedia.org/wiki/Sudo sudo] to become root when necessary, see below for more details on that.&lt;br /&gt;
&lt;br /&gt;
===Debian or Ubuntu===&lt;br /&gt;
&lt;br /&gt;
'''Note that official SWORD packages exist, please only use this script if you truly need to compile from source, and do NOT have the packaged version of SWORD installed.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash                                                                                                                 &lt;br /&gt;
PKGS=&amp;quot;subversion build-essential autotools-dev pkg-config libz-dev libclucene-dev libicu-dev libcurl4-gnutls--dev&amp;quot;&lt;br /&gt;
sudo apt-get install $PKGS -y&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh --enable-shared &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Fedora 10 or Fedora 11===&lt;br /&gt;
&lt;br /&gt;
'''Note that official SWORD packages exist, please only use this script if you truly need to compile from source, and do NOT have the packaged version of SWORD installed.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;subversion gcc-c++ make libtool icu zlib-devel clucene-core-devel libicu-devel libcurl-devel&amp;quot;&lt;br /&gt;
sudo yum install $PKGS -y&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh --enable-shared &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mandriva===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;colorsvn gcc-c++ make libtool icu zlib1-devel libclucene-devel libicu-devel libcurl-devel automake&amp;quot;&lt;br /&gt;
sudo urpmi $PKGS&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh --enable-shared &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Red Hat Enterprise Linux or CentOS===&lt;br /&gt;
&lt;br /&gt;
Note this script is a little more complex than most, because RHEL 5.x and CentOS 5.x lack the '''cluccene-core-devel''' library package.  This means the script must manually download a source RPM package, rebuild it and install it, before it can work with the SWORD source code.  And before it can do that, it has to make sure there is an appropriate setup for building RPMs from source in place.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;subversion gcc-c++ make libtool icu zlib-devel libicu-devel libcurl-devel&amp;quot;&lt;br /&gt;
sudo yum install $PKGS -y&lt;br /&gt;
if [ ! -f ~/.rpmmacros ]; then&lt;br /&gt;
  cat &amp;gt;&amp;gt;~/.rpmmacros &amp;lt;&amp;lt;EOF&lt;br /&gt;
%_topdir        ~/rpm&lt;br /&gt;
%_tmppath       %{_topdir}/tmp&lt;br /&gt;
EOF&lt;br /&gt;
  mkdir -p ~/rpm/{BUILD,SOURCES,SPECS,SRPMS,tmp} ~/rpm/RPMS/{athlon,i386,i486,i586,i686,noarch}&lt;br /&gt;
fi&lt;br /&gt;
rpmbuild --rebuild http://download.fedora.redhat.com/pub/fedora/linux/releases/10/Fedora/source/SRPMS/clucene-0.9.21-1.fc10.src.rpm&lt;br /&gt;
sudo rpm -Uvh `find ~/rpm/RPMS/ -type f -name &amp;quot;*clucene*rpm&amp;quot; ! -name &amp;quot;*-debuginfo*&amp;quot;`&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh --enable-shared &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Test script==&lt;br /&gt;
&lt;br /&gt;
The is a very basic test; in particular it does not check indexed search functions at all.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Becoming root (using sudo)==&lt;br /&gt;
&lt;br /&gt;
In order to install software (including installing SWORD itself), you will need to be able to temporarily &amp;quot;become&amp;quot; root.&lt;br /&gt;
&lt;br /&gt;
Most Linux (and several *BSD) distributions include a tool called sudo than can do this very conveniently, once set up, without having to repeatedly enter a root password.  On some Linux distributions (including Ubuntu) this is already set up for you during the installation process.  On others, you will need to&lt;br /&gt;
&lt;br /&gt;
* Become root (i.e. obtain a root command shell) in some other way (log in as root, or use su, and type in the root password when prompted for it).&lt;br /&gt;
* Use the command &amp;lt;pre&amp;gt;visudo&amp;lt;/pre&amp;gt; to edit the sudo configuration file.&lt;br /&gt;
* Add a line &amp;lt;pre&amp;gt;yourusername ALL=(ALL) ALL&amp;lt;/pre&amp;gt; to the file, save the change and and exit your text editor.&lt;br /&gt;
&lt;br /&gt;
* After that, you should be able to type &amp;lt;pre&amp;gt;sudo id&amp;lt;/pre&amp;gt; to run the (harmless) command id as root.  sudo will prompt you for your own password, but if it is used more than once within a short period, will &amp;quot;remember&amp;quot; that you have already provided it and not ask for it again.  This is very convenient.&lt;br /&gt;
&lt;br /&gt;
==Installing necessary software packages==&lt;br /&gt;
&lt;br /&gt;
Starting from a fairly minimal Linux installation, a C++ compiler and several other libraries and tools must be added to the system before compiling SWORD.  These come in packages. The command to install packages varies between different Linux distributions.  A few examples follow:&lt;br /&gt;
&lt;br /&gt;
;Fedora, Red Hat Enterprise Linux, CentOS:&lt;br /&gt;
 sudo yum install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Debian, Ubuntu, Mint:&lt;br /&gt;
 sudo apt-get install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Mandriva:&lt;br /&gt;
 sudo urpmi &amp;lt;list of packages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These packaging tools will automatically install additional dependent packages, so the ones you request will work once installed.&lt;br /&gt;
&lt;br /&gt;
Package names vary too, but generally the following packages must be installed:&lt;br /&gt;
&lt;br /&gt;
* subversion (a tool used to obtain the latest SWORD source code, see below)&lt;br /&gt;
* the GNU C++ compiler, often in a package named g++ or gcc-c++&lt;br /&gt;
* make&lt;br /&gt;
* libtool &lt;br /&gt;
* icu&lt;br /&gt;
* zlib-devel (sometimes named zlib1-devel or zlib1g-dev)&lt;br /&gt;
* clucene-core-devel (sometimes named libclucene-dev)&lt;br /&gt;
* libicu-devel (sometimes named libicu-dev)&lt;br /&gt;
* libcurl-devel (named libcurl4-gnutls-dev on Debian-derived systems)&lt;br /&gt;
&lt;br /&gt;
These will generally automatically &amp;quot;pull in&amp;quot; other necessary packages such as binutils, automake and autoconf as dependencies.&lt;br /&gt;
&lt;br /&gt;
==Downloading the SWORD source code==&lt;br /&gt;
&lt;br /&gt;
The single command &amp;lt;pre&amp;gt;svn http://crosswire.org/sword/svn/trunk sword&amp;lt;/pre&amp;gt; will download the current development code of SWORD, into a directory called sword.  Once the command finishes, you should be able to do &amp;lt;pre&amp;gt;cd sword&amp;lt;/pre&amp;gt; and look at all the source code you just downloaded.&lt;br /&gt;
&lt;br /&gt;
==Compiling and installing SWORD==&lt;br /&gt;
&lt;br /&gt;
The INSTALL file contains all the details, but if all is well, after cd sword (i.e., from inside the SWORD source code directory) the command line &amp;lt;pre&amp;gt;./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make&amp;lt;/pre&amp;gt; to configure and compile SWORD.  &lt;br /&gt;
&lt;br /&gt;
If this fails, make sure all the necessary packages are installed on your system, and after that, please ask for help in the [http://crosswire.org/forums/ Crosswire forums] or on the sword-devel mailing list.&lt;br /&gt;
&lt;br /&gt;
To install SWORD, after successfully compiling SWORD, you can do &amp;lt;pre&amp;gt;sudo make install &amp;amp;&amp;amp; sudo make install_config&amp;lt;/pre&amp;gt; to install SWORD and a default configuration file on your machine.&lt;br /&gt;
&lt;br /&gt;
==Testing a new SWORD installation==&lt;br /&gt;
&lt;br /&gt;
As a very basic test, you can download and install the KJV SWORD &amp;quot;module&amp;quot; and then check that the command line bible reader diatheke can read a verse from it.    The commands to do this (using the usual bash shell) are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that displays a bunch of text, and then something very similar to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
John 3:16: &lt;br /&gt;
For God so loved the world, that he gave his only begotten Son, &lt;br /&gt;
that whosoever believeth in him should not perish, but have everlasting life.&lt;br /&gt;
&lt;br /&gt;
(KJV)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then the SWORD installation is basically working.&lt;/div&gt;</summary>
		<author><name>JMarsden</name></author>	</entry>

	<entry>
		<id>https://wiki.crosswire.org/index.php?title=Tutorial:Compiling_%26_Installing_SWORD&amp;diff=6734</id>
		<title>Tutorial:Compiling &amp; Installing SWORD</title>
		<link rel="alternate" type="text/html" href="https://wiki.crosswire.org/index.php?title=Tutorial:Compiling_%26_Installing_SWORD&amp;diff=6734"/>
				<updated>2009-09-04T02:57:41Z</updated>
		
		<summary type="html">&lt;p&gt;JMarsden: /* Mandriva */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Aims==&lt;br /&gt;
&lt;br /&gt;
This page is intended to help anyone who needs to get started obtaining and compiling the very latest SWORD source code, and then installing and testing it on their machine, on a Linux (or possibly other Unix-like) operating system.  &lt;br /&gt;
&lt;br /&gt;
''NOTE: This process includes making Internet connections to crosswire.org, to download SWORD source code and a sample SWORD module.''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
There are four main steps involved:&lt;br /&gt;
&lt;br /&gt;
* Installing all the necessary software packages&lt;br /&gt;
* Downloading the latest development SWORD source code&lt;br /&gt;
* Compiling and installing SWORD&lt;br /&gt;
* Testing that the new SWORD installation is basically working&lt;br /&gt;
&lt;br /&gt;
All of these can be scripted for a specific Linux distribution, and some sample scripts are provided below.  An explanation of each step is also provided, in case you want to understand what the script does (!), or there is no script for your particular Linux distribution.  &lt;br /&gt;
&lt;br /&gt;
==Scripts for some Linux distributions==&lt;br /&gt;
&lt;br /&gt;
The bash scripts below use [http://en.wikipedia.org/wiki/Sudo sudo] to become root when necessary, see below for more details on that.&lt;br /&gt;
&lt;br /&gt;
===Debian or Ubuntu===&lt;br /&gt;
&lt;br /&gt;
'''Note that official SWORD packages exist, please only use this script if you truly need to compile from source, and do NOT have the packaged version of SWORD installed.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash                                                                                                                 &lt;br /&gt;
PKGS=&amp;quot;subversion build-essential autotools-dev pkg-config libz-dev libclucene-dev libicu-dev libcurl4-gnutls--dev&amp;quot;&lt;br /&gt;
sudo apt-get install $PKGS -y&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh --enable-shared &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Fedora 10 or Fedora 11===&lt;br /&gt;
&lt;br /&gt;
'''Note that official SWORD packages exist, please only use this script if you truly need to compile from source, and do NOT have the packaged version of SWORD installed.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;subversion gcc-c++ make libtool icu zlib-devel clucene-core-devel libicu-devel libcurl-devel&amp;quot;&lt;br /&gt;
sudo yum install $PKGS -y&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh --enable-shared &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mandriva===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;colorsvn gcc-c++ make libtool icu zlib1-devel libclucene-devel libicu-devel libcurl-devel automake&amp;quot;&lt;br /&gt;
sudo urpmi $PKGS&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh --enable-shared &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Red Hat Enterprise Linux or CentOS===&lt;br /&gt;
&lt;br /&gt;
Note this script is a little more complex than most, because RHEL 5.x and CentOS 5.x lack the '''cluccene-core-devel''' library package.  This means the script must manually download a source RPM package, rebuild it and install it, before it can work with the SWORD source code.  And before it can do that, it has to make sure there is an appropriate setup for building RPMs from source in place.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;subversion gcc-c++ make libtool icu zlib-devel libicu-devel libcurl-devel&amp;quot;&lt;br /&gt;
sudo yum install $PKGS -y&lt;br /&gt;
if [ ! -f ~/.rpmmacros ]; then&lt;br /&gt;
  cat &amp;gt;&amp;gt;~/.rpmmacros &amp;lt;&amp;lt;EOF&lt;br /&gt;
%_topdir        ~/rpm&lt;br /&gt;
%_tmppath       %{_topdir}/tmp&lt;br /&gt;
EOF&lt;br /&gt;
  mkdir -p ~/rpm/{BUILD,SOURCES,SPECS,SRPMS,tmp} ~/rpm/RPMS/{athlon,i386,i486,i586,i686,noarch}&lt;br /&gt;
fi&lt;br /&gt;
rpmbuild --rebuild http://download.fedora.redhat.com/pub/fedora/linux/releases/10/Fedora/source/SRPMS/clucene-0.9.21-1.fc10.src.rpm&lt;br /&gt;
sudo rpm -Uvh `find ~/rpm/RPMS/ -type f -name &amp;quot;*clucene*rpm&amp;quot; ! -name &amp;quot;*-debuginfo*&amp;quot;`&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Test script==&lt;br /&gt;
&lt;br /&gt;
The is a very basic test; in particular it does not check indexed search functions at all.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Becoming root (using sudo)==&lt;br /&gt;
&lt;br /&gt;
In order to install software (including installing SWORD itself), you will need to be able to temporarily &amp;quot;become&amp;quot; root.&lt;br /&gt;
&lt;br /&gt;
Most Linux (and several *BSD) distributions include a tool called sudo than can do this very conveniently, once set up, without having to repeatedly enter a root password.  On some Linux distributions (including Ubuntu) this is already set up for you during the installation process.  On others, you will need to&lt;br /&gt;
&lt;br /&gt;
* Become root (i.e. obtain a root command shell) in some other way (log in as root, or use su, and type in the root password when prompted for it).&lt;br /&gt;
* Use the command &amp;lt;pre&amp;gt;visudo&amp;lt;/pre&amp;gt; to edit the sudo configuration file.&lt;br /&gt;
* Add a line &amp;lt;pre&amp;gt;yourusername ALL=(ALL) ALL&amp;lt;/pre&amp;gt; to the file, save the change and and exit your text editor.&lt;br /&gt;
&lt;br /&gt;
* After that, you should be able to type &amp;lt;pre&amp;gt;sudo id&amp;lt;/pre&amp;gt; to run the (harmless) command id as root.  sudo will prompt you for your own password, but if it is used more than once within a short period, will &amp;quot;remember&amp;quot; that you have already provided it and not ask for it again.  This is very convenient.&lt;br /&gt;
&lt;br /&gt;
==Installing necessary software packages==&lt;br /&gt;
&lt;br /&gt;
Starting from a fairly minimal Linux installation, a C++ compiler and several other libraries and tools must be added to the system before compiling SWORD.  These come in packages. The command to install packages varies between different Linux distributions.  A few examples follow:&lt;br /&gt;
&lt;br /&gt;
;Fedora, Red Hat Enterprise Linux, CentOS:&lt;br /&gt;
 sudo yum install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Debian, Ubuntu, Mint:&lt;br /&gt;
 sudo apt-get install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Mandriva:&lt;br /&gt;
 sudo urpmi &amp;lt;list of packages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These packaging tools will automatically install additional dependent packages, so the ones you request will work once installed.&lt;br /&gt;
&lt;br /&gt;
Package names vary too, but generally the following packages must be installed:&lt;br /&gt;
&lt;br /&gt;
* subversion (a tool used to obtain the latest SWORD source code, see below)&lt;br /&gt;
* the GNU C++ compiler, often in a package named g++ or gcc-c++&lt;br /&gt;
* make&lt;br /&gt;
* libtool &lt;br /&gt;
* icu&lt;br /&gt;
* zlib-devel (sometimes named zlib1-devel or zlib1g-dev)&lt;br /&gt;
* clucene-core-devel (sometimes named libclucene-dev)&lt;br /&gt;
* libicu-devel (sometimes named libicu-dev)&lt;br /&gt;
* libcurl-devel (named libcurl4-gnutls-dev on Debian-derived systems)&lt;br /&gt;
&lt;br /&gt;
These will generally automatically &amp;quot;pull in&amp;quot; other necessary packages such as binutils, automake and autoconf as dependencies.&lt;br /&gt;
&lt;br /&gt;
==Downloading the SWORD source code==&lt;br /&gt;
&lt;br /&gt;
The single command &amp;lt;pre&amp;gt;svn http://crosswire.org/sword/svn/trunk sword&amp;lt;/pre&amp;gt; will download the current development code of SWORD, into a directory called sword.  Once the command finishes, you should be able to do &amp;lt;pre&amp;gt;cd sword&amp;lt;/pre&amp;gt; and look at all the source code you just downloaded.&lt;br /&gt;
&lt;br /&gt;
==Compiling and installing SWORD==&lt;br /&gt;
&lt;br /&gt;
The INSTALL file contains all the details, but if all is well, after cd sword (i.e., from inside the SWORD source code directory) the command line &amp;lt;pre&amp;gt;./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make&amp;lt;/pre&amp;gt; to configure and compile SWORD.  &lt;br /&gt;
&lt;br /&gt;
If this fails, make sure all the necessary packages are installed on your system, and after that, please ask for help in the [http://crosswire.org/forums/ Crosswire forums] or on the sword-devel mailing list.&lt;br /&gt;
&lt;br /&gt;
To install SWORD, after successfully compiling SWORD, you can do &amp;lt;pre&amp;gt;sudo make install &amp;amp;&amp;amp; sudo make install_config&amp;lt;/pre&amp;gt; to install SWORD and a default configuration file on your machine.&lt;br /&gt;
&lt;br /&gt;
==Testing a new SWORD installation==&lt;br /&gt;
&lt;br /&gt;
As a very basic test, you can download and install the KJV SWORD &amp;quot;module&amp;quot; and then check that the command line bible reader diatheke can read a verse from it.    The commands to do this (using the usual bash shell) are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that displays a bunch of text, and then something very similar to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
John 3:16: &lt;br /&gt;
For God so loved the world, that he gave his only begotten Son, &lt;br /&gt;
that whosoever believeth in him should not perish, but have everlasting life.&lt;br /&gt;
&lt;br /&gt;
(KJV)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then the SWORD installation is basically working.&lt;/div&gt;</summary>
		<author><name>JMarsden</name></author>	</entry>

	<entry>
		<id>https://wiki.crosswire.org/index.php?title=Tutorial:Compiling_%26_Installing_SWORD&amp;diff=6733</id>
		<title>Tutorial:Compiling &amp; Installing SWORD</title>
		<link rel="alternate" type="text/html" href="https://wiki.crosswire.org/index.php?title=Tutorial:Compiling_%26_Installing_SWORD&amp;diff=6733"/>
				<updated>2009-09-04T02:57:25Z</updated>
		
		<summary type="html">&lt;p&gt;JMarsden: /* Fedora 10 or Fedora 11 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Aims==&lt;br /&gt;
&lt;br /&gt;
This page is intended to help anyone who needs to get started obtaining and compiling the very latest SWORD source code, and then installing and testing it on their machine, on a Linux (or possibly other Unix-like) operating system.  &lt;br /&gt;
&lt;br /&gt;
''NOTE: This process includes making Internet connections to crosswire.org, to download SWORD source code and a sample SWORD module.''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
There are four main steps involved:&lt;br /&gt;
&lt;br /&gt;
* Installing all the necessary software packages&lt;br /&gt;
* Downloading the latest development SWORD source code&lt;br /&gt;
* Compiling and installing SWORD&lt;br /&gt;
* Testing that the new SWORD installation is basically working&lt;br /&gt;
&lt;br /&gt;
All of these can be scripted for a specific Linux distribution, and some sample scripts are provided below.  An explanation of each step is also provided, in case you want to understand what the script does (!), or there is no script for your particular Linux distribution.  &lt;br /&gt;
&lt;br /&gt;
==Scripts for some Linux distributions==&lt;br /&gt;
&lt;br /&gt;
The bash scripts below use [http://en.wikipedia.org/wiki/Sudo sudo] to become root when necessary, see below for more details on that.&lt;br /&gt;
&lt;br /&gt;
===Debian or Ubuntu===&lt;br /&gt;
&lt;br /&gt;
'''Note that official SWORD packages exist, please only use this script if you truly need to compile from source, and do NOT have the packaged version of SWORD installed.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash                                                                                                                 &lt;br /&gt;
PKGS=&amp;quot;subversion build-essential autotools-dev pkg-config libz-dev libclucene-dev libicu-dev libcurl4-gnutls--dev&amp;quot;&lt;br /&gt;
sudo apt-get install $PKGS -y&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh --enable-shared &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Fedora 10 or Fedora 11===&lt;br /&gt;
&lt;br /&gt;
'''Note that official SWORD packages exist, please only use this script if you truly need to compile from source, and do NOT have the packaged version of SWORD installed.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;subversion gcc-c++ make libtool icu zlib-devel clucene-core-devel libicu-devel libcurl-devel&amp;quot;&lt;br /&gt;
sudo yum install $PKGS -y&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh --enable-shared &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mandriva===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;colorsvn gcc-c++ make libtool icu zlib1-devel libclucene-devel libicu-devel libcurl-devel automake&amp;quot;&lt;br /&gt;
sudo urpmi $PKGS&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Red Hat Enterprise Linux or CentOS===&lt;br /&gt;
&lt;br /&gt;
Note this script is a little more complex than most, because RHEL 5.x and CentOS 5.x lack the '''cluccene-core-devel''' library package.  This means the script must manually download a source RPM package, rebuild it and install it, before it can work with the SWORD source code.  And before it can do that, it has to make sure there is an appropriate setup for building RPMs from source in place.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;subversion gcc-c++ make libtool icu zlib-devel libicu-devel libcurl-devel&amp;quot;&lt;br /&gt;
sudo yum install $PKGS -y&lt;br /&gt;
if [ ! -f ~/.rpmmacros ]; then&lt;br /&gt;
  cat &amp;gt;&amp;gt;~/.rpmmacros &amp;lt;&amp;lt;EOF&lt;br /&gt;
%_topdir        ~/rpm&lt;br /&gt;
%_tmppath       %{_topdir}/tmp&lt;br /&gt;
EOF&lt;br /&gt;
  mkdir -p ~/rpm/{BUILD,SOURCES,SPECS,SRPMS,tmp} ~/rpm/RPMS/{athlon,i386,i486,i586,i686,noarch}&lt;br /&gt;
fi&lt;br /&gt;
rpmbuild --rebuild http://download.fedora.redhat.com/pub/fedora/linux/releases/10/Fedora/source/SRPMS/clucene-0.9.21-1.fc10.src.rpm&lt;br /&gt;
sudo rpm -Uvh `find ~/rpm/RPMS/ -type f -name &amp;quot;*clucene*rpm&amp;quot; ! -name &amp;quot;*-debuginfo*&amp;quot;`&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Test script==&lt;br /&gt;
&lt;br /&gt;
The is a very basic test; in particular it does not check indexed search functions at all.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Becoming root (using sudo)==&lt;br /&gt;
&lt;br /&gt;
In order to install software (including installing SWORD itself), you will need to be able to temporarily &amp;quot;become&amp;quot; root.&lt;br /&gt;
&lt;br /&gt;
Most Linux (and several *BSD) distributions include a tool called sudo than can do this very conveniently, once set up, without having to repeatedly enter a root password.  On some Linux distributions (including Ubuntu) this is already set up for you during the installation process.  On others, you will need to&lt;br /&gt;
&lt;br /&gt;
* Become root (i.e. obtain a root command shell) in some other way (log in as root, or use su, and type in the root password when prompted for it).&lt;br /&gt;
* Use the command &amp;lt;pre&amp;gt;visudo&amp;lt;/pre&amp;gt; to edit the sudo configuration file.&lt;br /&gt;
* Add a line &amp;lt;pre&amp;gt;yourusername ALL=(ALL) ALL&amp;lt;/pre&amp;gt; to the file, save the change and and exit your text editor.&lt;br /&gt;
&lt;br /&gt;
* After that, you should be able to type &amp;lt;pre&amp;gt;sudo id&amp;lt;/pre&amp;gt; to run the (harmless) command id as root.  sudo will prompt you for your own password, but if it is used more than once within a short period, will &amp;quot;remember&amp;quot; that you have already provided it and not ask for it again.  This is very convenient.&lt;br /&gt;
&lt;br /&gt;
==Installing necessary software packages==&lt;br /&gt;
&lt;br /&gt;
Starting from a fairly minimal Linux installation, a C++ compiler and several other libraries and tools must be added to the system before compiling SWORD.  These come in packages. The command to install packages varies between different Linux distributions.  A few examples follow:&lt;br /&gt;
&lt;br /&gt;
;Fedora, Red Hat Enterprise Linux, CentOS:&lt;br /&gt;
 sudo yum install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Debian, Ubuntu, Mint:&lt;br /&gt;
 sudo apt-get install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Mandriva:&lt;br /&gt;
 sudo urpmi &amp;lt;list of packages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These packaging tools will automatically install additional dependent packages, so the ones you request will work once installed.&lt;br /&gt;
&lt;br /&gt;
Package names vary too, but generally the following packages must be installed:&lt;br /&gt;
&lt;br /&gt;
* subversion (a tool used to obtain the latest SWORD source code, see below)&lt;br /&gt;
* the GNU C++ compiler, often in a package named g++ or gcc-c++&lt;br /&gt;
* make&lt;br /&gt;
* libtool &lt;br /&gt;
* icu&lt;br /&gt;
* zlib-devel (sometimes named zlib1-devel or zlib1g-dev)&lt;br /&gt;
* clucene-core-devel (sometimes named libclucene-dev)&lt;br /&gt;
* libicu-devel (sometimes named libicu-dev)&lt;br /&gt;
* libcurl-devel (named libcurl4-gnutls-dev on Debian-derived systems)&lt;br /&gt;
&lt;br /&gt;
These will generally automatically &amp;quot;pull in&amp;quot; other necessary packages such as binutils, automake and autoconf as dependencies.&lt;br /&gt;
&lt;br /&gt;
==Downloading the SWORD source code==&lt;br /&gt;
&lt;br /&gt;
The single command &amp;lt;pre&amp;gt;svn http://crosswire.org/sword/svn/trunk sword&amp;lt;/pre&amp;gt; will download the current development code of SWORD, into a directory called sword.  Once the command finishes, you should be able to do &amp;lt;pre&amp;gt;cd sword&amp;lt;/pre&amp;gt; and look at all the source code you just downloaded.&lt;br /&gt;
&lt;br /&gt;
==Compiling and installing SWORD==&lt;br /&gt;
&lt;br /&gt;
The INSTALL file contains all the details, but if all is well, after cd sword (i.e., from inside the SWORD source code directory) the command line &amp;lt;pre&amp;gt;./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make&amp;lt;/pre&amp;gt; to configure and compile SWORD.  &lt;br /&gt;
&lt;br /&gt;
If this fails, make sure all the necessary packages are installed on your system, and after that, please ask for help in the [http://crosswire.org/forums/ Crosswire forums] or on the sword-devel mailing list.&lt;br /&gt;
&lt;br /&gt;
To install SWORD, after successfully compiling SWORD, you can do &amp;lt;pre&amp;gt;sudo make install &amp;amp;&amp;amp; sudo make install_config&amp;lt;/pre&amp;gt; to install SWORD and a default configuration file on your machine.&lt;br /&gt;
&lt;br /&gt;
==Testing a new SWORD installation==&lt;br /&gt;
&lt;br /&gt;
As a very basic test, you can download and install the KJV SWORD &amp;quot;module&amp;quot; and then check that the command line bible reader diatheke can read a verse from it.    The commands to do this (using the usual bash shell) are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that displays a bunch of text, and then something very similar to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
John 3:16: &lt;br /&gt;
For God so loved the world, that he gave his only begotten Son, &lt;br /&gt;
that whosoever believeth in him should not perish, but have everlasting life.&lt;br /&gt;
&lt;br /&gt;
(KJV)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then the SWORD installation is basically working.&lt;/div&gt;</summary>
		<author><name>JMarsden</name></author>	</entry>

	<entry>
		<id>https://wiki.crosswire.org/index.php?title=Tutorial:Compiling_%26_Installing_SWORD&amp;diff=6732</id>
		<title>Tutorial:Compiling &amp; Installing SWORD</title>
		<link rel="alternate" type="text/html" href="https://wiki.crosswire.org/index.php?title=Tutorial:Compiling_%26_Installing_SWORD&amp;diff=6732"/>
				<updated>2009-09-04T02:57:08Z</updated>
		
		<summary type="html">&lt;p&gt;JMarsden: /* Debian or Ubuntu */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Aims==&lt;br /&gt;
&lt;br /&gt;
This page is intended to help anyone who needs to get started obtaining and compiling the very latest SWORD source code, and then installing and testing it on their machine, on a Linux (or possibly other Unix-like) operating system.  &lt;br /&gt;
&lt;br /&gt;
''NOTE: This process includes making Internet connections to crosswire.org, to download SWORD source code and a sample SWORD module.''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
There are four main steps involved:&lt;br /&gt;
&lt;br /&gt;
* Installing all the necessary software packages&lt;br /&gt;
* Downloading the latest development SWORD source code&lt;br /&gt;
* Compiling and installing SWORD&lt;br /&gt;
* Testing that the new SWORD installation is basically working&lt;br /&gt;
&lt;br /&gt;
All of these can be scripted for a specific Linux distribution, and some sample scripts are provided below.  An explanation of each step is also provided, in case you want to understand what the script does (!), or there is no script for your particular Linux distribution.  &lt;br /&gt;
&lt;br /&gt;
==Scripts for some Linux distributions==&lt;br /&gt;
&lt;br /&gt;
The bash scripts below use [http://en.wikipedia.org/wiki/Sudo sudo] to become root when necessary, see below for more details on that.&lt;br /&gt;
&lt;br /&gt;
===Debian or Ubuntu===&lt;br /&gt;
&lt;br /&gt;
'''Note that official SWORD packages exist, please only use this script if you truly need to compile from source, and do NOT have the packaged version of SWORD installed.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash                                                                                                                 &lt;br /&gt;
PKGS=&amp;quot;subversion build-essential autotools-dev pkg-config libz-dev libclucene-dev libicu-dev libcurl4-gnutls--dev&amp;quot;&lt;br /&gt;
sudo apt-get install $PKGS -y&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh --enable-shared &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Fedora 10 or Fedora 11===&lt;br /&gt;
&lt;br /&gt;
'''Note that official SWORD packages exist, please only use this script if you truly need to compile from source, and do NOT have the packaged version of SWORD installed.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;subversion gcc-c++ make libtool icu zlib-devel clucene-core-devel libicu-devel libcurl-devel&amp;quot;&lt;br /&gt;
sudo yum install $PKGS -y&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mandriva===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;colorsvn gcc-c++ make libtool icu zlib1-devel libclucene-devel libicu-devel libcurl-devel automake&amp;quot;&lt;br /&gt;
sudo urpmi $PKGS&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Red Hat Enterprise Linux or CentOS===&lt;br /&gt;
&lt;br /&gt;
Note this script is a little more complex than most, because RHEL 5.x and CentOS 5.x lack the '''cluccene-core-devel''' library package.  This means the script must manually download a source RPM package, rebuild it and install it, before it can work with the SWORD source code.  And before it can do that, it has to make sure there is an appropriate setup for building RPMs from source in place.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;subversion gcc-c++ make libtool icu zlib-devel libicu-devel libcurl-devel&amp;quot;&lt;br /&gt;
sudo yum install $PKGS -y&lt;br /&gt;
if [ ! -f ~/.rpmmacros ]; then&lt;br /&gt;
  cat &amp;gt;&amp;gt;~/.rpmmacros &amp;lt;&amp;lt;EOF&lt;br /&gt;
%_topdir        ~/rpm&lt;br /&gt;
%_tmppath       %{_topdir}/tmp&lt;br /&gt;
EOF&lt;br /&gt;
  mkdir -p ~/rpm/{BUILD,SOURCES,SPECS,SRPMS,tmp} ~/rpm/RPMS/{athlon,i386,i486,i586,i686,noarch}&lt;br /&gt;
fi&lt;br /&gt;
rpmbuild --rebuild http://download.fedora.redhat.com/pub/fedora/linux/releases/10/Fedora/source/SRPMS/clucene-0.9.21-1.fc10.src.rpm&lt;br /&gt;
sudo rpm -Uvh `find ~/rpm/RPMS/ -type f -name &amp;quot;*clucene*rpm&amp;quot; ! -name &amp;quot;*-debuginfo*&amp;quot;`&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Test script==&lt;br /&gt;
&lt;br /&gt;
The is a very basic test; in particular it does not check indexed search functions at all.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Becoming root (using sudo)==&lt;br /&gt;
&lt;br /&gt;
In order to install software (including installing SWORD itself), you will need to be able to temporarily &amp;quot;become&amp;quot; root.&lt;br /&gt;
&lt;br /&gt;
Most Linux (and several *BSD) distributions include a tool called sudo than can do this very conveniently, once set up, without having to repeatedly enter a root password.  On some Linux distributions (including Ubuntu) this is already set up for you during the installation process.  On others, you will need to&lt;br /&gt;
&lt;br /&gt;
* Become root (i.e. obtain a root command shell) in some other way (log in as root, or use su, and type in the root password when prompted for it).&lt;br /&gt;
* Use the command &amp;lt;pre&amp;gt;visudo&amp;lt;/pre&amp;gt; to edit the sudo configuration file.&lt;br /&gt;
* Add a line &amp;lt;pre&amp;gt;yourusername ALL=(ALL) ALL&amp;lt;/pre&amp;gt; to the file, save the change and and exit your text editor.&lt;br /&gt;
&lt;br /&gt;
* After that, you should be able to type &amp;lt;pre&amp;gt;sudo id&amp;lt;/pre&amp;gt; to run the (harmless) command id as root.  sudo will prompt you for your own password, but if it is used more than once within a short period, will &amp;quot;remember&amp;quot; that you have already provided it and not ask for it again.  This is very convenient.&lt;br /&gt;
&lt;br /&gt;
==Installing necessary software packages==&lt;br /&gt;
&lt;br /&gt;
Starting from a fairly minimal Linux installation, a C++ compiler and several other libraries and tools must be added to the system before compiling SWORD.  These come in packages. The command to install packages varies between different Linux distributions.  A few examples follow:&lt;br /&gt;
&lt;br /&gt;
;Fedora, Red Hat Enterprise Linux, CentOS:&lt;br /&gt;
 sudo yum install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Debian, Ubuntu, Mint:&lt;br /&gt;
 sudo apt-get install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Mandriva:&lt;br /&gt;
 sudo urpmi &amp;lt;list of packages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These packaging tools will automatically install additional dependent packages, so the ones you request will work once installed.&lt;br /&gt;
&lt;br /&gt;
Package names vary too, but generally the following packages must be installed:&lt;br /&gt;
&lt;br /&gt;
* subversion (a tool used to obtain the latest SWORD source code, see below)&lt;br /&gt;
* the GNU C++ compiler, often in a package named g++ or gcc-c++&lt;br /&gt;
* make&lt;br /&gt;
* libtool &lt;br /&gt;
* icu&lt;br /&gt;
* zlib-devel (sometimes named zlib1-devel or zlib1g-dev)&lt;br /&gt;
* clucene-core-devel (sometimes named libclucene-dev)&lt;br /&gt;
* libicu-devel (sometimes named libicu-dev)&lt;br /&gt;
* libcurl-devel (named libcurl4-gnutls-dev on Debian-derived systems)&lt;br /&gt;
&lt;br /&gt;
These will generally automatically &amp;quot;pull in&amp;quot; other necessary packages such as binutils, automake and autoconf as dependencies.&lt;br /&gt;
&lt;br /&gt;
==Downloading the SWORD source code==&lt;br /&gt;
&lt;br /&gt;
The single command &amp;lt;pre&amp;gt;svn http://crosswire.org/sword/svn/trunk sword&amp;lt;/pre&amp;gt; will download the current development code of SWORD, into a directory called sword.  Once the command finishes, you should be able to do &amp;lt;pre&amp;gt;cd sword&amp;lt;/pre&amp;gt; and look at all the source code you just downloaded.&lt;br /&gt;
&lt;br /&gt;
==Compiling and installing SWORD==&lt;br /&gt;
&lt;br /&gt;
The INSTALL file contains all the details, but if all is well, after cd sword (i.e., from inside the SWORD source code directory) the command line &amp;lt;pre&amp;gt;./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make&amp;lt;/pre&amp;gt; to configure and compile SWORD.  &lt;br /&gt;
&lt;br /&gt;
If this fails, make sure all the necessary packages are installed on your system, and after that, please ask for help in the [http://crosswire.org/forums/ Crosswire forums] or on the sword-devel mailing list.&lt;br /&gt;
&lt;br /&gt;
To install SWORD, after successfully compiling SWORD, you can do &amp;lt;pre&amp;gt;sudo make install &amp;amp;&amp;amp; sudo make install_config&amp;lt;/pre&amp;gt; to install SWORD and a default configuration file on your machine.&lt;br /&gt;
&lt;br /&gt;
==Testing a new SWORD installation==&lt;br /&gt;
&lt;br /&gt;
As a very basic test, you can download and install the KJV SWORD &amp;quot;module&amp;quot; and then check that the command line bible reader diatheke can read a verse from it.    The commands to do this (using the usual bash shell) are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that displays a bunch of text, and then something very similar to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
John 3:16: &lt;br /&gt;
For God so loved the world, that he gave his only begotten Son, &lt;br /&gt;
that whosoever believeth in him should not perish, but have everlasting life.&lt;br /&gt;
&lt;br /&gt;
(KJV)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then the SWORD installation is basically working.&lt;/div&gt;</summary>
		<author><name>JMarsden</name></author>	</entry>

	<entry>
		<id>https://wiki.crosswire.org/index.php?title=Tutorial:Compiling_%26_Installing_SWORD&amp;diff=6731</id>
		<title>Tutorial:Compiling &amp; Installing SWORD</title>
		<link rel="alternate" type="text/html" href="https://wiki.crosswire.org/index.php?title=Tutorial:Compiling_%26_Installing_SWORD&amp;diff=6731"/>
				<updated>2009-09-04T00:49:31Z</updated>
		
		<summary type="html">&lt;p&gt;JMarsden: /* Red Hat Enterprise Linux or CentOS */ Adds code to download, rebuild and install clucene from SRPM.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Aims==&lt;br /&gt;
&lt;br /&gt;
This page is intended to help anyone who needs to get started obtaining and compiling the very latest SWORD source code, and then installing and testing it on their machine, on a Linux (or possibly other Unix-like) operating system.  &lt;br /&gt;
&lt;br /&gt;
''NOTE: This process includes making Internet connections to crosswire.org, to download SWORD source code and a sample SWORD module.''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
There are four main steps involved:&lt;br /&gt;
&lt;br /&gt;
* Installing all the necessary software packages&lt;br /&gt;
* Downloading the latest development SWORD source code&lt;br /&gt;
* Compiling and installing SWORD&lt;br /&gt;
* Testing that the new SWORD installation is basically working&lt;br /&gt;
&lt;br /&gt;
All of these can be scripted for a specific Linux distribution, and some sample scripts are provided below.  An explanation of each step is also provided, in case you want to understand what the script does (!), or there is no script for your particular Linux distribution.  &lt;br /&gt;
&lt;br /&gt;
==Scripts for some Linux distributions==&lt;br /&gt;
&lt;br /&gt;
The bash scripts below use [http://en.wikipedia.org/wiki/Sudo sudo] to become root when necessary, see below for more details on that.&lt;br /&gt;
&lt;br /&gt;
===Debian or Ubuntu===&lt;br /&gt;
&lt;br /&gt;
'''Note that official SWORD packages exist, please only use this script if you truly need to compile from source, and do NOT have the packaged version of SWORD installed.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash                                                                                                                 &lt;br /&gt;
PKGS=&amp;quot;subversion build-essential autotools-dev pkg-config libz-dev libclucene-dev libicu-dev libcurl4-gnutls--dev&amp;quot;&lt;br /&gt;
sudo apt-get install $PKGS -y&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Fedora 10 or Fedora 11===&lt;br /&gt;
&lt;br /&gt;
'''Note that official SWORD packages exist, please only use this script if you truly need to compile from source, and do NOT have the packaged version of SWORD installed.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;subversion gcc-c++ make libtool icu zlib-devel clucene-core-devel libicu-devel libcurl-devel&amp;quot;&lt;br /&gt;
sudo yum install $PKGS -y&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mandriva===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;colorsvn gcc-c++ make libtool icu zlib1-devel libclucene-devel libicu-devel libcurl-devel automake&amp;quot;&lt;br /&gt;
sudo urpmi $PKGS&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Red Hat Enterprise Linux or CentOS===&lt;br /&gt;
&lt;br /&gt;
Note this script is a little more complex than most, because RHEL 5.x and CentOS 5.x lack the '''cluccene-core-devel''' library package.  This means the script must manually download a source RPM package, rebuild it and install it, before it can work with the SWORD source code.  And before it can do that, it has to make sure there is an appropriate setup for building RPMs from source in place.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;subversion gcc-c++ make libtool icu zlib-devel libicu-devel libcurl-devel&amp;quot;&lt;br /&gt;
sudo yum install $PKGS -y&lt;br /&gt;
if [ ! -f ~/.rpmmacros ]; then&lt;br /&gt;
  cat &amp;gt;&amp;gt;~/.rpmmacros &amp;lt;&amp;lt;EOF&lt;br /&gt;
%_topdir        ~/rpm&lt;br /&gt;
%_tmppath       %{_topdir}/tmp&lt;br /&gt;
EOF&lt;br /&gt;
  mkdir -p ~/rpm/{BUILD,SOURCES,SPECS,SRPMS,tmp} ~/rpm/RPMS/{athlon,i386,i486,i586,i686,noarch}&lt;br /&gt;
fi&lt;br /&gt;
rpmbuild --rebuild http://download.fedora.redhat.com/pub/fedora/linux/releases/10/Fedora/source/SRPMS/clucene-0.9.21-1.fc10.src.rpm&lt;br /&gt;
sudo rpm -Uvh `find ~/rpm/RPMS/ -type f -name &amp;quot;*clucene*rpm&amp;quot; ! -name &amp;quot;*-debuginfo*&amp;quot;`&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Test script==&lt;br /&gt;
&lt;br /&gt;
The is a very basic test; in particular it does not check indexed search functions at all.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Becoming root (using sudo)==&lt;br /&gt;
&lt;br /&gt;
In order to install software (including installing SWORD itself), you will need to be able to temporarily &amp;quot;become&amp;quot; root.&lt;br /&gt;
&lt;br /&gt;
Most Linux (and several *BSD) distributions include a tool called sudo than can do this very conveniently, once set up, without having to repeatedly enter a root password.  On some Linux distributions (including Ubuntu) this is already set up for you during the installation process.  On others, you will need to&lt;br /&gt;
&lt;br /&gt;
* Become root (i.e. obtain a root command shell) in some other way (log in as root, or use su, and type in the root password when prompted for it).&lt;br /&gt;
* Use the command &amp;lt;pre&amp;gt;visudo&amp;lt;/pre&amp;gt; to edit the sudo configuration file.&lt;br /&gt;
* Add a line &amp;lt;pre&amp;gt;yourusername ALL=(ALL) ALL&amp;lt;/pre&amp;gt; to the file, save the change and and exit your text editor.&lt;br /&gt;
&lt;br /&gt;
* After that, you should be able to type &amp;lt;pre&amp;gt;sudo id&amp;lt;/pre&amp;gt; to run the (harmless) command id as root.  sudo will prompt you for your own password, but if it is used more than once within a short period, will &amp;quot;remember&amp;quot; that you have already provided it and not ask for it again.  This is very convenient.&lt;br /&gt;
&lt;br /&gt;
==Installing necessary software packages==&lt;br /&gt;
&lt;br /&gt;
Starting from a fairly minimal Linux installation, a C++ compiler and several other libraries and tools must be added to the system before compiling SWORD.  These come in packages. The command to install packages varies between different Linux distributions.  A few examples follow:&lt;br /&gt;
&lt;br /&gt;
;Fedora, Red Hat Enterprise Linux, CentOS:&lt;br /&gt;
 sudo yum install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Debian, Ubuntu, Mint:&lt;br /&gt;
 sudo apt-get install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Mandriva:&lt;br /&gt;
 sudo urpmi &amp;lt;list of packages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These packaging tools will automatically install additional dependent packages, so the ones you request will work once installed.&lt;br /&gt;
&lt;br /&gt;
Package names vary too, but generally the following packages must be installed:&lt;br /&gt;
&lt;br /&gt;
* subversion (a tool used to obtain the latest SWORD source code, see below)&lt;br /&gt;
* the GNU C++ compiler, often in a package named g++ or gcc-c++&lt;br /&gt;
* make&lt;br /&gt;
* libtool &lt;br /&gt;
* icu&lt;br /&gt;
* zlib-devel (sometimes named zlib1-devel or zlib1g-dev)&lt;br /&gt;
* clucene-core-devel (sometimes named libclucene-dev)&lt;br /&gt;
* libicu-devel (sometimes named libicu-dev)&lt;br /&gt;
* libcurl-devel (named libcurl4-gnutls-dev on Debian-derived systems)&lt;br /&gt;
&lt;br /&gt;
These will generally automatically &amp;quot;pull in&amp;quot; other necessary packages such as binutils, automake and autoconf as dependencies.&lt;br /&gt;
&lt;br /&gt;
==Downloading the SWORD source code==&lt;br /&gt;
&lt;br /&gt;
The single command &amp;lt;pre&amp;gt;svn http://crosswire.org/sword/svn/trunk sword&amp;lt;/pre&amp;gt; will download the current development code of SWORD, into a directory called sword.  Once the command finishes, you should be able to do &amp;lt;pre&amp;gt;cd sword&amp;lt;/pre&amp;gt; and look at all the source code you just downloaded.&lt;br /&gt;
&lt;br /&gt;
==Compiling and installing SWORD==&lt;br /&gt;
&lt;br /&gt;
The INSTALL file contains all the details, but if all is well, after cd sword (i.e., from inside the SWORD source code directory) the command line &amp;lt;pre&amp;gt;./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make&amp;lt;/pre&amp;gt; to configure and compile SWORD.  &lt;br /&gt;
&lt;br /&gt;
If this fails, make sure all the necessary packages are installed on your system, and after that, please ask for help in the [http://crosswire.org/forums/ Crosswire forums] or on the sword-devel mailing list.&lt;br /&gt;
&lt;br /&gt;
To install SWORD, after successfully compiling SWORD, you can do &amp;lt;pre&amp;gt;sudo make install &amp;amp;&amp;amp; sudo make install_config&amp;lt;/pre&amp;gt; to install SWORD and a default configuration file on your machine.&lt;br /&gt;
&lt;br /&gt;
==Testing a new SWORD installation==&lt;br /&gt;
&lt;br /&gt;
As a very basic test, you can download and install the KJV SWORD &amp;quot;module&amp;quot; and then check that the command line bible reader diatheke can read a verse from it.    The commands to do this (using the usual bash shell) are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that displays a bunch of text, and then something very similar to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
John 3:16: &lt;br /&gt;
For God so loved the world, that he gave his only begotten Son, &lt;br /&gt;
that whosoever believeth in him should not perish, but have everlasting life.&lt;br /&gt;
&lt;br /&gt;
(KJV)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then the SWORD installation is basically working.&lt;/div&gt;</summary>
		<author><name>JMarsden</name></author>	</entry>

	<entry>
		<id>https://wiki.crosswire.org/index.php?title=Tutorial:Compiling_%26_Installing_SWORD&amp;diff=6730</id>
		<title>Tutorial:Compiling &amp; Installing SWORD</title>
		<link rel="alternate" type="text/html" href="https://wiki.crosswire.org/index.php?title=Tutorial:Compiling_%26_Installing_SWORD&amp;diff=6730"/>
				<updated>2009-09-03T18:11:37Z</updated>
		
		<summary type="html">&lt;p&gt;JMarsden: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Aims==&lt;br /&gt;
&lt;br /&gt;
This page is intended to help anyone who needs to get started obtaining and compiling the very latest SWORD source code, and then installing and testing it on their machine, on a Linux (or possibly other Unix-like) operating system.  &lt;br /&gt;
&lt;br /&gt;
''NOTE: This process includes making Internet connections to crosswire.org, to download SWORD source code and a sample SWORD module.''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
There are four main steps involved:&lt;br /&gt;
&lt;br /&gt;
* Installing all the necessary software packages&lt;br /&gt;
* Downloading the latest development SWORD source code&lt;br /&gt;
* Compiling and installing SWORD&lt;br /&gt;
* Testing that the new SWORD installation is basically working&lt;br /&gt;
&lt;br /&gt;
All of these can be scripted for a specific Linux distribution, and some sample scripts are provided below.  An explanation of each step is also provided, in case you want to understand what the script does (!), or there is no script for your particular Linux distribution.  &lt;br /&gt;
&lt;br /&gt;
==Scripts for some Linux distributions==&lt;br /&gt;
&lt;br /&gt;
The bash scripts below use [http://en.wikipedia.org/wiki/Sudo sudo] to become root when necessary, see below for more details on that.&lt;br /&gt;
&lt;br /&gt;
===Debian or Ubuntu===&lt;br /&gt;
&lt;br /&gt;
'''Note that official SWORD packages exist, please only use this script if you truly need to compile from source, and do NOT have the packaged version of SWORD installed.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash                                                                                                                 &lt;br /&gt;
PKGS=&amp;quot;subversion build-essential autotools-dev pkg-config libz-dev libclucene-dev libicu-dev libcurl4-gnutls--dev&amp;quot;&lt;br /&gt;
sudo apt-get install $PKGS -y&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Fedora 10 or Fedora 11===&lt;br /&gt;
&lt;br /&gt;
'''Note that official SWORD packages exist, please only use this script if you truly need to compile from source, and do NOT have the packaged version of SWORD installed.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;subversion gcc-c++ make libtool icu zlib-devel clucene-core-devel libicu-devel libcurl-devel&amp;quot;&lt;br /&gt;
sudo yum install $PKGS -y&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mandriva===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;colorsvn gcc-c++ make libtool icu zlib1-devel libclucene-devel libicu-devel libcurl-devel automake&amp;quot;&lt;br /&gt;
sudo urpmi $PKGS&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Red Hat Enterprise Linux or CentOS===&lt;br /&gt;
&lt;br /&gt;
Note this script lacks the '''libcluccene-devel''' library package, because apparently RHEL and CentOS 5.x do not supply one.  This means you must manually download, compile and install '''clucene''' before running this script, to get a SWORD library capable of creating and searching clucene indexes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;subversion gcc-c++ make libtool icu zlib-devel clucene-core-devel libicu-devel libcurl-devel&amp;quot;&lt;br /&gt;
sudo yum install $PKGS -y&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Test script==&lt;br /&gt;
&lt;br /&gt;
The is a very basic test; in particular it does not check indexed search functions at all.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Becoming root (using sudo)==&lt;br /&gt;
&lt;br /&gt;
In order to install software (including installing SWORD itself), you will need to be able to temporarily &amp;quot;become&amp;quot; root.&lt;br /&gt;
&lt;br /&gt;
Most Linux (and several *BSD) distributions include a tool called sudo than can do this very conveniently, once set up, without having to repeatedly enter a root password.  On some Linux distributions (including Ubuntu) this is already set up for you during the installation process.  On others, you will need to&lt;br /&gt;
&lt;br /&gt;
* Become root (i.e. obtain a root command shell) in some other way (log in as root, or use su, and type in the root password when prompted for it).&lt;br /&gt;
* Use the command &amp;lt;pre&amp;gt;visudo&amp;lt;/pre&amp;gt; to edit the sudo configuration file.&lt;br /&gt;
* Add a line &amp;lt;pre&amp;gt;yourusername ALL=(ALL) ALL&amp;lt;/pre&amp;gt; to the file, save the change and and exit your text editor.&lt;br /&gt;
&lt;br /&gt;
* After that, you should be able to type &amp;lt;pre&amp;gt;sudo id&amp;lt;/pre&amp;gt; to run the (harmless) command id as root.  sudo will prompt you for your own password, but if it is used more than once within a short period, will &amp;quot;remember&amp;quot; that you have already provided it and not ask for it again.  This is very convenient.&lt;br /&gt;
&lt;br /&gt;
==Installing necessary software packages==&lt;br /&gt;
&lt;br /&gt;
Starting from a fairly minimal Linux installation, a C++ compiler and several other libraries and tools must be added to the system before compiling SWORD.  These come in packages. The command to install packages varies between different Linux distributions.  A few examples follow:&lt;br /&gt;
&lt;br /&gt;
;Fedora, Red Hat Enterprise Linux, CentOS:&lt;br /&gt;
 sudo yum install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Debian, Ubuntu, Mint:&lt;br /&gt;
 sudo apt-get install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Mandriva:&lt;br /&gt;
 sudo urpmi &amp;lt;list of packages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These packaging tools will automatically install additional dependent packages, so the ones you request will work once installed.&lt;br /&gt;
&lt;br /&gt;
Package names vary too, but generally the following packages must be installed:&lt;br /&gt;
&lt;br /&gt;
* subversion (a tool used to obtain the latest SWORD source code, see below)&lt;br /&gt;
* the GNU C++ compiler, often in a package named g++ or gcc-c++&lt;br /&gt;
* make&lt;br /&gt;
* libtool &lt;br /&gt;
* icu&lt;br /&gt;
* zlib-devel (sometimes named zlib1-devel or zlib1g-dev)&lt;br /&gt;
* clucene-core-devel (sometimes named libclucene-dev)&lt;br /&gt;
* libicu-devel (sometimes named libicu-dev)&lt;br /&gt;
* libcurl-devel (named libcurl4-gnutls-dev on Debian-derived systems)&lt;br /&gt;
&lt;br /&gt;
These will generally automatically &amp;quot;pull in&amp;quot; other necessary packages such as binutils, automake and autoconf as dependencies.&lt;br /&gt;
&lt;br /&gt;
==Downloading the SWORD source code==&lt;br /&gt;
&lt;br /&gt;
The single command &amp;lt;pre&amp;gt;svn http://crosswire.org/sword/svn/trunk sword&amp;lt;/pre&amp;gt; will download the current development code of SWORD, into a directory called sword.  Once the command finishes, you should be able to do &amp;lt;pre&amp;gt;cd sword&amp;lt;/pre&amp;gt; and look at all the source code you just downloaded.&lt;br /&gt;
&lt;br /&gt;
==Compiling and installing SWORD==&lt;br /&gt;
&lt;br /&gt;
The INSTALL file contains all the details, but if all is well, after cd sword (i.e., from inside the SWORD source code directory) the command line &amp;lt;pre&amp;gt;./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make&amp;lt;/pre&amp;gt; to configure and compile SWORD.  &lt;br /&gt;
&lt;br /&gt;
If this fails, make sure all the necessary packages are installed on your system, and after that, please ask for help in the [http://crosswire.org/forums/ Crosswire forums] or on the sword-devel mailing list.&lt;br /&gt;
&lt;br /&gt;
To install SWORD, after successfully compiling SWORD, you can do &amp;lt;pre&amp;gt;sudo make install &amp;amp;&amp;amp; sudo make install_config&amp;lt;/pre&amp;gt; to install SWORD and a default configuration file on your machine.&lt;br /&gt;
&lt;br /&gt;
==Testing a new SWORD installation==&lt;br /&gt;
&lt;br /&gt;
As a very basic test, you can download and install the KJV SWORD &amp;quot;module&amp;quot; and then check that the command line bible reader diatheke can read a verse from it.    The commands to do this (using the usual bash shell) are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that displays a bunch of text, and then something very similar to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
John 3:16: &lt;br /&gt;
For God so loved the world, that he gave his only begotten Son, &lt;br /&gt;
that whosoever believeth in him should not perish, but have everlasting life.&lt;br /&gt;
&lt;br /&gt;
(KJV)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then the SWORD installation is basically working.&lt;/div&gt;</summary>
		<author><name>JMarsden</name></author>	</entry>

	<entry>
		<id>https://wiki.crosswire.org/index.php?title=CrossWire:Sandbox&amp;diff=6715</id>
		<title>CrossWire:Sandbox</title>
		<link rel="alternate" type="text/html" href="https://wiki.crosswire.org/index.php?title=CrossWire:Sandbox&amp;diff=6715"/>
				<updated>2009-09-03T06:47:56Z</updated>
		
		<summary type="html">&lt;p&gt;JMarsden: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Feel free to edit this page to practice your Wiki skills.  You might also consider clicking on your name at the top (if you've already created an account and logged in) to edit your personal pages.  It's a good place to practice and might develop into something useful.&lt;br /&gt;
&lt;br /&gt;
Please note, we don't look at this page to answer questions. If you want help please see our [[EnduserFAQ|Frequently Asked Questions (FAQ)]] and if that does not help then [[Help:Contents|Contact Us]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Edit your new stuff immediately below this line&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Getting Started Compiling and Installing SWORD from Source==&lt;br /&gt;
&lt;br /&gt;
==Aims==&lt;br /&gt;
&lt;br /&gt;
This page is intended to help anyone who needs to get started obtaining and compiling the very latest SWORD source code, and then installing and testing it on their machine, on a Linux (or possibly other Unix-like) operating system.  &lt;br /&gt;
&lt;br /&gt;
''NOTE: This process includes making Internet connections to crosswire.org, to download SWORD source code and a sample SWORD module.''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
There are four main steps involved:&lt;br /&gt;
&lt;br /&gt;
* Installing all the necessary software packages&lt;br /&gt;
* Downloading the latest development SWORD source code&lt;br /&gt;
* Compiling and installing SWORD&lt;br /&gt;
* Testing that the new SWORD installation is basically working&lt;br /&gt;
&lt;br /&gt;
All of these can be scripted for a specific Linux distribution, and some sample scripts are provided below.  An explanation of each step is also provided, in case you want to understand what the script does (!), or there is no script for your particular Linux distribution.  &lt;br /&gt;
&lt;br /&gt;
==Scripts for some Linux distributions==&lt;br /&gt;
&lt;br /&gt;
The bash scripts below use sudo to become root when necessary, see below for more details on that.&lt;br /&gt;
&lt;br /&gt;
===Debian or Ubuntu===&lt;br /&gt;
&lt;br /&gt;
'''Note that official SWORD packages exist, please only use this script if you truly need to compile from source, and do NOT have the packaged version of SWORD installed.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash                                                                                                                 &lt;br /&gt;
PKGS=&amp;quot;subversion build-essential autotools-dev pkg-config libz-dev libclucene-dev libicu-dev libcurl4-gnutls--dev&amp;quot;&lt;br /&gt;
sudo apt-get install $PKGS -y&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Fedora 10 or Fedora 11===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;subversion gcc-c++ make libtool icu zlib-devel clucene-core-devel libicu-devel libcurl-devel&amp;quot;&lt;br /&gt;
sudo yum install $PKGS -y&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mandriva===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;colorsvn gcc-c++ make libtool icu zlib1-devel libclucene-devel libicu-devel libcurl-devel automake&amp;quot;&lt;br /&gt;
sudo urpmi $PKGS&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Red Hat Enterprise Linux or CentOS===&lt;br /&gt;
&lt;br /&gt;
'''Note this script lacks the libcluccene-devel library package, because apparently RHEL and CentOS 5.x do not supply one.  This means you must manually download, compile and install clucene before running this script, to get a SWORD library capable of creating and searching clucene indexes.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;subversion gcc-c++ make libtool icu zlib-devel clucene-core-devel libicu-devel libcurl-devel&amp;quot;&lt;br /&gt;
sudo yum install $PKGS -y&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Test script==&lt;br /&gt;
&lt;br /&gt;
The is a very basic test; in particular it does not check indexed search functions at all.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Becoming root (using sudo)==&lt;br /&gt;
&lt;br /&gt;
In order to install software (including installing SWORD itself), you will need to be able to temporarily &amp;quot;become&amp;quot; root.&lt;br /&gt;
&lt;br /&gt;
Most Linux (and several *BSD) distributions include a tool called sudo than can do this very conveniently, once set up, without having to repeatedly enter a root password.  On some Linux distributions (including Ubuntu) this is already set up for you during the installation process.  On others, you will need to&lt;br /&gt;
&lt;br /&gt;
* Become root (i.e. obtain a root comamnd shell) in some other way (log in as root, or use su, and type in the root password when prompted for it).&lt;br /&gt;
* Ue the command &amp;lt;pre&amp;gt;visudo&amp;lt;/pre&amp;gt; to edit the sudo configuration file.&lt;br /&gt;
* Add a line &amp;lt;pre&amp;gt;yourusername ALL=(ALL) ALL&amp;lt;/pre&amp;gt; to the file, save the change and and exit your text editor.&lt;br /&gt;
&lt;br /&gt;
After that, you should be able to type &amp;lt;pre&amp;gt;sudo id&amp;lt;/pre&amp;gt; to run the (harmless) command id as root.  sudo will prompt you for your own password, but if it is used more than once within a short period, will &amp;quot;remember&amp;quot; that you have already provided it and not ask for it again.  This is very convenient.&lt;br /&gt;
&lt;br /&gt;
==Installing necessary software packages==&lt;br /&gt;
&lt;br /&gt;
Starting from a fairly minimal Linux installation, a C++ compiler and several other libraries and tools must be added to the system before compiling SWORD.  These come in packages. The command to install packages varies between different Linux distributions.  A few examples follow:&lt;br /&gt;
&lt;br /&gt;
;Fedora, Red Hat Enterprise Linux, CentOS: sudo yum install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Debian, Ubuntu, Mint: sudo apt-get install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Mandriva: sudo urpmi &amp;lt;list of packages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These packaging tools will automatically install additional dependent packages, so the ones you request will work once installed.&lt;br /&gt;
&lt;br /&gt;
Package names vary too, but generally the following packages must be installed:&lt;br /&gt;
&lt;br /&gt;
* subversion (a tool used to obtain the latest SWORD source code, see below)&lt;br /&gt;
* the GNU C++ compiler, often in a package named g++ or gcc-c++&lt;br /&gt;
* make&lt;br /&gt;
* libtool &lt;br /&gt;
* icu&lt;br /&gt;
* zlib-devel (sometimes named zlib1-devel or zlib1g-dev)&lt;br /&gt;
* clucene-core-devel (sometimes named libclucene-dev)&lt;br /&gt;
* libicu-devel (sometimes named libicu-dev)&lt;br /&gt;
* libcurl-devel (named libcurl4-gnutls-dev on Debian-derived systems)&lt;br /&gt;
&lt;br /&gt;
These will generally automatically &amp;quot;pull in&amp;quot; other necessary packages such as binutils, automake and autoconf as dependencies.&lt;br /&gt;
&lt;br /&gt;
==Downloading the SWORD source code==&lt;br /&gt;
&lt;br /&gt;
The single command &amp;lt;pre&amp;gt;svn http://crosswire.org/sword/svn/trunk sword&amp;lt;/pre&amp;gt; will download the current development code of SWORD, into a directory called sword.  Once the command finishes, you should be able to do &amp;lt;pre&amp;gt;cd sword&amp;lt;/pre&amp;gt; and look at all the source code you just downloaded.&lt;br /&gt;
&lt;br /&gt;
==Compiling and installing SWORD==&lt;br /&gt;
&lt;br /&gt;
The INSTALL file contains all the details, but if all is well, after cd sword (i.e., from inside the SWORD source code directory) the command line &amp;lt;pre&amp;gt;./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make&amp;lt;/pre&amp;gt; to configure and compile SWORD.  &lt;br /&gt;
&lt;br /&gt;
If this fails, make sure all the necessary packages are installed on your system, and after that, please ask for help in the Crosswire forums at http://crosswire.org/forums/ or on the sword-devel mailing list.&lt;br /&gt;
&lt;br /&gt;
To install SWORD,After successfully compiling SWORD, you can do &amp;lt;pre&amp;gt;sudo make install &amp;amp;&amp;amp; sudo make install_config&amp;lt;/pre&amp;gt; to install SWORD and a default configuration file on your machine.&lt;br /&gt;
&lt;br /&gt;
==Testing a new SWORD installation==&lt;br /&gt;
&lt;br /&gt;
As a very basic test, you can download and install the KJV SWORD &amp;quot;module&amp;quot; and then check that the command line bible reader diatheke can read a verse from it.    The commands to do this (using the usual bash shell) are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that displays a bunch of text, and then something very similar to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
John 3:16: &lt;br /&gt;
For God so loved the world, that he gave his only begotten Son, &lt;br /&gt;
that whosoever believeth in him should not perish, but have everlasting life.&lt;br /&gt;
&lt;br /&gt;
(KJV)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then the SWORD installation is basically working.&lt;/div&gt;</summary>
		<author><name>JMarsden</name></author>	</entry>

	<entry>
		<id>https://wiki.crosswire.org/index.php?title=CrossWire:Sandbox&amp;diff=6714</id>
		<title>CrossWire:Sandbox</title>
		<link rel="alternate" type="text/html" href="https://wiki.crosswire.org/index.php?title=CrossWire:Sandbox&amp;diff=6714"/>
				<updated>2009-09-03T06:27:58Z</updated>
		
		<summary type="html">&lt;p&gt;JMarsden: /* Aims */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Feel free to edit this page to practice your Wiki skills.  You might also consider clicking on your name at the top (if you've already created an account and logged in) to edit your personal pages.  It's a good place to practice and might develop into something useful.&lt;br /&gt;
&lt;br /&gt;
Please note, we don't look at this page to answer questions. If you want help please see our [[EnduserFAQ|Frequently Asked Questions (FAQ)]] and if that does not help then [[Help:Contents|Contact Us]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Edit your new stuff immediately below this line&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Getting Started Compiling and Installing SWORD from Source==&lt;br /&gt;
&lt;br /&gt;
==Aims==&lt;br /&gt;
&lt;br /&gt;
This page is intended to help anyone who needs to get started obtaining and compiling the very latest SWORD source code, and then installing and testing it on their machine, on a Linux (or possibly other Unix-like) operating system.  &lt;br /&gt;
&lt;br /&gt;
''NOTE: This process includes making Internet connections to crosswire.org, to download SWORD source code and a sample SWORD module.''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
There are four main steps involved:&lt;br /&gt;
&lt;br /&gt;
* Installing all the necessary software packages&lt;br /&gt;
* Downloading the latest development SWORD source code&lt;br /&gt;
* Compiling and installing SWORD&lt;br /&gt;
* Testing that the new SWORD installation is basically working&lt;br /&gt;
&lt;br /&gt;
All of these can be scripted for a specific Linux distribution, and some sample scripts are provided below.  An explanation of each step is also provided, in case you want to understand what the script does (!), or there is no script for your particular Linux distribution.  &lt;br /&gt;
&lt;br /&gt;
==Scripts for some Linux distributions==&lt;br /&gt;
&lt;br /&gt;
The bash scripts below use sudo to become root when necessary, see below for more details on that.&lt;br /&gt;
&lt;br /&gt;
===Debian or Ubuntu===&lt;br /&gt;
&lt;br /&gt;
'''Note that official SWORD packages exist, please only use this script if you truly need to compile from source, and do NOT have the packaged version of SWORD installed.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash                                                                                                                 &lt;br /&gt;
PKGS=&amp;quot;subversion build-essential autotools-dev pkg-config libz-dev libclucene-dev libicu-dev libcurl4-gnutls--dev&amp;quot;&lt;br /&gt;
sudo apt-get install $PKGS -y&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Fedora 10 or Fedora 11===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;subversion gcc-c++ make libtool icu zlib-devel clucene-core-devel libicu-devel libcurl-devel&amp;quot;&lt;br /&gt;
sudo yum install $PKGS -y&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mandriva===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;colorsvn gcc-c++ make libtool icu zlib1-devel libclucene-devel libicu-devel libcurl-devel automake&amp;quot;&lt;br /&gt;
sudo urpmi $PKGS&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Red Hat Enterprise Linux or CentOS===&lt;br /&gt;
&lt;br /&gt;
'''Note this script lacks the libcluccene-devel library package, because apparently RHEL and CentOS 5.x do not supply one.  This means you must manually download, compile and install clucene before running this script, to get a SWORD library capable of creating and searching clucene indexes.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;subversion gcc-c++ make libtool icu zlib-devel clucene-core-devel libicu-devel libcurl-devel&amp;quot;&lt;br /&gt;
sudo yum install $PKGS -y&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Test script==&lt;br /&gt;
&lt;br /&gt;
The is a very basic test; in particular it does not check indexed search functions at all.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Becoming root (using sudo)==&lt;br /&gt;
&lt;br /&gt;
In order to install software (including installing SWORD itself), you will need to be able to temporarily &amp;quot;become&amp;quot; root.&lt;br /&gt;
&lt;br /&gt;
Most Linux (and several *BSD) distributions include a tool called sudo than can do this very conveniently, once set up, without having to repeatedly enter a root password.  On some Linux distributions (including Ubuntu) this is already set up for you during the installation process.  On others, you will need to&lt;br /&gt;
&lt;br /&gt;
* Become root (i.e. obtain a root comamnd shell) in some other way (log in as root, or use su, and type in the root password when prompted for it).&lt;br /&gt;
* Ue the command &amp;lt;pre&amp;gt;visudo&amp;lt;/pre&amp;gt; to edit the sudo configuration file.&lt;br /&gt;
* Add a line &amp;lt;pre&amp;gt;yourusername ALL=(ALL) ALL&amp;lt;/pre&amp;gt; to the file, save the change and and exit your text editor.&lt;br /&gt;
&lt;br /&gt;
After that, you should be able to type &amp;lt;pre&amp;gt;sudo id&amp;lt;/pre&amp;gt; to run the (harmless) command id as root.  sudo will prompt you for your own password, but if it is used more than once within a short period, will &amp;quot;remember&amp;quot; that you have already provided it and not ask for it again.  This is very convenient.&lt;br /&gt;
&lt;br /&gt;
==Installing necessary software packages==&lt;br /&gt;
&lt;br /&gt;
Starting from a fairly minimal Linux installation, a C++ compiler and several other libraries and tools must be added to the system before compiling SWORD.  These come in packages. The command to install packages varies between different Linux distributions.  A few examples follow:&lt;br /&gt;
&lt;br /&gt;
;Fedora, Red Hat Enterprise Linux, CentOS: sudo yum install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Debian, Ubuntu, Mint: sudo apt-get install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Mandriva: sudo urpmi &amp;lt;list of packages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These packaging tools will automatically install additional dependent packages, so the ones you request will work once installed.&lt;br /&gt;
&lt;br /&gt;
Package names vary too, but generally the following packages must be installed:&lt;br /&gt;
&lt;br /&gt;
* subversion (a tool used to obtain the latest SWORD source code, see below)&lt;br /&gt;
* the GNU C++ compiler, often in a package named g++ or gcc-c++&lt;br /&gt;
* make&lt;br /&gt;
* libtool &lt;br /&gt;
* icu&lt;br /&gt;
* zlib-devel (sometimes named zlib1-devel or zlib1g-dev)&lt;br /&gt;
* clucene-core-devel (sometimes named libclucene-dev)&lt;br /&gt;
* libicu-devel (sometimes named libicu-dev)&lt;br /&gt;
* libcurl-devel (named libcurl4-gnutls-dev on Debian-derived systems)&lt;br /&gt;
&lt;br /&gt;
These will generally automatically &amp;quot;pull in&amp;quot; other necessary packages such as binutils, automake and autoconf as dependencies.&lt;br /&gt;
&lt;br /&gt;
==Download the SWORD source code==&lt;br /&gt;
&lt;br /&gt;
The single command &amp;lt;pre&amp;gt;svn http://crosswire.org/sword/svn/trunk sword&amp;lt;/pre&amp;gt; will download the current development code of SWORD, into a directory called sword.  Once the command finishes, you should be able to do &amp;lt;pre&amp;gt;cd sword&amp;lt;/pre&amp;gt; and look at all the source code you just downloaded.&lt;br /&gt;
&lt;br /&gt;
==Compile and install SWORD==&lt;br /&gt;
&lt;br /&gt;
You can read the INSTALL file for the details, but if all is well, after cd sword (so you are inside the SWORD source code directory) you can do &amp;lt;pre&amp;gt;./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make&amp;lt;/pre&amp;gt; to configure and compile SWORD.  &lt;br /&gt;
&lt;br /&gt;
If this fails, make sure you have all the necessary packages installed on your system, and after that, ask for help in the Crosswire forums at http://crosswire.org/forums/ .&lt;br /&gt;
&lt;br /&gt;
To install SWORD,After successfully compiling SWORD, you can do &amp;lt;pre&amp;gt;sudo make install &amp;amp;&amp;amp; sudo make install_config&amp;lt;/pre&amp;gt; to install SWORD and a default configuration file on your machine.&lt;br /&gt;
&lt;br /&gt;
==Testing a new SWORD installation==&lt;br /&gt;
&lt;br /&gt;
As a very basic test, you can download and install the KJV SWORD &amp;quot;module&amp;quot; and then check that the command line bible reader diatheke can read a verse from it.    The commands to do this (using the usual bash shell) are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that displays a bunch of text, and then something very similar to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
John 3:16: &lt;br /&gt;
For God so loved the world, that he gave his only begotten Son, &lt;br /&gt;
that whosoever believeth in him should not perish, but have everlasting life.&lt;br /&gt;
&lt;br /&gt;
(KJV)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then the SWORD installation is basically working.&lt;/div&gt;</summary>
		<author><name>JMarsden</name></author>	</entry>

	<entry>
		<id>https://wiki.crosswire.org/index.php?title=CrossWire:Sandbox&amp;diff=6713</id>
		<title>CrossWire:Sandbox</title>
		<link rel="alternate" type="text/html" href="https://wiki.crosswire.org/index.php?title=CrossWire:Sandbox&amp;diff=6713"/>
				<updated>2009-09-03T06:27:26Z</updated>
		
		<summary type="html">&lt;p&gt;JMarsden: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Feel free to edit this page to practice your Wiki skills.  You might also consider clicking on your name at the top (if you've already created an account and logged in) to edit your personal pages.  It's a good place to practice and might develop into something useful.&lt;br /&gt;
&lt;br /&gt;
Please note, we don't look at this page to answer questions. If you want help please see our [[EnduserFAQ|Frequently Asked Questions (FAQ)]] and if that does not help then [[Help:Contents|Contact Us]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Edit your new stuff immediately below this line&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Getting Started Compiling and Installing SWORD from Source==&lt;br /&gt;
&lt;br /&gt;
==Aims==&lt;br /&gt;
&lt;br /&gt;
This page is intended to help anyone who needs to get started obtaining and compiling the very latest SWORD source code, and then installing and testing it on their machine, on a Linux (or possibly other Unix-like) operating system.  &lt;br /&gt;
&lt;br /&gt;
''NOTE: This process includes making Internet connections to crosswire.org, to download source code and a sample SWORD module.''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
There are four main steps involved:&lt;br /&gt;
&lt;br /&gt;
* Installing all the necessary software packages&lt;br /&gt;
* Downloading the latest development SWORD source code&lt;br /&gt;
* Compiling and installing SWORD&lt;br /&gt;
* Testing that the new SWORD installation is basically working&lt;br /&gt;
&lt;br /&gt;
All of these can be scripted for a specific Linux distribution, and some sample scripts are provided below.  An explanation of each step is also provided, in case you want to understand what the script does (!), or there is no script for your particular Linux distribution.  &lt;br /&gt;
&lt;br /&gt;
==Scripts for some Linux distributions==&lt;br /&gt;
&lt;br /&gt;
The bash scripts below use sudo to become root when necessary, see below for more details on that.&lt;br /&gt;
&lt;br /&gt;
===Debian or Ubuntu===&lt;br /&gt;
&lt;br /&gt;
'''Note that official SWORD packages exist, please only use this script if you truly need to compile from source, and do NOT have the packaged version of SWORD installed.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash                                                                                                                 &lt;br /&gt;
PKGS=&amp;quot;subversion build-essential autotools-dev pkg-config libz-dev libclucene-dev libicu-dev libcurl4-gnutls--dev&amp;quot;&lt;br /&gt;
sudo apt-get install $PKGS -y&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Fedora 10 or Fedora 11===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;subversion gcc-c++ make libtool icu zlib-devel clucene-core-devel libicu-devel libcurl-devel&amp;quot;&lt;br /&gt;
sudo yum install $PKGS -y&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mandriva===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;colorsvn gcc-c++ make libtool icu zlib1-devel libclucene-devel libicu-devel libcurl-devel automake&amp;quot;&lt;br /&gt;
sudo urpmi $PKGS&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Red Hat Enterprise Linux or CentOS===&lt;br /&gt;
&lt;br /&gt;
'''Note this script lacks the libcluccene-devel library package, because apparently RHEL and CentOS 5.x do not supply one.  This means you must manually download, compile and install clucene before running this script, to get a SWORD library capable of creating and searching clucene indexes.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;subversion gcc-c++ make libtool icu zlib-devel clucene-core-devel libicu-devel libcurl-devel&amp;quot;&lt;br /&gt;
sudo yum install $PKGS -y&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Test script==&lt;br /&gt;
&lt;br /&gt;
The is a very basic test; in particular it does not check indexed search functions at all.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Becoming root (using sudo)==&lt;br /&gt;
&lt;br /&gt;
In order to install software (including installing SWORD itself), you will need to be able to temporarily &amp;quot;become&amp;quot; root.&lt;br /&gt;
&lt;br /&gt;
Most Linux (and several *BSD) distributions include a tool called sudo than can do this very conveniently, once set up, without having to repeatedly enter a root password.  On some Linux distributions (including Ubuntu) this is already set up for you during the installation process.  On others, you will need to&lt;br /&gt;
&lt;br /&gt;
* Become root (i.e. obtain a root comamnd shell) in some other way (log in as root, or use su, and type in the root password when prompted for it).&lt;br /&gt;
* Ue the command &amp;lt;pre&amp;gt;visudo&amp;lt;/pre&amp;gt; to edit the sudo configuration file.&lt;br /&gt;
* Add a line &amp;lt;pre&amp;gt;yourusername ALL=(ALL) ALL&amp;lt;/pre&amp;gt; to the file, save the change and and exit your text editor.&lt;br /&gt;
&lt;br /&gt;
After that, you should be able to type &amp;lt;pre&amp;gt;sudo id&amp;lt;/pre&amp;gt; to run the (harmless) command id as root.  sudo will prompt you for your own password, but if it is used more than once within a short period, will &amp;quot;remember&amp;quot; that you have already provided it and not ask for it again.  This is very convenient.&lt;br /&gt;
&lt;br /&gt;
==Installing necessary software packages==&lt;br /&gt;
&lt;br /&gt;
Starting from a fairly minimal Linux installation, a C++ compiler and several other libraries and tools must be added to the system before compiling SWORD.  These come in packages. The command to install packages varies between different Linux distributions.  A few examples follow:&lt;br /&gt;
&lt;br /&gt;
;Fedora, Red Hat Enterprise Linux, CentOS: sudo yum install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Debian, Ubuntu, Mint: sudo apt-get install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Mandriva: sudo urpmi &amp;lt;list of packages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These packaging tools will automatically install additional dependent packages, so the ones you request will work once installed.&lt;br /&gt;
&lt;br /&gt;
Package names vary too, but generally the following packages must be installed:&lt;br /&gt;
&lt;br /&gt;
* subversion (a tool used to obtain the latest SWORD source code, see below)&lt;br /&gt;
* the GNU C++ compiler, often in a package named g++ or gcc-c++&lt;br /&gt;
* make&lt;br /&gt;
* libtool &lt;br /&gt;
* icu&lt;br /&gt;
* zlib-devel (sometimes named zlib1-devel or zlib1g-dev)&lt;br /&gt;
* clucene-core-devel (sometimes named libclucene-dev)&lt;br /&gt;
* libicu-devel (sometimes named libicu-dev)&lt;br /&gt;
* libcurl-devel (named libcurl4-gnutls-dev on Debian-derived systems)&lt;br /&gt;
&lt;br /&gt;
These will generally automatically &amp;quot;pull in&amp;quot; other necessary packages such as binutils, automake and autoconf as dependencies.&lt;br /&gt;
&lt;br /&gt;
==Download the SWORD source code==&lt;br /&gt;
&lt;br /&gt;
The single command &amp;lt;pre&amp;gt;svn http://crosswire.org/sword/svn/trunk sword&amp;lt;/pre&amp;gt; will download the current development code of SWORD, into a directory called sword.  Once the command finishes, you should be able to do &amp;lt;pre&amp;gt;cd sword&amp;lt;/pre&amp;gt; and look at all the source code you just downloaded.&lt;br /&gt;
&lt;br /&gt;
==Compile and install SWORD==&lt;br /&gt;
&lt;br /&gt;
You can read the INSTALL file for the details, but if all is well, after cd sword (so you are inside the SWORD source code directory) you can do &amp;lt;pre&amp;gt;./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make&amp;lt;/pre&amp;gt; to configure and compile SWORD.  &lt;br /&gt;
&lt;br /&gt;
If this fails, make sure you have all the necessary packages installed on your system, and after that, ask for help in the Crosswire forums at http://crosswire.org/forums/ .&lt;br /&gt;
&lt;br /&gt;
To install SWORD,After successfully compiling SWORD, you can do &amp;lt;pre&amp;gt;sudo make install &amp;amp;&amp;amp; sudo make install_config&amp;lt;/pre&amp;gt; to install SWORD and a default configuration file on your machine.&lt;br /&gt;
&lt;br /&gt;
==Testing a new SWORD installation==&lt;br /&gt;
&lt;br /&gt;
As a very basic test, you can download and install the KJV SWORD &amp;quot;module&amp;quot; and then check that the command line bible reader diatheke can read a verse from it.    The commands to do this (using the usual bash shell) are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that displays a bunch of text, and then something very similar to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
John 3:16: &lt;br /&gt;
For God so loved the world, that he gave his only begotten Son, &lt;br /&gt;
that whosoever believeth in him should not perish, but have everlasting life.&lt;br /&gt;
&lt;br /&gt;
(KJV)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then the SWORD installation is basically working.&lt;/div&gt;</summary>
		<author><name>JMarsden</name></author>	</entry>

	<entry>
		<id>https://wiki.crosswire.org/index.php?title=CrossWire:Sandbox&amp;diff=6712</id>
		<title>CrossWire:Sandbox</title>
		<link rel="alternate" type="text/html" href="https://wiki.crosswire.org/index.php?title=CrossWire:Sandbox&amp;diff=6712"/>
				<updated>2009-09-03T06:25:31Z</updated>
		
		<summary type="html">&lt;p&gt;JMarsden: /* Download the SWORD source code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Feel free to edit this page to practice your Wiki skills.  You might also consider clicking on your name at the top (if you've already created an account and logged in) to edit your personal pages.  It's a good place to practice and might develop into something useful.&lt;br /&gt;
&lt;br /&gt;
Please note, we don't look at this page to answer questions. If you want help please see our [[EnduserFAQ|Frequently Asked Questions (FAQ)]] and if that does not help then [[Help:Contents|Contact Us]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Edit your new stuff immediately below this line&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Getting Started Compiling and Installing SWORD from Source==&lt;br /&gt;
&lt;br /&gt;
==Aims==&lt;br /&gt;
&lt;br /&gt;
This page is intended to help anyone who needs to get started obtaining and compiling the very latest SWORD source code, and then installing and testing it on their machine, on a Linux (or possibly other Unix-like) operating system.  &lt;br /&gt;
&lt;br /&gt;
''NOTE: This process includes making Internet connections to crosswire.org, to download source code and a sample SWORD module.''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
There are four main steps involved:&lt;br /&gt;
&lt;br /&gt;
* Installing all the necessary software packages&lt;br /&gt;
* Downloading the latest development SWORD source code&lt;br /&gt;
* Compiling and installing SWORD&lt;br /&gt;
* Testing that the new SWORD installation is basically working&lt;br /&gt;
&lt;br /&gt;
All of these can be scripted for a specific Linux distribution, and some sample scripts are provided below.  An explanation of each step is also provided, in case you want to understand what the script does (!), or there is no script for your particular Linux distribution.  &lt;br /&gt;
&lt;br /&gt;
==Scripts for some Linux distributions==&lt;br /&gt;
&lt;br /&gt;
The bash scripts below use sudo to become root when necessary, see below for more details on that.&lt;br /&gt;
&lt;br /&gt;
===Debian or Ubuntu===&lt;br /&gt;
&lt;br /&gt;
'''Note that official SWORD packages exist, please only use this script if you truly need to compile from source, and do NOT have the packaged version of SWORD installed.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash                                                                                                                 &lt;br /&gt;
PKGS=&amp;quot;subversion build-essential autotools-dev pkg-config libz-dev libclucene-dev libicu-dev libcurl4-gnutls--dev&amp;quot;&lt;br /&gt;
sudo apt-get install $PKGS -y&lt;br /&gt;
svn co https://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Fedora 10 or Fedora 11===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;subversion gcc-c++ make libtool icu zlib-devel clucene-core-devel libicu-devel libcurl-devel&amp;quot;&lt;br /&gt;
sudo yum install $PKGS -y&lt;br /&gt;
svn co https://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mandriva===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;colorsvn gcc-c++ make libtool icu zlib1-devel libclucene-devel libicu-devel libcurl-devel automake&amp;quot;&lt;br /&gt;
sudo urpmi $PKGS&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Red Hat Enterprise Linux or CentOS===&lt;br /&gt;
&lt;br /&gt;
'''Note this script lacks the libcluccene-devel library package, because apparently RHEL and CentOS 5.x do not supply one.  This means you must manually download, compile and install clucene before running this script, to get a SWORD library capable of creating and searching clucene indexes.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;subversion gcc-c++ make libtool icu zlib-devel clucene-core-devel libicu-devel libcurl-devel&amp;quot;&lt;br /&gt;
sudo yum install $PKGS -y&lt;br /&gt;
svn co https://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Test script==&lt;br /&gt;
&lt;br /&gt;
The is a very basic test; in particular it does not check indexed search functions at all.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Becoming root (using sudo)==&lt;br /&gt;
&lt;br /&gt;
In order to install software (including installing SWORD itself), you will need to be able to temporarily &amp;quot;become&amp;quot; root.&lt;br /&gt;
&lt;br /&gt;
Most Linux (and several *BSD) distributions include a tool called sudo than can do this very conveniently, once set up, without having to repeatedly enter a root password.  On some Linux distributions (including Ubuntu) this is already set up for you during the installation process.  On others, you will need to&lt;br /&gt;
&lt;br /&gt;
* Become root (i.e. obtain a root comamnd shell) in some other way (log in as root, or use su, and type in the root password when prompted for it).&lt;br /&gt;
* Ue the command &amp;lt;pre&amp;gt;visudo&amp;lt;/pre&amp;gt; to edit the sudo configuration file.&lt;br /&gt;
* Add a line &amp;lt;pre&amp;gt;yourusername ALL=(ALL) ALL&amp;lt;/pre&amp;gt; to the file, save the change and and exit your text editor.&lt;br /&gt;
&lt;br /&gt;
After that, you should be able to type &amp;lt;pre&amp;gt;sudo id&amp;lt;/pre&amp;gt; to run the (harmless) command id as root.  sudo will prompt you for your own password, but if it is used more than once within a short period, will &amp;quot;remember&amp;quot; that you have already provided it and not ask for it again.  This is very convenient.&lt;br /&gt;
&lt;br /&gt;
==Installing necessary software packages==&lt;br /&gt;
&lt;br /&gt;
Starting from a fairly minimal Linux installation, a C++ compiler and several other libraries and tools must be added to the system before compiling SWORD.  These come in packages. The command to install packages varies between different Linux distributions.  A few examples follow:&lt;br /&gt;
&lt;br /&gt;
;Fedora, Red Hat Enterprise Linux, CentOS: sudo yum install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Debian, Ubuntu, Mint: sudo apt-get install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Mandriva: sudo urpmi &amp;lt;list of packages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These packaging tools will automatically install additional dependent packages, so the ones you request will work once installed.&lt;br /&gt;
&lt;br /&gt;
Package names vary too, but generally the following packages must be installed:&lt;br /&gt;
&lt;br /&gt;
* subversion (a tool used to obtain the latest SWORD source code, see below)&lt;br /&gt;
* the GNU C++ compiler, often in a package named g++ or gcc-c++&lt;br /&gt;
* make&lt;br /&gt;
* libtool &lt;br /&gt;
* icu&lt;br /&gt;
* zlib-devel (sometimes named zlib1g-dev)&lt;br /&gt;
* clucene-core-devel (sometimes named libclucene-dev)&lt;br /&gt;
* libicu-devel (sometimes named libicu-dev)&lt;br /&gt;
* libcurl-devel (named libcurl4-gnutls-dev on Debian-derived systems)&lt;br /&gt;
&lt;br /&gt;
These will generally automatically &amp;quot;pull in&amp;quot; other necessary packages such as binutils, automake and autoconf as dependencies.&lt;br /&gt;
&lt;br /&gt;
==Download the SWORD source code==&lt;br /&gt;
&lt;br /&gt;
The single command &amp;lt;pre&amp;gt;svn http://crosswire.org/sword/svn/trunk sword&amp;lt;/pre&amp;gt; will download the current development code of SWORD, into a directory called sword.  Once the command finishes, you should be able to do &amp;lt;pre&amp;gt;cd sword&amp;lt;/pre&amp;gt; and look at all the source code you just downloaded.&lt;br /&gt;
&lt;br /&gt;
==Compile and install SWORD==&lt;br /&gt;
&lt;br /&gt;
You can read the INSTALL file for the details, but if all is well, after cd sword (so you are inside the SWORD source code directory) you can do &amp;lt;pre&amp;gt;./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make&amp;lt;/pre&amp;gt; to configure and compile SWORD.  &lt;br /&gt;
&lt;br /&gt;
If this fails, make sure you have all the necessary packages installed on your system, and after that, ask for help in the Crosswire forums at http://crosswire.org/forums/ .&lt;br /&gt;
&lt;br /&gt;
To install SWORD,After successfully compiling SWORD, you can do &amp;lt;pre&amp;gt;sudo make install &amp;amp;&amp;amp; sudo make install_config&amp;lt;/pre&amp;gt; to install SWORD and a default configuration file on your machine.&lt;br /&gt;
&lt;br /&gt;
==Testing a new SWORD installation==&lt;br /&gt;
&lt;br /&gt;
As a very basic test, you can download and install the KJV SWORD &amp;quot;module&amp;quot; and then check that the command line bible reader diatheke can read a verse from it.    The commands to do this (using the usual bash shell) are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that displays a bunch of text, and then something very similar to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
John 3:16: &lt;br /&gt;
For God so loved the world, that he gave his only begotten Son, &lt;br /&gt;
that whosoever believeth in him should not perish, but have everlasting life.&lt;br /&gt;
&lt;br /&gt;
(KJV)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then the SWORD installation is basically working.&lt;/div&gt;</summary>
		<author><name>JMarsden</name></author>	</entry>

	<entry>
		<id>https://wiki.crosswire.org/index.php?title=CrossWire:Sandbox&amp;diff=6711</id>
		<title>CrossWire:Sandbox</title>
		<link rel="alternate" type="text/html" href="https://wiki.crosswire.org/index.php?title=CrossWire:Sandbox&amp;diff=6711"/>
				<updated>2009-09-03T06:20:27Z</updated>
		
		<summary type="html">&lt;p&gt;JMarsden: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Feel free to edit this page to practice your Wiki skills.  You might also consider clicking on your name at the top (if you've already created an account and logged in) to edit your personal pages.  It's a good place to practice and might develop into something useful.&lt;br /&gt;
&lt;br /&gt;
Please note, we don't look at this page to answer questions. If you want help please see our [[EnduserFAQ|Frequently Asked Questions (FAQ)]] and if that does not help then [[Help:Contents|Contact Us]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Edit your new stuff immediately below this line&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Getting Started Compiling and Installing SWORD from Source==&lt;br /&gt;
&lt;br /&gt;
==Aims==&lt;br /&gt;
&lt;br /&gt;
This page is intended to help anyone who needs to get started obtaining and compiling the very latest SWORD source code, and then installing and testing it on their machine, on a Linux (or possibly other Unix-like) operating system.  &lt;br /&gt;
&lt;br /&gt;
''NOTE: This process includes making Internet connections to crosswire.org, to download source code and a sample SWORD module.''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
There are four main steps involved:&lt;br /&gt;
&lt;br /&gt;
* Installing all the necessary software packages&lt;br /&gt;
* Downloading the latest development SWORD source code&lt;br /&gt;
* Compiling and installing SWORD&lt;br /&gt;
* Testing that the new SWORD installation is basically working&lt;br /&gt;
&lt;br /&gt;
All of these can be scripted for a specific Linux distribution, and some sample scripts are provided below.  An explanation of each step is also provided, in case you want to understand what the script does (!), or there is no script for your particular Linux distribution.  &lt;br /&gt;
&lt;br /&gt;
==Scripts for some Linux distributions==&lt;br /&gt;
&lt;br /&gt;
The bash scripts below use sudo to become root when necessary, see below for more details on that.&lt;br /&gt;
&lt;br /&gt;
===Debian or Ubuntu===&lt;br /&gt;
&lt;br /&gt;
'''Note that official SWORD packages exist, please only use this script if you truly need to compile from source, and do NOT have the packaged version of SWORD installed.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash                                                                                                                 &lt;br /&gt;
PKGS=&amp;quot;subversion build-essential autotools-dev pkg-config libz-dev libclucene-dev libicu-dev libcurl4-gnutls--dev&amp;quot;&lt;br /&gt;
sudo apt-get install $PKGS -y&lt;br /&gt;
svn co https://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Fedora 10 or Fedora 11===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;subversion gcc-c++ make libtool icu zlib-devel clucene-core-devel libicu-devel libcurl-devel&amp;quot;&lt;br /&gt;
sudo yum install $PKGS -y&lt;br /&gt;
svn co https://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mandriva===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;colorsvn gcc-c++ make libtool icu zlib1-devel libclucene-devel libicu-devel libcurl-devel automake&amp;quot;&lt;br /&gt;
sudo urpmi $PKGS&lt;br /&gt;
svn co http://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Red Hat Enterprise Linux or CentOS===&lt;br /&gt;
&lt;br /&gt;
'''Note this script lacks the libcluccene-devel library package, because apparently RHEL and CentOS 5.x do not supply one.  This means you must manually download, compile and install clucene before running this script, to get a SWORD library capable of creating and searching clucene indexes.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;subversion gcc-c++ make libtool icu zlib-devel clucene-core-devel libicu-devel libcurl-devel&amp;quot;&lt;br /&gt;
sudo yum install $PKGS -y&lt;br /&gt;
svn co https://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Test script==&lt;br /&gt;
&lt;br /&gt;
The is a very basic test; in particular it does not check indexed search functions at all.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Becoming root (using sudo)==&lt;br /&gt;
&lt;br /&gt;
In order to install software (including installing SWORD itself), you will need to be able to temporarily &amp;quot;become&amp;quot; root.&lt;br /&gt;
&lt;br /&gt;
Most Linux (and several *BSD) distributions include a tool called sudo than can do this very conveniently, once set up, without having to repeatedly enter a root password.  On some Linux distributions (including Ubuntu) this is already set up for you during the installation process.  On others, you will need to&lt;br /&gt;
&lt;br /&gt;
* Become root (i.e. obtain a root comamnd shell) in some other way (log in as root, or use su, and type in the root password when prompted for it).&lt;br /&gt;
* Ue the command &amp;lt;pre&amp;gt;visudo&amp;lt;/pre&amp;gt; to edit the sudo configuration file.&lt;br /&gt;
* Add a line &amp;lt;pre&amp;gt;yourusername ALL=(ALL) ALL&amp;lt;/pre&amp;gt; to the file, save the change and and exit your text editor.&lt;br /&gt;
&lt;br /&gt;
After that, you should be able to type &amp;lt;pre&amp;gt;sudo id&amp;lt;/pre&amp;gt; to run the (harmless) command id as root.  sudo will prompt you for your own password, but if it is used more than once within a short period, will &amp;quot;remember&amp;quot; that you have already provided it and not ask for it again.  This is very convenient.&lt;br /&gt;
&lt;br /&gt;
==Installing necessary software packages==&lt;br /&gt;
&lt;br /&gt;
Starting from a fairly minimal Linux installation, a C++ compiler and several other libraries and tools must be added to the system before compiling SWORD.  These come in packages. The command to install packages varies between different Linux distributions.  A few examples follow:&lt;br /&gt;
&lt;br /&gt;
;Fedora, Red Hat Enterprise Linux, CentOS: sudo yum install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Debian, Ubuntu, Mint: sudo apt-get install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Mandriva: sudo urpmi &amp;lt;list of packages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These packaging tools will automatically install additional dependent packages, so the ones you request will work once installed.&lt;br /&gt;
&lt;br /&gt;
Package names vary too, but generally the following packages must be installed:&lt;br /&gt;
&lt;br /&gt;
* subversion (a tool used to obtain the latest SWORD source code, see below)&lt;br /&gt;
* the GNU C++ compiler, often in a package named g++ or gcc-c++&lt;br /&gt;
* make&lt;br /&gt;
* libtool &lt;br /&gt;
* icu&lt;br /&gt;
* zlib-devel (sometimes named zlib1g-dev)&lt;br /&gt;
* clucene-core-devel (sometimes named libclucene-dev)&lt;br /&gt;
* libicu-devel (sometimes named libicu-dev)&lt;br /&gt;
* libcurl-devel (named libcurl4-gnutls-dev on Debian-derived systems)&lt;br /&gt;
&lt;br /&gt;
These will generally automatically &amp;quot;pull in&amp;quot; other necessary packages such as binutils, automake and autoconf as dependencies.&lt;br /&gt;
&lt;br /&gt;
==Download the SWORD source code==&lt;br /&gt;
&lt;br /&gt;
The single command &amp;lt;pre&amp;gt;svn https://crosswire.org/sword/svn/trunk sword&amp;lt;/pre&amp;gt; will download the current development code of SWORD, into a directory called sword.  If it asks you about the SSL key, type p (for permanent, so it remembers the key) and press Enterm and it will continue.  Once the command finishes, you should be able to do &amp;lt;pre&amp;gt;cd sword&amp;lt;/pre&amp;gt; and look at all the source code you just downloaded.&lt;br /&gt;
&lt;br /&gt;
==Compile and install SWORD==&lt;br /&gt;
&lt;br /&gt;
You can read the INSTALL file for the details, but if all is well, after cd sword (so you are inside the SWORD source code directory) you can do &amp;lt;pre&amp;gt;./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make&amp;lt;/pre&amp;gt; to configure and compile SWORD.  &lt;br /&gt;
&lt;br /&gt;
If this fails, make sure you have all the necessary packages installed on your system, and after that, ask for help in the Crosswire forums at http://crosswire.org/forums/ .&lt;br /&gt;
&lt;br /&gt;
To install SWORD,After successfully compiling SWORD, you can do &amp;lt;pre&amp;gt;sudo make install &amp;amp;&amp;amp; sudo make install_config&amp;lt;/pre&amp;gt; to install SWORD and a default configuration file on your machine.&lt;br /&gt;
&lt;br /&gt;
==Testing a new SWORD installation==&lt;br /&gt;
&lt;br /&gt;
As a very basic test, you can download and install the KJV SWORD &amp;quot;module&amp;quot; and then check that the command line bible reader diatheke can read a verse from it.    The commands to do this (using the usual bash shell) are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that displays a bunch of text, and then something very similar to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
John 3:16: &lt;br /&gt;
For God so loved the world, that he gave his only begotten Son, &lt;br /&gt;
that whosoever believeth in him should not perish, but have everlasting life.&lt;br /&gt;
&lt;br /&gt;
(KJV)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then the SWORD installation is basically working.&lt;/div&gt;</summary>
		<author><name>JMarsden</name></author>	</entry>

	<entry>
		<id>https://wiki.crosswire.org/index.php?title=CrossWire:Sandbox&amp;diff=6710</id>
		<title>CrossWire:Sandbox</title>
		<link rel="alternate" type="text/html" href="https://wiki.crosswire.org/index.php?title=CrossWire:Sandbox&amp;diff=6710"/>
				<updated>2009-09-03T05:30:24Z</updated>
		
		<summary type="html">&lt;p&gt;JMarsden: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Feel free to edit this page to practice your Wiki skills.  You might also consider clicking on your name at the top (if you've already created an account and logged in) to edit your personal pages.  It's a good place to practice and might develop into something useful.&lt;br /&gt;
&lt;br /&gt;
Please note, we don't look at this page to answer questions. If you want help please see our [[EnduserFAQ|Frequently Asked Questions (FAQ)]] and if that does not help then [[Help:Contents|Contact Us]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Edit your new stuff immediately below this line&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Getting Started Compiling and Installing SWORD from Source==&lt;br /&gt;
&lt;br /&gt;
==Aims==&lt;br /&gt;
&lt;br /&gt;
This page is intended to help anyone who needs to get started obtaining and compiling the very latest SWORD source code, and then installing and testing it on their machine, on a Linux (or possibly other Unix-like) operating system.  &lt;br /&gt;
&lt;br /&gt;
''NOTE: This process includes making Internet connections to crosswire.org, to download source code and a sample SWORD module.''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
There are four main steps involved:&lt;br /&gt;
&lt;br /&gt;
* Installing all the necessary software packages&lt;br /&gt;
* Downloading the latest development SWORD source code&lt;br /&gt;
* Compiling and installing SWORD&lt;br /&gt;
* Testing that the new SWORD installation is basically working&lt;br /&gt;
&lt;br /&gt;
All of these can be scripted for a specific Linux distribution, and some sample scripts are provided below.  An explanation of each step is also provided, in case you want to understand what the script does (!), or there is no script for your particular Linux distribution.  &lt;br /&gt;
&lt;br /&gt;
==Scripts for some Linux distributions==&lt;br /&gt;
&lt;br /&gt;
The bash scripts below use sudo to become root when necessary, see below for more details on that.&lt;br /&gt;
&lt;br /&gt;
===Debian or Ubuntu===&lt;br /&gt;
&lt;br /&gt;
'''Note that official SWORD packages exist, please only use this script if you truly need to compile from source, and do NOT have the packaged version of SWORD installed.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash                                                                                                                 &lt;br /&gt;
PKGS=&amp;quot;subversion build-essential autotools-dev pkg-config libz-dev libclucene-dev libicu-dev libcurl4-gnutls--dev&amp;quot;&lt;br /&gt;
sudo apt-get install $PKGS -y&lt;br /&gt;
svn co https://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Fedora 10 or Fedora 11===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;subversion gcc-c++ make libtool icu zlib-devel clucene-core-devel libicu-devel libcurl-devel&amp;quot;&lt;br /&gt;
sudo yum install $PKGS -y&lt;br /&gt;
svn co https://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mandriva===&lt;br /&gt;
&lt;br /&gt;
===Red Hat Enterprise Linux or CentOS===&lt;br /&gt;
&lt;br /&gt;
'''Note this script lacks the libcluccene-devel library package, because apparently RHEL and CentOS 5.x do not supply one.  This means you must manually download, compile and install clucene before running this script, to get a SWORD library capable of creating and searching clucene indexes.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
PKGS=&amp;quot;subversion gcc-c++ make libtool icu zlib-devel clucene-core-devel libicu-devel libcurl-devel&amp;quot;&lt;br /&gt;
sudo yum install $PKGS -y&lt;br /&gt;
svn co https://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Test script==&lt;br /&gt;
&lt;br /&gt;
The is a very basic test; in particular it does not check indexed search functions at all.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Becoming root (using sudo)==&lt;br /&gt;
&lt;br /&gt;
In order to install software (including installing SWORD itself), you will need to be able to temporarily &amp;quot;become&amp;quot; root.&lt;br /&gt;
&lt;br /&gt;
Most Linux (and several *BSD) distributions include a tool called sudo than can do this very conveniently, once set up, without having to repeatedly enter a root password.  On some Linux distributions (including Ubuntu) this is already set up for you during the installation process.  On others, you will need to&lt;br /&gt;
&lt;br /&gt;
* Become root (i.e. obtain a root comamnd shell) in some other way (log in as root, or use su, and type in the root password when prompted for it).&lt;br /&gt;
* Ue the command &amp;lt;pre&amp;gt;visudo&amp;lt;/pre&amp;gt; to edit the sudo configuration file.&lt;br /&gt;
* Add a line &amp;lt;pre&amp;gt;yourusername ALL=(ALL) ALL&amp;lt;/pre&amp;gt; to the file, save the change and and exit your text editor.&lt;br /&gt;
&lt;br /&gt;
After that, you should be able to type &amp;lt;pre&amp;gt;sudo id&amp;lt;/pre&amp;gt; to run the (harmless) command id as root.  sudo will prompt you for your own password, but if it is used more than once within a short period, will &amp;quot;remember&amp;quot; that you have already provided it and not ask for it again.  This is very convenient.&lt;br /&gt;
&lt;br /&gt;
==Installing necessary software packages==&lt;br /&gt;
&lt;br /&gt;
Starting from a fairly minimal Linux installation, a C++ compiler and several other libraries and tools must be added to the system before compiling SWORD.  These come in packages. The command to install packages varies between different Linux distributions.  A few examples follow:&lt;br /&gt;
&lt;br /&gt;
;Fedora, Red Hat Enterprise Linux, CentOS: sudo yum install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Debian, Ubuntu, Mint: sudo apt-get install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Mandriva: sudo urpmi &amp;lt;list of packages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These packaging tools will automatically install additional dependent packages, so the ones you request will work once installed.&lt;br /&gt;
&lt;br /&gt;
Package names vary too, but generally the following packages must be installed:&lt;br /&gt;
&lt;br /&gt;
* subversion (a tool used to obtain the latest SWORD source code, see below)&lt;br /&gt;
* the GNU C++ compiler, often in a package named g++ or gcc-c++&lt;br /&gt;
* make&lt;br /&gt;
* libtool &lt;br /&gt;
* icu&lt;br /&gt;
* zlib-devel (sometimes named zlib1g-dev)&lt;br /&gt;
* clucene-core-devel (sometimes named libclucene-dev)&lt;br /&gt;
* libicu-devel (sometimes named libicu-dev)&lt;br /&gt;
* libcurl-devel (named libcurl4-gnutls-dev on Debian-derived systems)&lt;br /&gt;
&lt;br /&gt;
These will generally automatically &amp;quot;pull in&amp;quot; other necessary packages such as binutils, automake and autoconf as dependencies.&lt;br /&gt;
&lt;br /&gt;
==Download the SWORD source code==&lt;br /&gt;
&lt;br /&gt;
The single command &amp;lt;pre&amp;gt;svn https://crosswire.org/sword/svn/trunk sword&amp;lt;/pre&amp;gt; will download the current development code of SWORD, into a directory called sword.  If it asks you about the SSL key, type p (for permanent, so it remembers the key) and press Enterm and it will continue.  Once the command finishes, you should be able to do &amp;lt;pre&amp;gt;cd sword&amp;lt;/pre&amp;gt; and look at all the source code you just downloaded.&lt;br /&gt;
&lt;br /&gt;
==Compile and install SWORD==&lt;br /&gt;
&lt;br /&gt;
You can read the INSTALL file for the details, but if all is well, after cd sword (so you are inside the SWORD source code directory) you can do &amp;lt;pre&amp;gt;./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make&amp;lt;/pre&amp;gt; to configure and compile SWORD.  &lt;br /&gt;
&lt;br /&gt;
If this fails, make sure you have all the necessary packages installed on your system, and after that, ask for help in the Crosswire forums at http://crosswire.org/forums/ .&lt;br /&gt;
&lt;br /&gt;
To install SWORD,After successfully compiling SWORD, you can do &amp;lt;pre&amp;gt;sudo make install &amp;amp;&amp;amp; sudo make install_config&amp;lt;/pre&amp;gt; to install SWORD and a default configuration file on your machine.&lt;br /&gt;
&lt;br /&gt;
==Testing a new SWORD installation==&lt;br /&gt;
&lt;br /&gt;
As a very basic test, you can download and install the KJV SWORD &amp;quot;module&amp;quot; and then check that the command line bible reader diatheke can read a verse from it.    The commands to do this (using the usual bash shell) are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that displays a bunch of text, and then something very similar to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
John 3:16: &lt;br /&gt;
For God so loved the world, that he gave his only begotten Son, &lt;br /&gt;
that whosoever believeth in him should not perish, but have everlasting life.&lt;br /&gt;
&lt;br /&gt;
(KJV)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then the SWORD installation is basically working.&lt;/div&gt;</summary>
		<author><name>JMarsden</name></author>	</entry>

	<entry>
		<id>https://wiki.crosswire.org/index.php?title=CrossWire:Sandbox&amp;diff=6709</id>
		<title>CrossWire:Sandbox</title>
		<link rel="alternate" type="text/html" href="https://wiki.crosswire.org/index.php?title=CrossWire:Sandbox&amp;diff=6709"/>
				<updated>2009-09-03T05:23:00Z</updated>
		
		<summary type="html">&lt;p&gt;JMarsden: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Feel free to edit this page to practice your Wiki skills.  You might also consider clicking on your name at the top (if you've already created an account and logged in) to edit your personal pages.  It's a good place to practice and might develop into something useful.&lt;br /&gt;
&lt;br /&gt;
Please note, we don't look at this page to answer questions. If you want help please see our [[EnduserFAQ|Frequently Asked Questions (FAQ)]] and if that does not help then [[Help:Contents|Contact Us]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Edit your new stuff immediately below this line&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Getting Started Compiling and Installing SWORD from Source==&lt;br /&gt;
&lt;br /&gt;
==Aims==&lt;br /&gt;
&lt;br /&gt;
This page is intended to help anyone who needs to get started obtaining and compiling the very latest SWORD source code, and then installing and testing it on their machine, on a Linux (or possibly other Unix-like) operating system.  &lt;br /&gt;
&lt;br /&gt;
&amp;quot;&amp;quot;NOTE: This process includes making Internet connections to crosswire.org, to download source code and a sample SWORD module.&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
There are four main steps involved:&lt;br /&gt;
&lt;br /&gt;
* Installing all the necessary software packages&lt;br /&gt;
* Downloading the latest development SWORD source code&lt;br /&gt;
* Compiling and installing SWORD&lt;br /&gt;
* Testing that the new SWORD installation is basically working&lt;br /&gt;
&lt;br /&gt;
All of these can be scripted for a specific Linux distribution, and some sample scripts are provided below.  An explanation of each step is also provided, in case you want to understand what the script does (!), or there is no script for your particular Linux distribution.  &lt;br /&gt;
&lt;br /&gt;
==Scripts for some Linux distributions==&lt;br /&gt;
&lt;br /&gt;
The bash scripts below use sudo to become root when necessary, see below for more details on that.&lt;br /&gt;
&lt;br /&gt;
===Debian===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash                                                                                                                 &lt;br /&gt;
PKGS=&amp;quot;subversion build-essential autotools-dev pkg-config libz-dev libclucene-dev libicu-dev libcurl4-gnutls--dev&amp;quot;&lt;br /&gt;
sudo apt-get install $PKGS -y&lt;br /&gt;
svn co https://crosswire.org/svn/sword/trunk sword&lt;br /&gt;
cd sword&lt;br /&gt;
./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make &amp;amp;&amp;amp; sudo make install &amp;amp;&amp;amp; sudo make install_config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Fedora 10===&lt;br /&gt;
&lt;br /&gt;
===Fedora 11===&lt;br /&gt;
&lt;br /&gt;
===Mandriva===&lt;br /&gt;
&lt;br /&gt;
===Ubuntu===&lt;br /&gt;
&lt;br /&gt;
==Test script==&lt;br /&gt;
&lt;br /&gt;
The is a very basic test; in particular it does not check indexed search functions at all.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Becoming root (using sudo)==&lt;br /&gt;
&lt;br /&gt;
In order to install software (including installing SWORD itself), you will need to be able to temporarily &amp;quot;become&amp;quot; root.&lt;br /&gt;
&lt;br /&gt;
Most Linux (and several *BSD) distributions include a tool called sudo than can do this very conveniently, once set up, without having to repeatedly enter a root password.  On some Linux distributions (including Ubuntu) this is already set up for you during the installation process.  On others, you will need to&lt;br /&gt;
&lt;br /&gt;
* Become root (i.e. obtain a root comamnd shell) in some other way (log in as root, or use su, and type in the root password when prompted for it).&lt;br /&gt;
* Ue the command &amp;lt;pre&amp;gt;visudo&amp;lt;/pre&amp;gt; to edit the sudo configuration file.&lt;br /&gt;
* Add a line &amp;lt;pre&amp;gt;yourusername ALL=(ALL) ALL&amp;lt;/pre&amp;gt; to the file, save the change and and exit your text editor.&lt;br /&gt;
&lt;br /&gt;
After that, you should be able to type &amp;lt;pre&amp;gt;sudo id&amp;lt;/pre&amp;gt; to run the (harmless) command id as root.  sudo will prompt you for your own password, but if it is used more than once within a short period, will &amp;quot;remember&amp;quot; that you have already provided it and not ask for it again.  This is very convenient.&lt;br /&gt;
&lt;br /&gt;
==Installing necessary software packages==&lt;br /&gt;
&lt;br /&gt;
Starting from a fairly minimal Linux installation, a C++ compiler and several other libraries and tools must be added to the system before compiling SWORD.  These come in packages. The command to install packages varies between different Linux distributions.  A few examples follow:&lt;br /&gt;
&lt;br /&gt;
;Fedora, Red Hat Enterprise Linux, CentOS: sudo yum install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Debian, Ubuntu, Mint: sudo apt-get install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Mandriva: sudo urpmi &amp;lt;list of packages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These packaging tools will automatically install additional dependent packages, so the ones you request will work once installed.&lt;br /&gt;
&lt;br /&gt;
Package names vary too, but generally the following packages must be installed:&lt;br /&gt;
&lt;br /&gt;
* subversion (a tool used to obtain the latest SWORD source code, see below)&lt;br /&gt;
* the GNU C++ compiler, often in a package named g++ or gcc-c++&lt;br /&gt;
* make&lt;br /&gt;
* libtool &lt;br /&gt;
* icu&lt;br /&gt;
* zlib-devel (sometimes named zlib1g-dev)&lt;br /&gt;
* clucene-core-devel (sometimes named libclucene-dev)&lt;br /&gt;
* libicu-devel (sometimes named libicu-dev)&lt;br /&gt;
* libcurl-devel (named libcurl4-gnutls-dev on Debian-derived systems)&lt;br /&gt;
&lt;br /&gt;
These will generally automatically &amp;quot;pull in&amp;quot; other necessary packages such as binutils, automake and autoconf as dependencies.&lt;br /&gt;
&lt;br /&gt;
==Download the SWORD source code==&lt;br /&gt;
&lt;br /&gt;
The single command &amp;lt;pre&amp;gt;svn https://crosswire.org/sword/svn/trunk sword&amp;lt;/pre&amp;gt; will download the current development code of SWORD, into a directory called sword.  If it asks you about the SSL key, type p (for permanent, so it remembers the key) and press Enterm and it will continue.  Once the command finishes, you should be able to do &amp;lt;pre&amp;gt;cd sword&amp;lt;/pre&amp;gt; and look at all the source code you just downloaded.&lt;br /&gt;
&lt;br /&gt;
==Compile and install SWORD==&lt;br /&gt;
&lt;br /&gt;
You can read the INSTALL file for the details, but if all is well, after cd sword (so you are inside the SWORD source code directory) you can do &amp;lt;pre&amp;gt;./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make&amp;lt;/pre&amp;gt; to configure and compile SWORD.  &lt;br /&gt;
&lt;br /&gt;
If this fails, make sure you have all the necessary packages installed on your system, and after that, ask for help in the Crosswire forums at http://crosswire.org/forums/ .&lt;br /&gt;
&lt;br /&gt;
To install SWORD,After successfully compiling SWORD, you can do &amp;lt;pre&amp;gt;sudo make install &amp;amp;&amp;amp; sudo make install_config&amp;lt;/pre&amp;gt; to install SWORD and a default configuration file on your machine.&lt;br /&gt;
&lt;br /&gt;
==Testing a new SWORD installation==&lt;br /&gt;
&lt;br /&gt;
As a very basic test, you can download and install the KJV SWORD &amp;quot;module&amp;quot; and then check that the command line bible reader diatheke can read a verse from it.    The commands to do this (using the usual bash shell) are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that displays a bunch of text, and then something very similar to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
John 3:16: &lt;br /&gt;
For God so loved the world, that he gave his only begotten Son, &lt;br /&gt;
that whosoever believeth in him should not perish, but have everlasting life.&lt;br /&gt;
&lt;br /&gt;
(KJV)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
then the SWORD installation is basically working.&lt;/div&gt;</summary>
		<author><name>JMarsden</name></author>	</entry>

	<entry>
		<id>https://wiki.crosswire.org/index.php?title=CrossWire:Sandbox&amp;diff=6708</id>
		<title>CrossWire:Sandbox</title>
		<link rel="alternate" type="text/html" href="https://wiki.crosswire.org/index.php?title=CrossWire:Sandbox&amp;diff=6708"/>
				<updated>2009-09-03T05:04:54Z</updated>
		
		<summary type="html">&lt;p&gt;JMarsden: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Feel free to edit this page to practice your Wiki skills.  You might also consider clicking on your name at the top (if you've already created an account and logged in) to edit your personal pages.  It's a good place to practice and might develop into something useful.&lt;br /&gt;
&lt;br /&gt;
Please note, we don't look at this page to answer questions. If you want help please see our [[EnduserFAQ|Frequently Asked Questions (FAQ)]] and if that does not help then [[Help:Contents|Contact Us]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Edit your new stuff immediately below this line&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Getting Started Compiling and Installing SWORD from Source==&lt;br /&gt;
&lt;br /&gt;
==Aims==&lt;br /&gt;
&lt;br /&gt;
This page is intended to help anyone who needs to get started obtaining and compiling the very latest SWORD source code, and then installing and testing it on their machine, on a Linux (or possibly other Unix-like) operating system.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
There are four main steps involved:&lt;br /&gt;
&lt;br /&gt;
* Install all the necessary software packages&lt;br /&gt;
* Download the latest development SWORD source code&lt;br /&gt;
* Compile and install SWORD&lt;br /&gt;
* Test your new SWORD installation is working&lt;br /&gt;
&lt;br /&gt;
All of these can be scripted for a specific Linux distribution, and some sample scripts are provided below.  An explanation of each step is also provided, in case you want to understand what the script does (!), or there is no script for your particular Linux distribution.  The scripts uses sudo to become root when necessary, see below for details on that.&lt;br /&gt;
&lt;br /&gt;
==Scripts for some Linux distributions==&lt;br /&gt;
&lt;br /&gt;
===Debian===&lt;br /&gt;
&lt;br /&gt;
===Fedora 10===&lt;br /&gt;
&lt;br /&gt;
===Fedora 11===&lt;br /&gt;
&lt;br /&gt;
===Mandriva===&lt;br /&gt;
&lt;br /&gt;
===Ubuntu===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Becoming root (using sudo)==&lt;br /&gt;
&lt;br /&gt;
In order to install software (including installing SWORD itself), you will need to be able to temporarily &amp;quot;become&amp;quot; root.&lt;br /&gt;
&lt;br /&gt;
Most Linux (and several *BSD) distributions include a tool called sudo than can do this very conveniently, once set up, without having to repeatedly enter a root password.  On some Linux distributions (including Ubuntu) this is already set up for you during the installation process.  On others, you will need to&lt;br /&gt;
&lt;br /&gt;
* Become root (i.e. obtain a root comamnd shell) in some other way (log in as root, or use su, and type in the root password when prompted for it).&lt;br /&gt;
* Ue the command &amp;lt;pre&amp;gt;visudo&amp;lt;/pre&amp;gt; to edit the sudo configuration file.&lt;br /&gt;
* Add a line &amp;lt;pre&amp;gt;yourusername ALL=(ALL) ALL&amp;lt;/pre&amp;gt; to the file, save the change and and exit your text editor.&lt;br /&gt;
&lt;br /&gt;
After that, you should be able to type &amp;lt;pre&amp;gt;sudo id&amp;lt;/pre&amp;gt; to run the (harmless) command id as root.  sudo will prompt you for your own password, but if it is used more than once within a short period, will &amp;quot;remember&amp;quot; that you have already provided it and not ask for it again.  This is very convenient.&lt;br /&gt;
&lt;br /&gt;
==Install necessary software packages==&lt;br /&gt;
&lt;br /&gt;
Starting from a default fairly minimal Linux installation, you need to add a C++ compiler and several other libraries and tools to your system so that you can correctly compile SWORD.  The command to do this varies between different Linux distributions.  A few examples follow:&lt;br /&gt;
&lt;br /&gt;
;Fedora, Red Hat Enterprise Linux, CentOS: sudo yum install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Debian, Ubuntu, Mint: sudo apt-get install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Mandriva: sudo urpmi &amp;lt;list of packages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These tools will automatically install additional dependent packges, so the ones you request will work.&lt;br /&gt;
&lt;br /&gt;
Package names vary too, but you will generally need:&lt;br /&gt;
&lt;br /&gt;
* subversion (a tool for obtaining the latest SWORD source code, see below)&lt;br /&gt;
* the GNU C++ compiler, often in a package named g++ or gcc-c++&lt;br /&gt;
* make&lt;br /&gt;
* libtool &lt;br /&gt;
* icu&lt;br /&gt;
* zlib-devel (sometimes named zlib1g-dev)&lt;br /&gt;
* clucene-core-devel (sometimes named libclucene-dev)&lt;br /&gt;
* libicu-devel (sometimes named libicu-dev)&lt;br /&gt;
* libcurl-devel (named libcurl4-gnutls-dev on Debian-derived systems)&lt;br /&gt;
&lt;br /&gt;
These will generally automatically &amp;quot;pull in&amp;quot; other necessary packages such as binutils, automake and autoconf as dependencies.&lt;br /&gt;
&lt;br /&gt;
==Download the SWORD source code==&lt;br /&gt;
&lt;br /&gt;
The single command &amp;lt;pre&amp;gt;svn https://crosswire.org/sword/svn/trunk sword&amp;lt;/pre&amp;gt; will download the current development code of SWORD, into a directory called sword.  If it asks you about the SSL key, type p (for permanent, so it remembers the key) and press Enterm and it will continue.  Once the command finishes, you should be able to do &amp;lt;pre&amp;gt;cd sword&amp;lt;/pre&amp;gt; and look at all the source code you just downloaded.&lt;br /&gt;
&lt;br /&gt;
==Compile and install SWORD==&lt;br /&gt;
&lt;br /&gt;
You can read the INSTALL file for the details, but if all is well, after cd sword (so you are inside the SWORD source code directory) you can do &amp;lt;pre&amp;gt;./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make&amp;lt;/pre&amp;gt; to configure and compile SWORD.  &lt;br /&gt;
&lt;br /&gt;
If this fails, make sure you have all the necessary packages installed on your system, and after that, ask for help in the Crosswire forums at http://crosswire.org/forums/ .&lt;br /&gt;
&lt;br /&gt;
To install SWORD,After successfully compiling SWORD, you can do &amp;lt;pre&amp;gt;sudo make install &amp;amp;&amp;amp; sudo make install_config&amp;lt;/pre&amp;gt; to install SWORD and a default configuration file on your machine.&lt;br /&gt;
&lt;br /&gt;
==Test your new SWORD installation==&lt;br /&gt;
&lt;br /&gt;
As a very basic test, you can download and install the KJV SWORD &amp;quot;module&amp;quot; and then check that the command line bible reader diatheke can read a verse from it.    The commands to do this (using the usual bash shell) are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that displays a bunch of text and then something very similar to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
John 3:16: &lt;br /&gt;
For God so loved the world, that he gave his only begotten Son, &lt;br /&gt;
that whosoever believeth in him should not perish, but have everlasting life.&lt;br /&gt;
&lt;br /&gt;
(KJV)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you have successfully installed a basically working SWORD library and its utilities onto your machine.&lt;/div&gt;</summary>
		<author><name>JMarsden</name></author>	</entry>

	<entry>
		<id>https://wiki.crosswire.org/index.php?title=CrossWire:Sandbox&amp;diff=6707</id>
		<title>CrossWire:Sandbox</title>
		<link rel="alternate" type="text/html" href="https://wiki.crosswire.org/index.php?title=CrossWire:Sandbox&amp;diff=6707"/>
				<updated>2009-09-03T04:59:38Z</updated>
		
		<summary type="html">&lt;p&gt;JMarsden: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Feel free to edit this page to practice your Wiki skills.  You might also consider clicking on your name at the top (if you've already created an account and logged in) to edit your personal pages.  It's a good place to practice and might develop into something useful.&lt;br /&gt;
&lt;br /&gt;
Please note, we don't look at this page to answer questions. If you want help please see our [[EnduserFAQ|Frequently Asked Questions (FAQ)]] and if that does not help then [[Help:Contents|Contact Us]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Edit your new stuff immediately below this line&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Getting Started Compiling and Installing SWORD from Source==&lt;br /&gt;
&lt;br /&gt;
==Aims==&lt;br /&gt;
&lt;br /&gt;
This page is intended to help anyone who needs to get started obtaining and compiling the latest SWORD source code, and installing and testing it on their machine, on a Linux (or possibly other Unix-like) operating system.&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
There are four main steps involved:&lt;br /&gt;
&lt;br /&gt;
* Install necessary software packages&lt;br /&gt;
* Download the SWORD source code&lt;br /&gt;
* Compile and install SWORD&lt;br /&gt;
* Test your new SWORD installation is working&lt;br /&gt;
&lt;br /&gt;
All of these can be scripted for a specific Linux distribution, and some sample scripts to use will be provided later on this page.&lt;br /&gt;
&lt;br /&gt;
==Becoming root (using sudo)==&lt;br /&gt;
&lt;br /&gt;
In order to install software (including installing SWORD itself), you will need to be able to temporarily &amp;quot;become&amp;quot; root.&lt;br /&gt;
&lt;br /&gt;
Most Linux (and free *BSD) distributions include a tool called sudo than can do this very conveniently, once set up, without having to enter a root password.  On some Linux distributions (including Ubuntu) this is already set up for you during the installation process.  On others, you will need to&lt;br /&gt;
&lt;br /&gt;
* Become root some other way (log in as root, or use su, and type in the root password when prompted for it).&lt;br /&gt;
* Ue the command &amp;lt;pre&amp;gt;visudo&amp;lt;/pre&amp;gt; to edit the sudo configuration file.&lt;br /&gt;
* Add a line &amp;lt;pre&amp;gt;yourusername ALL=(ALL) ALL&amp;lt;/pre&amp;gt; to the file, save the change and and exit your text editor.&lt;br /&gt;
&lt;br /&gt;
After that, you should be able to type &amp;lt;pre&amp;gt;sudo id&amp;lt;/pre&amp;gt; to run the (harmless) command id as root.  sudo will prompt you for your own password, but if it is used more than once within a short period, will &amp;quot;remember&amp;quot; that you have already provided it and not ask for it again.  This is very convenient.&lt;br /&gt;
&lt;br /&gt;
==Install necessary software packages==&lt;br /&gt;
&lt;br /&gt;
Starting from a default fairly minimal Linux installation, you need to add a C++ compiler and several other libraries and tools to your system so that you can correctly compile SWORD.  The command to do this varies between different Linux distributions.  A few examples follow:&lt;br /&gt;
&lt;br /&gt;
;Fedora, Red Hat Enterprise Linux, CentOS: sudo yum install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Debian, Ubuntu, Mint: sudo apt-get install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Mandriva: sudo urpmi &amp;lt;list of packages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These tools will automatically install additional dependent packges, so the ones you request will work.&lt;br /&gt;
&lt;br /&gt;
Package names vary too, but you will generally need:&lt;br /&gt;
&lt;br /&gt;
* subversion (a tool for obtaining the latest SWORD source code, see below)&lt;br /&gt;
* the GNU C++ compiler, often in a package named g++ or gcc-c++&lt;br /&gt;
* make&lt;br /&gt;
* libtool &lt;br /&gt;
* icu&lt;br /&gt;
* zlib-devel (sometimes named zlib1g-dev)&lt;br /&gt;
* clucene-core-devel (sometimes named libclucene-dev)&lt;br /&gt;
* libicu-devel (sometimes named libicu-dev)&lt;br /&gt;
* libcurl-devel (named libcurl4-gnutls-dev on Debian-derived systems)&lt;br /&gt;
&lt;br /&gt;
These will generally automatically &amp;quot;pull in&amp;quot; other necessary packages such as binutils, automake and autoconf as dependencies.&lt;br /&gt;
&lt;br /&gt;
==Download the SWORD source code==&lt;br /&gt;
&lt;br /&gt;
The single command &amp;lt;pre&amp;gt;svn https://crosswire.org/sword/svn/trunk sword&amp;lt;/pre&amp;gt; will download the current development code of SWORD, into a directory called sword.  If it asks you about the SSL key, type p (for permanent, so it remembers the key) and press Enterm and it will continue.  Once the command finishes, you should be able to do &amp;lt;pre&amp;gt;cd sword&amp;lt;/pre&amp;gt; and look at all the source code you just downloaded.&lt;br /&gt;
&lt;br /&gt;
==Compile and install SWORD==&lt;br /&gt;
&lt;br /&gt;
You can read the INSTALL file for the details, but if all is well, after cd sword (so you are inside the SWORD source code directory) you can do &amp;lt;pre&amp;gt;./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make&amp;lt;/pre&amp;gt; to configure and compile SWORD.  &lt;br /&gt;
&lt;br /&gt;
If this fails, make sure you have all the necessary packages installed on your system, and after that, ask for help in the Crosswire forums at http://crosswire.org/forums/ .&lt;br /&gt;
&lt;br /&gt;
To install SWORD,After successfully compiling SWORD, you can do &amp;lt;pre&amp;gt;sudo make install &amp;amp;&amp;amp; sudo make install_config&amp;lt;/pre&amp;gt; to install SWORD and a default configuration file on your machine.&lt;br /&gt;
&lt;br /&gt;
==Test your new SWORD installation==&lt;br /&gt;
&lt;br /&gt;
As a very basic test, you can download and install the KJV SWORD &amp;quot;module&amp;quot; and then check that the command line bible reader diatheke can read a verse from it.    The commands to do this (using the usual bash shell) are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that displays a bunch of text and then something very similar to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
John 3:16: &lt;br /&gt;
For God so loved the world, that he gave his only begotten Son, &lt;br /&gt;
that whosoever believeth in him should not perish, but have everlasting life.&lt;br /&gt;
&lt;br /&gt;
(KJV)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you have successfully installed a basically working SWORD library and its utilities onto your machine.&lt;/div&gt;</summary>
		<author><name>JMarsden</name></author>	</entry>

	<entry>
		<id>https://wiki.crosswire.org/index.php?title=CrossWire:Sandbox&amp;diff=6706</id>
		<title>CrossWire:Sandbox</title>
		<link rel="alternate" type="text/html" href="https://wiki.crosswire.org/index.php?title=CrossWire:Sandbox&amp;diff=6706"/>
				<updated>2009-09-03T04:53:05Z</updated>
		
		<summary type="html">&lt;p&gt;JMarsden: /* Test your new SWORD installation is working */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Feel free to edit this page to practice your Wiki skills.  You might also consider clicking on your name at the top (if you've already created an account and logged in) to edit your personal pages.  It's a good place to practice and might develop into something useful.&lt;br /&gt;
&lt;br /&gt;
Please note, we don't look at this page to answer questions. If you want help please see our [[EnduserFAQ|Frequently Asked Questions (FAQ)]] and if that does not help then [[Help:Contents|Contact Us]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Edit your new stuff immediately below this line&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Getting Started Compiling and Installing SWORD from Source==&lt;br /&gt;
&lt;br /&gt;
===Aims===&lt;br /&gt;
&lt;br /&gt;
This page is intended to help anyone who needs to get started obtaining and compiling the latest SWORD source code, and installing and testing it on their machine, on a Linux (or possibly other Unix-like) operating system.&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
There are four main steps involved:&lt;br /&gt;
&lt;br /&gt;
* Install necessary software packages&lt;br /&gt;
* Download the SWORD source code&lt;br /&gt;
* Compile and install SWORD&lt;br /&gt;
* Test your new SWORD installation is working&lt;br /&gt;
&lt;br /&gt;
All of these can be scripted for a specific Linux distribution, and some sample scripts to use will be provided later on this page.&lt;br /&gt;
&lt;br /&gt;
====Becoming root (using sudo)====&lt;br /&gt;
&lt;br /&gt;
In order to install software (including installing SWORD itself), you will need to be able to temporarily &amp;quot;become&amp;quot; root.&lt;br /&gt;
&lt;br /&gt;
Most Linux (and free *BSD) distributions include a tool called sudo than can do this very conveniently, once set up, without having to enter a root password.  On some Linux distributions (including Ubuntu) this is already set up for you during the installation process.  On others, you will need to&lt;br /&gt;
&lt;br /&gt;
* Become root some other way (log in as root, or use su, and type in the root password when prompted for it).&lt;br /&gt;
* Ue the command &amp;lt;pre&amp;gt;visudo&amp;lt;/pre&amp;gt; to edit the sudo configuration file.&lt;br /&gt;
* Add a line &amp;lt;pre&amp;gt;yourusername ALL=(ALL) ALL&amp;lt;/pre&amp;gt; to the file, save the change and and exit your text editor.&lt;br /&gt;
&lt;br /&gt;
After that, you should be able to type &amp;lt;pre&amp;gt;sudo id&amp;lt;/pre&amp;gt; to run the (harmless) command id as root.  sudo will prompt you for your own password, but if it is used more than once within a short period, will &amp;quot;remember&amp;quot; that you have already provided it and not ask for it again.  This is very convenient.&lt;br /&gt;
&lt;br /&gt;
===Install necessary software packages===&lt;br /&gt;
&lt;br /&gt;
Starting from a default fairly minimal Linux installation, you need to add a C++ compiler and several other libraries and tools to your system so that you can correctly compile SWORD.  The command to do this varies between different Linux distributions.  A few examples follow:&lt;br /&gt;
&lt;br /&gt;
;Fedora, Red Hat Enterprise Linux, CentOS: sudo yum install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Debian, Ubuntu, Mint: sudo apt-get install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Mandriva: sudo urpmi &amp;lt;list of packages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These tools will automatically install additional dependent packges, so the ones you request will work.&lt;br /&gt;
&lt;br /&gt;
Package names vary too, but you will generally need:&lt;br /&gt;
&lt;br /&gt;
* subversion (a tool for obtaining the latest SWORD source code, see below)&lt;br /&gt;
* the GNU C++ compiler, often in a package named g++ or gcc-c++&lt;br /&gt;
* make&lt;br /&gt;
* libtool &lt;br /&gt;
* icu&lt;br /&gt;
* zlib-devel (sometimes named zlib1g-dev)&lt;br /&gt;
* clucene-core-devel (sometimes named libclucene-dev)&lt;br /&gt;
* libicu-devel (sometimes named libicu-dev)&lt;br /&gt;
* libcurl-devel (named libcurl4-gnutls-dev on Debian-derived systems)&lt;br /&gt;
&lt;br /&gt;
These will generally automatically &amp;quot;pull in&amp;quot; other necessary packages such as binutils, automake and autoconf as dependencies.&lt;br /&gt;
&lt;br /&gt;
==Download the SWORD source code==&lt;br /&gt;
&lt;br /&gt;
The single command &amp;lt;pre&amp;gt;svn https://crosswire.org/sword/svn/trunk sword&amp;lt;/pre&amp;gt; will download the current development code of SWORD, into a directory called sword.  If it asks you about the SSL key, type p (for permanent, so it remembers the key) and press Enterm and it will continue.  Once the command finishes, you should be able to do &amp;lt;pre&amp;gt;cd sword&amp;lt;/pre&amp;gt; and look at all the source code you just downloaded.&lt;br /&gt;
&lt;br /&gt;
==Compile and install SWORD==&lt;br /&gt;
&lt;br /&gt;
You can read the INSTALL file for the details, but if all is well, after cd sword (so you are inside the SWORD source code directory) you can do &amp;lt;pre&amp;gt;./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make&amp;lt;/pre&amp;gt; to configure and compile SWORD.  &lt;br /&gt;
&lt;br /&gt;
If this fails, make sure you have all the necessary packages installed on your system, and after that, ask for help in the Crosswire forums at http://crosswire.org/forums/ .&lt;br /&gt;
&lt;br /&gt;
To install SWORD,After successfully compiling SWORD, you can do &amp;lt;pre&amp;gt;sudo make install &amp;amp;&amp;amp; sudo make install_config&amp;lt;/pre&amp;gt; to install SWORD and a default configuration file on your machine.&lt;br /&gt;
&lt;br /&gt;
==Test your new SWORD installation==&lt;br /&gt;
&lt;br /&gt;
As a very basic test, you can download and install the KJV SWORD &amp;quot;module&amp;quot; and then check that the command line bible reader diatheke can read a verse from it.    The commands to do this (using the usual bash shell) are:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
export SWORD_PATH=~/.sword&lt;br /&gt;
mkdir -p $SWORD_PATH/mods.d&lt;br /&gt;
&lt;br /&gt;
echo yes |installmgr -init&lt;br /&gt;
echo yes |installmgr -sc&lt;br /&gt;
echo yes |installmgr -r CrossWire&lt;br /&gt;
echo yes |installmgr -ri CrossWire KJV&lt;br /&gt;
installmgr -l&lt;br /&gt;
diatheke -b KJV -k Jn 3:16&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If that displays a bunch of text and then something very similar to:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
John 3:16: &lt;br /&gt;
For God so loved the world, that he gave his only begotten Son, &lt;br /&gt;
that whosoever believeth in him should not perish, but have everlasting life.&lt;br /&gt;
&lt;br /&gt;
(KJV)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you have successfully installed a basically working SWORD library and its utilities onto your machine.&lt;/div&gt;</summary>
		<author><name>JMarsden</name></author>	</entry>

	<entry>
		<id>https://wiki.crosswire.org/index.php?title=CrossWire:Sandbox&amp;diff=6705</id>
		<title>CrossWire:Sandbox</title>
		<link rel="alternate" type="text/html" href="https://wiki.crosswire.org/index.php?title=CrossWire:Sandbox&amp;diff=6705"/>
				<updated>2009-09-03T04:46:33Z</updated>
		
		<summary type="html">&lt;p&gt;JMarsden: /* Compile and install SWORD */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Feel free to edit this page to practice your Wiki skills.  You might also consider clicking on your name at the top (if you've already created an account and logged in) to edit your personal pages.  It's a good place to practice and might develop into something useful.&lt;br /&gt;
&lt;br /&gt;
Please note, we don't look at this page to answer questions. If you want help please see our [[EnduserFAQ|Frequently Asked Questions (FAQ)]] and if that does not help then [[Help:Contents|Contact Us]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Edit your new stuff immediately below this line&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Getting Started Compiling and Installing SWORD from Source==&lt;br /&gt;
&lt;br /&gt;
===Aims===&lt;br /&gt;
&lt;br /&gt;
This page is intended to help anyone who needs to get started obtaining and compiling the latest SWORD source code, and installing and testing it on their machine, on a Linux (or possibly other Unix-like) operating system.&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
There are four main steps involved:&lt;br /&gt;
&lt;br /&gt;
* Install necessary software packages&lt;br /&gt;
* Download the SWORD source code&lt;br /&gt;
* Compile and install SWORD&lt;br /&gt;
* Test your new SWORD installation is working&lt;br /&gt;
&lt;br /&gt;
All of these can be scripted for a specific Linux distribution, and some sample scripts to use will be provided later on this page.&lt;br /&gt;
&lt;br /&gt;
====Becoming root (using sudo)====&lt;br /&gt;
&lt;br /&gt;
In order to install software (including installing SWORD itself), you will need to be able to temporarily &amp;quot;become&amp;quot; root.&lt;br /&gt;
&lt;br /&gt;
Most Linux (and free *BSD) distributions include a tool called sudo than can do this very conveniently, once set up, without having to enter a root password.  On some Linux distributions (including Ubuntu) this is already set up for you during the installation process.  On others, you will need to&lt;br /&gt;
&lt;br /&gt;
* Become root some other way (log in as root, or use su, and type in the root password when prompted for it).&lt;br /&gt;
* Ue the command &amp;lt;pre&amp;gt;visudo&amp;lt;/pre&amp;gt; to edit the sudo configuration file.&lt;br /&gt;
* Add a line &amp;lt;pre&amp;gt;yourusername ALL=(ALL) ALL&amp;lt;/pre&amp;gt; to the file, save the change and and exit your text editor.&lt;br /&gt;
&lt;br /&gt;
After that, you should be able to type &amp;lt;pre&amp;gt;sudo id&amp;lt;/pre&amp;gt; to run the (harmless) command id as root.  sudo will prompt you for your own password, but if it is used more than once within a short period, will &amp;quot;remember&amp;quot; that you have already provided it and not ask for it again.  This is very convenient.&lt;br /&gt;
&lt;br /&gt;
===Install necessary software packages===&lt;br /&gt;
&lt;br /&gt;
Starting from a default fairly minimal Linux installation, you need to add a C++ compiler and several other libraries and tools to your system so that you can correctly compile SWORD.  The command to do this varies between different Linux distributions.  A few examples follow:&lt;br /&gt;
&lt;br /&gt;
;Fedora, Red Hat Enterprise Linux, CentOS: sudo yum install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Debian, Ubuntu, Mint: sudo apt-get install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Mandriva: sudo urpmi &amp;lt;list of packages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These tools will automatically install additional dependent packges, so the ones you request will work.&lt;br /&gt;
&lt;br /&gt;
Package names vary too, but you will generally need:&lt;br /&gt;
&lt;br /&gt;
* subversion (a tool for obtaining the latest SWORD source code, see below)&lt;br /&gt;
* the GNU C++ compiler, often in a package named g++ or gcc-c++&lt;br /&gt;
* make&lt;br /&gt;
* libtool &lt;br /&gt;
* icu&lt;br /&gt;
* zlib-devel (sometimes named zlib1g-dev)&lt;br /&gt;
* clucene-core-devel (sometimes named libclucene-dev)&lt;br /&gt;
* libicu-devel (sometimes named libicu-dev)&lt;br /&gt;
* libcurl-devel (named libcurl4-gnutls-dev on Debian-derived systems)&lt;br /&gt;
&lt;br /&gt;
These will generally automatically &amp;quot;pull in&amp;quot; other necessary packages such as binutils, automake and autoconf as dependencies.&lt;br /&gt;
&lt;br /&gt;
==Download the SWORD source code==&lt;br /&gt;
&lt;br /&gt;
The single command &amp;lt;pre&amp;gt;svn https://crosswire.org/sword/svn/trunk sword&amp;lt;/pre&amp;gt; will download the current development code of SWORD, into a directory called sword.  If it asks you about the SSL key, type p (for permanent, so it remembers the key) and press Enterm and it will continue.  Once the command finishes, you should be able to do &amp;lt;pre&amp;gt;cd sword&amp;lt;/pre&amp;gt; and look at all the source code you just downloaded.&lt;br /&gt;
&lt;br /&gt;
==Compile and install SWORD==&lt;br /&gt;
&lt;br /&gt;
You can read the INSTALL file for the details, but if all is well, after cd sword (so you are inside the SWORD source code directory) you can do &amp;lt;pre&amp;gt;./autogen.sh &amp;amp;&amp;amp; ./usrinst.sh &amp;amp;&amp;amp; make&amp;lt;/pre&amp;gt; to configure and compile SWORD.  &lt;br /&gt;
&lt;br /&gt;
If this fails, make sure you have all the necessary packages installed on your system, and after that, ask for help in the Crosswire forums at http://crosswire.org/forums/ .&lt;br /&gt;
&lt;br /&gt;
To install SWORD,After successfully compiling SWORD, you can do &amp;lt;pre&amp;gt;sudo make install &amp;amp;&amp;amp; sudo make install_config&amp;lt;/pre&amp;gt; to install SWORD and a default configuration file on your machine.&lt;br /&gt;
&lt;br /&gt;
==Test your new SWORD installation is working==&lt;/div&gt;</summary>
		<author><name>JMarsden</name></author>	</entry>

	<entry>
		<id>https://wiki.crosswire.org/index.php?title=CrossWire:Sandbox&amp;diff=6704</id>
		<title>CrossWire:Sandbox</title>
		<link rel="alternate" type="text/html" href="https://wiki.crosswire.org/index.php?title=CrossWire:Sandbox&amp;diff=6704"/>
				<updated>2009-09-03T04:40:46Z</updated>
		
		<summary type="html">&lt;p&gt;JMarsden: /* Download the SWORD source code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Feel free to edit this page to practice your Wiki skills.  You might also consider clicking on your name at the top (if you've already created an account and logged in) to edit your personal pages.  It's a good place to practice and might develop into something useful.&lt;br /&gt;
&lt;br /&gt;
Please note, we don't look at this page to answer questions. If you want help please see our [[EnduserFAQ|Frequently Asked Questions (FAQ)]] and if that does not help then [[Help:Contents|Contact Us]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Edit your new stuff immediately below this line&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Getting Started Compiling and Installing SWORD from Source==&lt;br /&gt;
&lt;br /&gt;
===Aims===&lt;br /&gt;
&lt;br /&gt;
This page is intended to help anyone who needs to get started obtaining and compiling the latest SWORD source code, and installing and testing it on their machine, on a Linux (or possibly other Unix-like) operating system.&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
There are four main steps involved:&lt;br /&gt;
&lt;br /&gt;
* Install necessary software packages&lt;br /&gt;
* Download the SWORD source code&lt;br /&gt;
* Compile and install SWORD&lt;br /&gt;
* Test your new SWORD installation is working&lt;br /&gt;
&lt;br /&gt;
All of these can be scripted for a specific Linux distribution, and some sample scripts to use will be provided later on this page.&lt;br /&gt;
&lt;br /&gt;
====Becoming root (using sudo)====&lt;br /&gt;
&lt;br /&gt;
In order to install software (including installing SWORD itself), you will need to be able to temporarily &amp;quot;become&amp;quot; root.&lt;br /&gt;
&lt;br /&gt;
Most Linux (and free *BSD) distributions include a tool called sudo than can do this very conveniently, once set up, without having to enter a root password.  On some Linux distributions (including Ubuntu) this is already set up for you during the installation process.  On others, you will need to&lt;br /&gt;
&lt;br /&gt;
* Become root some other way (log in as root, or use su, and type in the root password when prompted for it).&lt;br /&gt;
* Ue the command &amp;lt;pre&amp;gt;visudo&amp;lt;/pre&amp;gt; to edit the sudo configuration file.&lt;br /&gt;
* Add a line &amp;lt;pre&amp;gt;yourusername ALL=(ALL) ALL&amp;lt;/pre&amp;gt; to the file, save the change and and exit your text editor.&lt;br /&gt;
&lt;br /&gt;
After that, you should be able to type &amp;lt;pre&amp;gt;sudo id&amp;lt;/pre&amp;gt; to run the (harmless) command id as root.  sudo will prompt you for your own password, but if it is used more than once within a short period, will &amp;quot;remember&amp;quot; that you have already provided it and not ask for it again.  This is very convenient.&lt;br /&gt;
&lt;br /&gt;
===Install necessary software packages===&lt;br /&gt;
&lt;br /&gt;
Starting from a default fairly minimal Linux installation, you need to add a C++ compiler and several other libraries and tools to your system so that you can correctly compile SWORD.  The command to do this varies between different Linux distributions.  A few examples follow:&lt;br /&gt;
&lt;br /&gt;
;Fedora, Red Hat Enterprise Linux, CentOS: sudo yum install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Debian, Ubuntu, Mint: sudo apt-get install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Mandriva: sudo urpmi &amp;lt;list of packages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These tools will automatically install additional dependent packges, so the ones you request will work.&lt;br /&gt;
&lt;br /&gt;
Package names vary too, but you will generally need:&lt;br /&gt;
&lt;br /&gt;
* subversion (a tool for obtaining the latest SWORD source code, see below)&lt;br /&gt;
* the GNU C++ compiler, often in a package named g++ or gcc-c++&lt;br /&gt;
* make&lt;br /&gt;
* libtool &lt;br /&gt;
* icu&lt;br /&gt;
* zlib-devel (sometimes named zlib1g-dev)&lt;br /&gt;
* clucene-core-devel (sometimes named libclucene-dev)&lt;br /&gt;
* libicu-devel (sometimes named libicu-dev)&lt;br /&gt;
* libcurl-devel (named libcurl4-gnutls-dev on Debian-derived systems)&lt;br /&gt;
&lt;br /&gt;
These will generally automatically &amp;quot;pull in&amp;quot; other necessary packages such as binutils, automake and autoconf as dependencies.&lt;br /&gt;
&lt;br /&gt;
==Download the SWORD source code==&lt;br /&gt;
&lt;br /&gt;
The single command &amp;lt;pre&amp;gt;svn https://crosswire.org/sword/svn/trunk sword&amp;lt;/pre&amp;gt; will download the current development code of SWORD, into a directory called sword.  If it asks you about the SSL key, type p (for permanent, so it remembers the key) and press Enterm and it will continue.  Once the command finishes, you should be able to do &amp;lt;pre&amp;gt;cd sword&amp;lt;/pre&amp;gt; and look at all the source code you just downloaded.&lt;br /&gt;
&lt;br /&gt;
==Compile and install SWORD==&lt;br /&gt;
&lt;br /&gt;
==Test your new SWORD installation is working==&lt;/div&gt;</summary>
		<author><name>JMarsden</name></author>	</entry>

	<entry>
		<id>https://wiki.crosswire.org/index.php?title=CrossWire:Sandbox&amp;diff=6703</id>
		<title>CrossWire:Sandbox</title>
		<link rel="alternate" type="text/html" href="https://wiki.crosswire.org/index.php?title=CrossWire:Sandbox&amp;diff=6703"/>
				<updated>2009-09-03T04:36:31Z</updated>
		
		<summary type="html">&lt;p&gt;JMarsden: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Feel free to edit this page to practice your Wiki skills.  You might also consider clicking on your name at the top (if you've already created an account and logged in) to edit your personal pages.  It's a good place to practice and might develop into something useful.&lt;br /&gt;
&lt;br /&gt;
Please note, we don't look at this page to answer questions. If you want help please see our [[EnduserFAQ|Frequently Asked Questions (FAQ)]] and if that does not help then [[Help:Contents|Contact Us]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Edit your new stuff immediately below this line&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Getting Started Compiling and Installing SWORD from Source==&lt;br /&gt;
&lt;br /&gt;
===Aims===&lt;br /&gt;
&lt;br /&gt;
This page is intended to help anyone who needs to get started obtaining and compiling the latest SWORD source code, and installing and testing it on their machine, on a Linux (or possibly other Unix-like) operating system.&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
There are four main steps involved:&lt;br /&gt;
&lt;br /&gt;
* Install necessary software packages&lt;br /&gt;
* Download the SWORD source code&lt;br /&gt;
* Compile and install SWORD&lt;br /&gt;
* Test your new SWORD installation is working&lt;br /&gt;
&lt;br /&gt;
All of these can be scripted for a specific Linux distribution, and some sample scripts to use will be provided later on this page.&lt;br /&gt;
&lt;br /&gt;
====Becoming root (using sudo)====&lt;br /&gt;
&lt;br /&gt;
In order to install software (including installing SWORD itself), you will need to be able to temporarily &amp;quot;become&amp;quot; root.&lt;br /&gt;
&lt;br /&gt;
Most Linux (and free *BSD) distributions include a tool called sudo than can do this very conveniently, once set up, without having to enter a root password.  On some Linux distributions (including Ubuntu) this is already set up for you during the installation process.  On others, you will need to&lt;br /&gt;
&lt;br /&gt;
* Become root some other way (log in as root, or use su, and type in the root password when prompted for it).&lt;br /&gt;
* Ue the command &amp;lt;pre&amp;gt;visudo&amp;lt;/pre&amp;gt; to edit the sudo configuration file.&lt;br /&gt;
* Add a line &amp;lt;pre&amp;gt;yourusername ALL=(ALL) ALL&amp;lt;/pre&amp;gt; to the file, save the change and and exit your text editor.&lt;br /&gt;
&lt;br /&gt;
After that, you should be able to type &amp;lt;pre&amp;gt;sudo id&amp;lt;/pre&amp;gt; to run the (harmless) command id as root.  sudo will prompt you for your own password, but if it is used more than once within a short period, will &amp;quot;remember&amp;quot; that you have already provided it and not ask for it again.  This is very convenient.&lt;br /&gt;
&lt;br /&gt;
===Install necessary software packages===&lt;br /&gt;
&lt;br /&gt;
Starting from a default fairly minimal Linux installation, you need to add a C++ compiler and several other libraries and tools to your system so that you can correctly compile SWORD.  The command to do this varies between different Linux distributions.  A few examples follow:&lt;br /&gt;
&lt;br /&gt;
;Fedora, Red Hat Enterprise Linux, CentOS: sudo yum install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Debian, Ubuntu, Mint: sudo apt-get install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Mandriva: sudo urpmi &amp;lt;list of packages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These tools will automatically install additional dependent packges, so the ones you request will work.&lt;br /&gt;
&lt;br /&gt;
Package names vary too, but you will generally need:&lt;br /&gt;
&lt;br /&gt;
* subversion (a tool for obtaining the latest SWORD source code, see below)&lt;br /&gt;
* the GNU C++ compiler, often in a package named g++ or gcc-c++&lt;br /&gt;
* make&lt;br /&gt;
* libtool &lt;br /&gt;
* icu&lt;br /&gt;
* zlib-devel (sometimes named zlib1g-dev)&lt;br /&gt;
* clucene-core-devel (sometimes named libclucene-dev)&lt;br /&gt;
* libicu-devel (sometimes named libicu-dev)&lt;br /&gt;
* libcurl-devel (named libcurl4-gnutls-dev on Debian-derived systems)&lt;br /&gt;
&lt;br /&gt;
These will generally automatically &amp;quot;pull in&amp;quot; other necessary packages such as binutils, automake and autoconf as dependencies.&lt;br /&gt;
&lt;br /&gt;
==Download the SWORD source code==&lt;br /&gt;
&lt;br /&gt;
==Compile and install SWORD==&lt;br /&gt;
&lt;br /&gt;
==Test your new SWORD installation is working==&lt;/div&gt;</summary>
		<author><name>JMarsden</name></author>	</entry>

	<entry>
		<id>https://wiki.crosswire.org/index.php?title=CrossWire:Sandbox&amp;diff=6702</id>
		<title>CrossWire:Sandbox</title>
		<link rel="alternate" type="text/html" href="https://wiki.crosswire.org/index.php?title=CrossWire:Sandbox&amp;diff=6702"/>
				<updated>2009-09-03T04:33:50Z</updated>
		
		<summary type="html">&lt;p&gt;JMarsden: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Feel free to edit this page to practice your Wiki skills.  You might also consider clicking on your name at the top (if you've already created an account and logged in) to edit your personal pages.  It's a good place to practice and might develop into something useful.&lt;br /&gt;
&lt;br /&gt;
Please note, we don't look at this page to answer questions. If you want help please see our [[EnduserFAQ|Frequently Asked Questions (FAQ)]] and if that does not help then [[Help:Contents|Contact Us]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Edit your new stuff immediately below this line&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Getting Started Compiling and Installing SWORD from Source==&lt;br /&gt;
&lt;br /&gt;
===Aims===&lt;br /&gt;
&lt;br /&gt;
This page is intended to help anyone who needs to get started obtaining and compiling the latest SWORD source code, and installing and testing it on their machine, on a Linux (or possibly other Unix-like) operating system.&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
There are four main steps involved:&lt;br /&gt;
&lt;br /&gt;
* Install necessary software packages&lt;br /&gt;
* Download the SWORD source code&lt;br /&gt;
* Compile and install SWORD&lt;br /&gt;
* Test your new SWORD installation is working&lt;br /&gt;
&lt;br /&gt;
All of these can be scripted for a specific Linux distribution, and some sample scripts to use will be provided later on this page.&lt;br /&gt;
&lt;br /&gt;
====Becoming root (using sudo)====&lt;br /&gt;
&lt;br /&gt;
In order to install software (including installing SWORD itself), you will need to be able to temporarily &amp;quot;become&amp;quot; root.&lt;br /&gt;
&lt;br /&gt;
Most Linux (and free *BSD) distributions include a tool called sudo than can do this very conveniently, once set up, without having to enter a root password.  On some Linux distributions (including Ubuntu) this is already set up for you during the installation process.  On others, you will need to&lt;br /&gt;
&lt;br /&gt;
* Become root some other way (log in as root, or use su, and type in the root password when prompted for it)&lt;br /&gt;
* use the command &amp;lt;pre&amp;gt;visudo&amp;lt;/pre&amp;gt; to edit the sudo configuration file&lt;br /&gt;
* add a line &amp;lt;pre&amp;gt;yourusername ALL=(ALL) ALL&amp;lt;/pre&amp;gt; to the file, save the change and and exit your text editor&lt;br /&gt;
&lt;br /&gt;
After that you should be able to type &amp;lt;pre&amp;gt;sudo id&amp;lt;pre&amp;gt; to run the (harmless) command id as root.&lt;br /&gt;
&lt;br /&gt;
===Install necessary software packages===&lt;br /&gt;
&lt;br /&gt;
Starting from a default fairly minimal Linux installation, you need to add a C++ compiler and several other libraries and tools to your system so that you can correctly compile SWORD.  The command to do this varies between different Linux distributions.  A few examples follow:&lt;br /&gt;
&lt;br /&gt;
;Fedora, Red Hat Enterprise Linux, CentOS: sudo yum install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Debian, Ubuntu, Mint: sudo apt-get install &amp;lt;list of packages&amp;gt;&lt;br /&gt;
;Mandriva: sudo urpmi &amp;lt;list of packages&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These tools will automatically install additional dependent packges, so the ones you request will work.&lt;br /&gt;
&lt;br /&gt;
Package names vary too, but you will generally need:&lt;br /&gt;
&lt;br /&gt;
* subversion (a tool for obtaining the latest SWORD source code, see below)&lt;br /&gt;
* the GNU C++ compiler, often in a package named g++ or gcc-c++&lt;br /&gt;
* make&lt;br /&gt;
* libtool &lt;br /&gt;
* icu&lt;br /&gt;
* zlib-devel (sometimes named zlib1g-dev)&lt;br /&gt;
* clucene-core-devel (sometimes named libclucene-dev)&lt;br /&gt;
* libicu-devel (sometimes named libicu-dev)&lt;br /&gt;
* libcurl-devel (named libcurl4-gnutls-dev on Debian-derived systems)&lt;br /&gt;
&lt;br /&gt;
These will generally automatically &amp;quot;pull in&amp;quot; other necessary packages such as binutils, automake and autoconf as dependencies.&lt;br /&gt;
&lt;br /&gt;
==Download the SWORD source code==&lt;br /&gt;
&lt;br /&gt;
==Compile and install SWORD==&lt;br /&gt;
&lt;br /&gt;
==Test your new SWORD installation is working==&lt;/div&gt;</summary>
		<author><name>JMarsden</name></author>	</entry>

	<entry>
		<id>https://wiki.crosswire.org/index.php?title=CrossWire:Sandbox&amp;diff=6701</id>
		<title>CrossWire:Sandbox</title>
		<link rel="alternate" type="text/html" href="https://wiki.crosswire.org/index.php?title=CrossWire:Sandbox&amp;diff=6701"/>
				<updated>2009-09-03T04:02:15Z</updated>
		
		<summary type="html">&lt;p&gt;JMarsden: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Feel free to edit this page to practice your Wiki skills.  You might also consider clicking on your name at the top (if you've already created an account and logged in) to edit your personal pages.  It's a good place to practice and might develop into something useful.&lt;br /&gt;
&lt;br /&gt;
Please note, we don't look at this page to answer questions. If you want help please see our [[EnduserFAQ|Frequently Asked Questions (FAQ)]] and if that does not help then [[Help:Contents|Contact Us]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Edit your new stuff immediately below this line&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==Getting Started Compiling and Installing SWORD from Source==&lt;br /&gt;
&lt;br /&gt;
===Aims===&lt;br /&gt;
&lt;br /&gt;
This page is intended to help anyone who needs to get started obtaining and compiling the latest SWORD source code, and installing and testing it on their machine, on a Linux (or possibly other Unix-like) operating system.&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
There are four main steps involved:&lt;br /&gt;
&lt;br /&gt;
* Install necessary software packages&lt;br /&gt;
* Download the SWORD source code&lt;br /&gt;
* Compile and install SWORD&lt;br /&gt;
* Test your new SWORD installation is working&lt;/div&gt;</summary>
		<author><name>JMarsden</name></author>	</entry>

	<entry>
		<id>https://wiki.crosswire.org/index.php?title=CrossWire:Sandbox&amp;diff=6700</id>
		<title>CrossWire:Sandbox</title>
		<link rel="alternate" type="text/html" href="https://wiki.crosswire.org/index.php?title=CrossWire:Sandbox&amp;diff=6700"/>
				<updated>2009-09-03T03:31:21Z</updated>
		
		<summary type="html">&lt;p&gt;JMarsden: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Feel free to edit this page to practice your Wiki skills.  You might also consider clicking on your name at the top (if you've already created an account and logged in) to edit your personal pages.  It's a good place to practice and might develop into something useful.&lt;br /&gt;
&lt;br /&gt;
Please note, we don't look at this page to answer questions. If you want help please see our [[EnduserFAQ|Frequently Asked Questions (FAQ)]] and if that does not help then [[Help:Contents|Contact Us]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Edit your new stuff immediately below this line&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==FOO==&lt;br /&gt;
&lt;br /&gt;
===bar===&lt;br /&gt;
&lt;br /&gt;
====baz====&lt;br /&gt;
&lt;br /&gt;
test123&lt;/div&gt;</summary>
		<author><name>JMarsden</name></author>	</entry>

	</feed>