简体   繁体   English

Windows 应用程序中嵌入的零部署 CouchDB?

[英]Zero deployment CouchDB embedded in a Windows app?

I'm probably dreaming here, but am wondering if there's any possibility of completely embedding a minimal CouchDB engine within a Windows application, such that the app can be run without requiring installation (of CouchDB/Erlang) on the user's computer.我可能在这里做梦,但想知道是否有可能在 Windows 应用程序中完全嵌入一个最小的 CouchDB 引擎,这样应用程序就可以运行而无需在用户的计算机上安装(CouchDB/Erlang)。

I already provide this slimmed down / bundled ability - check here https://github.com/dch/couchdb/downloads and specifically the lean bundle at 16MiB erlang + all couch love here https://github.com/downloads/dch/couchdb/couchdb-1.1.0+COUCHDB-1152_otp_R14B03_lean.7z I already provide this slimmed down / bundled ability - check here https://github.com/dch/couchdb/downloads and specifically the lean bundle at 16MiB erlang + all couch love here https://github.com/downloads/dch/ couchdb/couchdb-1.1.0+COUCHDB-1152_otp_R14B03_lean.7z

Some brief notes on bundling and embedding couchdb on windows at wiki.apache.org/couchdb/Quirks_on_Windows including how to hide the erlang window (erl.exe -detached) at startup. Some brief notes on bundling and embedding couchdb on windows at wiki.apache.org/couchdb/Quirks_on_Windows including how to hide the erlang window (erl.exe -detached) at startup.

Ask on CouchDB @user mailing list if you want more info or help while you have a crack at this.如果您想了解更多信息或帮助,请在 CouchDB @user 邮件列表上询问。

While not a code solution, you could use one of the bundling applications that can embed files and other files into one executable.虽然不是代码解决方案,但您可以使用可以将文件和其他文件嵌入到一个可执行文件中的捆绑应用程序之一。 One example would be BoxedApp . BoxedApp就是一个例子。

The CouchDB wiki does provide at least a few tips for Integrating CouchDB into your Windows Applications . CouchDB wiki 确实提供了至少一些将 CouchDB 集成到 Windows 应用程序中的技巧。 YMMV, from what I can tell it's more or less just tips on creating a relocatable build. YMMV,据我所知,它或多或少只是有关创建可重定位构建的提示。 You'll want to likely generate a solid random admin user/password into the local.ini file during the install process and set up proper permissions on all created databases (to protect against any potential cross-site scripting vulnerabilities) in addition to ensuring the socket binding only happens on the default localhost interface.除了确保套接字绑定只发生在默认的 localhost 接口上。

Why bother.何必。 It is so easy to install Erlang on Windows.在 Windows 上安装 Erlang 非常容易。 Just bundle up the whole thing including the erl.exe binary and have your installer unzip it into a folder.只需捆绑包括 erl.exe 二进制文件在内的整个内容,然后让安装程序将其解压缩到一个文件夹中。 The only thing that you would need to change would be the batch files, or better yet, discard them and write your own batch file to start up CouchDb.您唯一需要更改的是批处理文件,或者更好的是,丢弃它们并编写您自己的批处理文件来启动 CouchDb。 Also, it is a good idea to use a different port that either the normal Erlang port (or the usual CouchDB port) and maybe even get Erlang to use localhost as its "shortname".此外,最好使用与普通 Erlang 端口(或通常的 CouchDB 端口)不同的端口,甚至可以让 Erlang 使用 localhost 作为其“短名称”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM