Archive for the ‘Mac OS’ Category

Installing CouchDB on Mac OS X Leopard

Howdy!

I had installed CouchDB using Mac Ports but looks like ports installs an old and bugged version of CouchDb. So I decided to uninstall the couchdb and install it straight from source.

Here we go. Open your terminal and follow the instructions.

Installing CouchDB dependencies

First step is to install the ICU (International Components for Unicode). Execute the following commands:

$ curl -O http://download.icu-project.org/files/icu4c/4.2.1/icu4c-4_2_1-src.tgz
$ tar xvf icu4c-4_2_1-src.tgz
$ cd icu/source
$ ./configure --prefix=/usr/local
$ make
$ make install
$ cd ~

Now, we need to install another dependency, the SpiderMonkey, which is a Mozilla Foundation Javascript engine.

$ curl -O ftp://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz
$ tar xvf js-1.7.0.tar.gz
$ cd js/src
$ make BUILD_OPT=1 -f Makefile.ref
$ sudo mkdir -p /usr/include/smjs
$ sudo cp *.(h,tbl} /usr/include/smjs/
$ cd Darwin_OPT.OBJ
$ sudo cp *.h /usr/include/smjs/
$ sudo cp js /usr/local/bin/
$ sudo cp libjs.dylib /usr/local/lib/
$ cd ~

CouchDB is developed in Erlang, so we also need to install Erlang

$ curl -O http://www.erlang.org/download/otp_src_R13B01.tar.gz
$ tar xzf otp_src_R13B01.tar.gz
$ cd otp_src_R13B01
$ ./configure --prefix=/usr/local \
  --enable-smp-support --enable-hipe --enable-darwin-universal \
  --enable-threads
$ make
$ make install
$ cd ~

Installing CouchDB

$ svn co http://svn.apache.org/repos/asf/couchdb/trunk couchdb
$ cd couchdb
$ ./bootstrap
$ ./configure --prefix=/usr/local
$ make
$ sudo make install
$ cd ~

After the compiling and installing, you can check the couchdb version

$ couchdb -V

To start the couchdb:

$ sudo couchdb -b

Now, you can open your browser and access the couchdb:

http://127.0.0.1:5984/_utils

To stop couchdb:

$ sudo couchdb -d

That’s all folks

Advertisements

I do Mac now!

Hello Fellows,

After a long time desiring and dreaming, I got bought my first Mac Book. No, I didn’t buy an Aluminum, but I bought the White.

I’m still adapting with it, specially with the keyboard, but I can tell you guys that’s the Apple is amazing! Everything detail is so special and thought here. The Mac OS X Leopard is very stable and also very easy to use. Looks everything you try here is pretty easy to do.

The Mac OS X Leopard already comes with many tools for development. I already have Java, Ruby and Rails. You just have to update them to the latest version and that tasks is to easy.

I am still preparing my development environment, but I’ve already installed Eclipse, Git, Flex SDK, MySQL. For development with Ruby and Rails, I’ve installed Mac Vim and the Ruby plugin, but I am thinking of buying the famous Text Mate editor.

Well, now I’ll install JRuby and also Scala to keep by studies with Scala programming language.

I hope to back here soon sharing my experiences with Mac.

See you soon!