View Source

h1. Running Multiple instances of 4store (httpd) on a single machine - Ubuntu 10.04

.....

h2. Dependencies

Install the debian provided dependencies

{code}
apt-get install build-essential libpcre3-dev librasqal2-dev libtool libraptor1-dev libglib2.0-dev ncurses-dev libreadline-dev uuid-dev git-core automake
{code}
Next install (download, ./configure, make, make install): 

RAPTOR \-> [http://librdf.org/raptor/|http://librdf.org/raptor/]


RASQAL \-> [http://librdf.org/rasqal/|http://librdf.org/rasqal/]

h2. Download 4store from Git



{code}
git clone https://github.com/garlik/4store.git
{code}


h2. {color:#222222}Install 4store{color}



{code}
cd 4store
./autogen.sh
./configure
make
sudo make install
sudo ldconfig
{code}

h2. {color:#222222}Configure 4store{color}

{code}
sudo vi /etc/4store.conf
{code}
Content:

{code}
[4s-boss]


discovery = sole
nodes = localhost
{code}
Next edit hosts file to disable IPv6 lookup for localhost

{code}
vi /etc/hosts
{code}
Comment out the following line (so it contains the hash and looks like the following)


{code}
# ::1     localhost ip6-localhost ip6-loopback
{code}
Finally run 4s-boss

{code}
4s-boss
{code}

h2. Set up your stores


{code}
4s-backend-setup backend1
4s-backend-setup backend2
4s-admin list-stores
{code}
This should list the stores you have just created, now to bring them online:

{code}
4s-admin start-stores backend1 backend2
{code}
Finally we can then start the httpd servers:

{code}
4s-httpd -p 5051 -H localhost backend1
4s-httpd -p 5052 -H localhost backend2
{code}
This will start 2 stores, one on port 5051 and one on port 5052.

h2. Test your stores

Simply point a browser to the machine:port number status page e.g.

{code}
http://localhost:5051/status
{code}