You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Ido Ran <id...@gmail.com> on 2012/09/01 07:54:14 UTC

Re: Include CouchDB in Windows Application

Hi,
I have some news about running CouchDB in Windows.
I've run the setup application setup-couchdb-1.2.0-otp-R15B.exe and install
it in C:\Program Files (x86)\Apache Software Foundation\CouchDB (which is
the default installation location for 64 bit windows).

I've then start to copy directories into my home directory to see what
needed and what needed change.
I've end up with those directories:
- bin
- erts-5.9
- etc
- lib
- share
- var

I had to change bin\erl.ini to point to the couchdb directory as absolute
path.

I then try to remove unnessesary files. I was able to go into the CouchDB
directory into lib and search and delete the following directories:
- src (src, c_src, java_src)
- example
- include

This remove about 41MB.

This means I can copy all of the files I now have in my home directory
during the setup of my application, rewrite the path in erl.ini, rewrite
values in etc\couchdb\local.ini, for administator, port, url, and run
CouchDB as child process of my main application. This way I'll have control
over starting and stopping CouchDB for my application.

Have I missed something?


On Fri, Aug 31, 2012 at 9:44 PM, Ido Ran <id...@gmail.com> wrote:

> I use ClickOnce so the application get installed into the user AppData
> directory.
>
> I'll try it on virtual machine see how it works.
>
>
>
> ב-31 באוג 2012, בשעה 15:10, Dave Cottlehuber <dc...@jsonified.com> כתב/ה:
>
> On 31 August 2012 14:01, Ido Ran <id...@gmail.com> wrote:
>
> I can try to ensure there are no space in the path in my part, but, the
>
> user home directory might contain space.
>
> I've seen home directory of users with spaces in the name and even
>
> non-english characters.
>
> In my case I've seen Hebrew characters in the user home directory (I'm from
>
> Israel).
>
>
> I guess I'll have to try and see how this works.
>
>
> Thank you for the link.
>
>
> Ido
>
>
> On Fri, Aug 31, 2012 at 2:33 PM, Dave Cottlehuber <dc...@jsonified.com>
> wrote:
>
>
> On 31 August 2012 11:58, Ido Ran <id...@gmail.com> wrote:
>
>
> Hi,
>
> I'm developing a Windows 7 Client Application.
>
> I would like to use local CouchDB as my data store.
>
> I am currently using Microsoft ClickOnce deployment framework which allow
>
> to install an application without administrator privileges, which means
>
> it
>
> get install on the user home directory.
>
>
> 1) Is it possible to copy erlang runtime and CouchDB into the to
>
> directory
>
> in which my application will be install and run it from there, without
>
> executing any setup packages?
>
> 2) If no is it possible to setup CouchDB and erlang without admin
>
> account?
>
>
> Thank you,
>
> Ido
>
>
>
> Hi Ido,
>
>
> 1) yes, broadly speaking. Avoid spaces in path if you can. Erlang & CouchDB
>
> are fine with relative paths in the config, just ensure you are not
>
> changing
>
> working directory within Erlang/CouchDB itself obviously.
>
>
> 2) yes. unzip & run.
>
>
>
>
> http://wiki.apache.org/couchdb/Quirks_on_Windows#Integrating_CouchDB_into_your_Windows_Applications
>
>
> If you're missing any info, just reply back to this thread & I'll pick it
>
> up.
>
>
> A+
>
> Dave
>
>
>
> Where are you thinking of storing the CouchDB db & view files? e.g.
> http://msdn.microsoft.com/en-us/library/windows/apps/hh465109.aspx
>
> A+
> Dave
>
>

Re: Include CouchDB in Windows Application

Posted by Dave Cottlehuber <dc...@jsonified.com>.
On 10 September 2012 20:52, Ido Ran <id...@gmail.com> wrote:
> Hi,
> I just want to update that the test was successful and I manage to run
> CouchDB from my user directory which include both spaces, Hebrew characters.
> I've update the erlang.ini like so:

Sweet!

However you should be able to run erlang without an erl.ini at all.

The local paths in couch's ini files are all relative to %COUCH%/bin.

Did that not work for you?

A+
Dave

Re: Include CouchDB in Windows Application

Posted by Ido Ran <id...@gmail.com>.
Hi,
I just want to update that the test was successful and I manage to run
CouchDB from my user directory which include both spaces, Hebrew characters.
I've update the erlang.ini like so:

[erlang]

Bindir=..\\erts-5.9\\bin

Progname=erl

Rootdir=..

