Difference between revisions of "CrossWire:Sandbox"
Line 22: | Line 22: | ||
* Compile and install SWORD | * Compile and install SWORD | ||
* Test your new SWORD installation is working | * Test your new SWORD installation is working | ||
+ | |||
+ | All of these can be scripted for a specific Linux distribution, and some sample scripts to use will be provided later on this page. | ||
+ | |||
+ | ====Becoming root (using sudo)==== | ||
+ | |||
+ | In order to install software (including installing SWORD itself), you will need to be able to temporarily "become" root. | ||
+ | |||
+ | 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 | ||
+ | |||
+ | * Become root some other way (log in as root, or use su, and type in the root password when prompted for it) | ||
+ | * use the command <pre>visudo</pre> to edit the sudo configuration file | ||
+ | * add a line <pre>yourusername ALL=(ALL) ALL</pre> to the file, save the change and and exit your text editor | ||
+ | |||
+ | After that you should be able to type <pre>sudo id<pre> to run the (harmless) command id as root. | ||
+ | |||
+ | ===Install necessary software packages=== | ||
+ | |||
+ | 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: | ||
+ | |||
+ | ;Fedora, Red Hat Enterprise Linux, CentOS: sudo yum install <list of packages> | ||
+ | ;Debian, Ubuntu, Mint: sudo apt-get install <list of packages> | ||
+ | ;Mandriva: sudo urpmi <list of packages> | ||
+ | |||
+ | These tools will automatically install additional dependent packges, so the ones you request will work. | ||
+ | |||
+ | Package names vary too, but you will generally need: | ||
+ | |||
+ | * subversion (a tool for obtaining the latest SWORD source code, see below) | ||
+ | * the GNU C++ compiler, often in a package named g++ or gcc-c++ | ||
+ | * make | ||
+ | * libtool | ||
+ | * icu | ||
+ | * zlib-devel (sometimes named zlib1g-dev) | ||
+ | * clucene-core-devel (sometimes named libclucene-dev) | ||
+ | * libicu-devel (sometimes named libicu-dev) | ||
+ | * libcurl-devel (named libcurl4-gnutls-dev on Debian-derived systems) | ||
+ | |||
+ | These will generally automatically "pull in" other necessary packages such as binutils, automake and autoconf as dependencies. | ||
+ | |||
+ | ==Download the SWORD source code== | ||
+ | |||
+ | ==Compile and install SWORD== | ||
+ | |||
+ | ==Test your new SWORD installation is working== |
Revision as of 04:33, 3 September 2009
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.
Please note, we don't look at this page to answer questions. If you want help please see our Frequently Asked Questions (FAQ) and if that does not help then Contact Us.
Edit your new stuff immediately below this line
Contents
Getting Started Compiling and Installing SWORD from Source
Aims
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.
Introduction
There are four main steps involved:
- Install necessary software packages
- Download the SWORD source code
- Compile and install SWORD
- Test your new SWORD installation is working
All of these can be scripted for a specific Linux distribution, and some sample scripts to use will be provided later on this page.
Becoming root (using sudo)
In order to install software (including installing SWORD itself), you will need to be able to temporarily "become" root.
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
- Become root some other way (log in as root, or use su, and type in the root password when prompted for it)
- use the command
visudo
to edit the sudo configuration file - add a line
yourusername ALL=(ALL) ALL
to the file, save the change and and exit your text editor
sudo id<pre> to run the (harmless) command id as root.Install necessary software packages
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:
- Fedora, Red Hat Enterprise Linux, CentOS
- sudo yum install <list of packages>
- Debian, Ubuntu, Mint
- sudo apt-get install <list of packages>
- Mandriva
- sudo urpmi <list of packages>
These tools will automatically install additional dependent packges, so the ones you request will work.
Package names vary too, but you will generally need:
- subversion (a tool for obtaining the latest SWORD source code, see below)
- the GNU C++ compiler, often in a package named g++ or gcc-c++
- make
- libtool
- icu
- zlib-devel (sometimes named zlib1g-dev)
- clucene-core-devel (sometimes named libclucene-dev)
- libicu-devel (sometimes named libicu-dev)
- libcurl-devel (named libcurl4-gnutls-dev on Debian-derived systems)
These will generally automatically "pull in" other necessary packages such as binutils, automake and autoconf as dependencies.