working online and offline. With its interesting characteristics, I decided to install it on my Fedora machine.
Here are the dependencies I've installed (assuming everything was a downloaded source):
1. curl-7.19
2. SpiderMonkey - js-1.7.0
3. ICU - icu4c-4_2_1
4. Erlang OTP - otp_src_R13B03
5. autoconf-2.13
Somebody had provided a script to properly and easily wire SpiderMonkey with CouchDB as can be seen from http://74.125.47.132/search?q=cache:http://dt.in.th/2008-03-03.spidermonkey-linux.html. This is our script:
#!/bin/bash
if test "$USER" = root; then
wget http://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz -O- | tar xvz
cd js/src
make -f Makefile.ref
mkdir -p /usr/include/smjs/ -v
cp *.{h,tbl} /usr/include/smjs/ -v
cd Linux_All_DBG.OBJ
cp *.h /usr/include/smjs/ -v
mkdir -p /usr/local/{bin,lib}/ -v
cp js /usr/local/bin/ -v
cp libjs.so /usr/local/lib/ -v
else
echo "You must be root. Try sudo $0"
fi
To ensure that CouchDB will compile properly, use the options --with-js-lib and --with-js-include when installing it. Type the command couchdb to run it. Then try to run this command curl http://127.0.0.1:5984/. You should see something like this {"couchdb":"Welcome","version":"0.10.1"} as the response. This means that the database was successfully installed.
Futon is a great web interface to the database. Be sure to run all tests from Futon. If the URL used to access Futon is say http://localhost:5984/_utils, there are 3 tests that will fail - oauth, replication and security_validation. This is a known issue for some common network configurations. My setup is basically a Windows XP accessing thru Futton the CouchDB server instance which is installed on a Fedora machine. Both machines are connected via a router without any DNS configurations. Whatever the network configuration is, this URL will always work and all tests passes - http://127.0.0.1:5984/_utils.
I prefer a different ip address used to access Futon so I went ahead and updated two configuration files which are default.ini and local.ini. The settings from local.ini will override the default.ini. Depending on your installation of CouchDB, these files can be found at /usr/local/etc/couchdb directory. Change the binding address to suit your needs.
Very nice posting. Very easy step you have provided here and its easy to install on Fedora. Could you please provide the simple step on how to install CouchDB on Windows platform.
ReplyDeleteThanks in Advance.
Regards,
Binod Suman