= Build and Install = == Single Machine == Once you have [wiki:Download downloaded] 4store you need to build it from source. === Preparation === 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: {{{ /usr/lib64/pkgconfig:/usr/share/pkgconfig:/usr/local/lib64/pkgconfig:/usr/local/share/pkgconfig }}} Make sure you have the [wiki:Dependencies dependencies] installed. === Building === cd into the directory that git, or un tarring the tarball created and run “make” to build. If you encounter errors, please see the [//faqs FAQ] section of the website. === Testing === ''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 {{{ make test }}} 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. === Software Installation === Once this has completed you should be able to run {{{make install}}} as root, to install the software. Congratulations! You have installed 4store. === Storage === 4store stores its databases in /var/lib/4store/ Running {{{make install}}} will create this directory and set the permissions on it. If you have low disk space then you will need to set the environment variable FS_DISK_LIMIT. It holds the minimum percentage of disk space the 4store will insist on having before it will import data. You can set it in your bash profile like: {{{ export FS_DISK_LIMIT=1 }}} After setting this variable you need to restart the backends for it to take effect. But beware, 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. ---- == Cluster == 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 [//support ask for help].