Which made the CouchDB deployment not care where it actually is in absolute
path.

This is important to me because I'm planning to use ClickOnce which put my
application in a directory I don't have control over.

I'll update as I progress, hope it help others.

Ido

On Sat, Sep 1, 2012 at 11:29 AM, Dave Cottlehuber <dc...@jsonified.com> wrote:

> On 1 September 2012 07:54, Ido Ran <id...@gmail.com> wrote:
> > Hi,
> > I have some news about running CouchDB in Windows.
> > I've run the setup application setup-couchdb-1.2.0-otp-R15B.exe and
> install
> > it in C:\Program Files (x86)\Apache Software Foundation\CouchDB (which is
> > the default installation location for 64 bit windows).
> >
> > I've then start to copy directories into my home directory to see what
> > needed and what needed change.
>
> There's a list of these in slim_couch.cmd [1].
>
> > I've end up with those directories:
> > - bin
> > - erts-5.9
> > - etc
> > - lib
> > - share
> > - var
> >
> > I had to change bin\erl.ini to point to the couchdb directory as absolute
> > path.
>
> You can use relative path or IIRC even no erl.ini at all [2].
>
> > I then try to remove unnessesary files. I was able to go into the CouchDB
> > directory into lib and search and delete the following directories:
> > - src (src, c_src, java_src)
> > - example
> > - include
> >
> > This remove about 41MB.
>
> Ditto [2] currently CouchDB ships with a full erlang install. I'd be
> interested
> to know if anybody actually requires this now or not.
>
> > This means I can copy all of the files I now have in my home directory
> > during the setup of my application, rewrite the path in erl.ini, rewrite
> > values in etc\couchdb\local.ini, for administator, port, url, and run
> > CouchDB as child process of my main application. This way I'll have
> control
> > over starting and stopping CouchDB for my application.
> >
> > Have I missed something?
>
> Use relative paths & this should be "copy all files" & you're done.
> Otherwise,
> LGTM. Do let me know how Hebrew path elements work out with erlang!
>
> [1]:
> https://www.dropbox.com/sh/jeifcxpbtpo78ak/su5OLiAyiI/misc/slim_couch.cmd
>
> [2]:
> http://mail-archives.apache.org/mod_mbox/couchdb-user/201203.mbox/%3CCAHZBNKamEANRQFgrk7yXfyfd7HsH2HKd8+SbqjoBTb=wbfOnUA@mail.gmail.com%3E
>
> A+
> Dave
>

Re: Include CouchDB in Windows Application

Posted by Dave Cottlehuber <dc...@jsonified.com>.
On 1 September 2012 07:54, Ido Ran <id...@gmail.com> wrote:
> Hi,
> I have some news about running CouchDB in Windows.
> I've run the setup application setup-couchdb-1.2.0-otp-R15B.exe and install
> it in C:\Program Files (x86)\Apache Software Foundation\CouchDB (which is
> the default installation location for 64 bit windows).
>
> I've then start to copy directories into my home directory to see what
> needed and what needed change.

There's a list of these in slim_couch.cmd [1].

> I've end up with those directories:
> - bin
> - erts-5.9
> - etc
> - lib
> - share
> - var
>
> I had to change bin\erl.ini to point to the couchdb directory as absolute
> path.

You can use relative path or IIRC even no erl.ini at all [2].

> I then try to remove unnessesary files. I was able to go into the CouchDB
> directory into lib and search and delete the following directories:
> - src (src, c_src, java_src)
> - example
> - include
>
> This remove about 41MB.

Ditto [2] currently CouchDB ships with a full erlang install. I'd be interested
to know if anybody actually requires this now or not.

> This means I can copy all of the files I now have in my home directory
> during the setup of my application, rewrite the path in erl.ini, rewrite
> values in etc\couchdb\local.ini, for administator, port, url, and run
> CouchDB as child process of my main application. This way I'll have control
> over starting and stopping CouchDB for my application.
>
> Have I missed something?

Use relative paths & this should be "copy all files" & you're done. Otherwise,
LGTM. Do let me know how Hebrew path elements work out with erlang!

[1]: https://www.dropbox.com/sh/jeifcxpbtpo78ak/su5OLiAyiI/misc/slim_couch.cmd

[2]: http://mail-archives.apache.org/mod_mbox/couchdb-user/201203.mbox/%3CCAHZBNKamEANRQFgrk7yXfyfd7HsH2HKd8+SbqjoBTb=wbfOnUA@mail.gmail.com%3E

A+
Dave