Build and Install
Once you have downloaded 4store you need to build it from source.
First of all make sure that your machine is configured to look for libraries in /usr/local/lib and/or /usr/local/lib64. On many systems this can be done by creating a file called /etc/ld.so.conf.d/local.conf containing those two paths, one per line, and then running /sbin/ldconfig as root.
Once you have done that you should check that you $PKG_CONFIG_PATH environment variable include the correct paths for local installed packages (assuming that your distributor does not package recent enough versions of raptor and rasqal). $PKG_CONFIG_PATH should typically contain something like:
Make sure you have the dependencies installed.
- untar the .tar.gz file with tar xvfz 4store-<version>.tar.gz
- cd into the 4store-<version> directory
- run ./configure
- run make
- cd into the directory that git cloned.
- run sh autogen.sh
- then follow the instruation as for the tarball.
Note: you may require extra dependencies to install via this route.
N.B. if this is the first time you've installed 4store on this machine, you'll need to run make install before you can run make test, to create the directory /var/lib/4store/ with the correct permissions.
If you wish to test the build you can run
This will take a few minutes, it imports some data and runs test SPARQL queries over it.
If you see count and union-nobind fail, that will be because you don't have LAQRS support enabled.
Once this has completed you should be able to run make install as root, to install the software.
Congratulations! You have installed 4store.
By default 4store stores its databases in /var/lib/4store/. You can change this directory using the ./configure argument --with-storage-path=...
Running make install will create this directory and set the permissions on it.
4store does not gracefully handle running out of disk space, you will lose the new data if you try to import when there's no free disk space. By default it will not allow imports if there is less that 1% of disk space free. This can be altered with the FS_DISK_LIMIT environment variable.
If you want to install 4store on a cluster then you can just repeat the operations for a single machine for every node on the cluster, but for large clusters that's very time consuming.
Alternatively you can export /usr/local of the master node to the storage nodes, it requires some work to setup, but makes deploying new versions of 4store very easy.
You could also package up 4store and other non-OS provided libraries as system packages and deploy them automatically across the cluster.
These methods are a bit too complex to describe here, but they will be documented in the future, or you can ask for help.