用于通过 USB 驱动器进行开发的便携式 PostgreSQL

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1100523/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 22:16:53  来源:igfitidea点击:

Portable PostgreSQL for development off a usb drive

postgresqlportabilityusb-driveportable-database

提问by Simurr

In order to take some development work home I have to be able to run a PostgreSQL database.

为了将一些开发工作带回家,我必须能够运行 PostgreSQL 数据库。

I don't want to install anything on the machine at home. Everything should run off the usb drive.

我不想在家里的机器上安装任何东西。一切都应该从 USB 驱动器上运行。

What development tools do you carry on your USB drive?

您的 USB 驱动器上带有哪些开发工具?

That question covers pretty much everything else, but I have yet to find a guide to getting postgresql portable. It doesn't seem easy if it's even possible.

这个问题几乎涵盖了其他所有内容,但我还没有找到使 postgresql 可移植的指南。如果有可能,这似乎并不容易。

So how do I get PostgreSQL portable? Is it even possible?

那么如何让 PostgreSQL 可移植呢?甚至有可能吗?

EDIT:

编辑:

PostgreSQL Portableworks. It's very slow on the usb-drive I have, but it works. I can't recommend doing constant development with it but for what I need it's great.

PostgreSQL 便携式作品。我的 USB 驱动器上的速度非常慢,但它可以工作。我不建议使用它进行持续开发,但对于我需要的东西,它很棒。

Perhaps if I pick up a full speed external drive I'll try out virtualization. Given the poor performance of just running the database off this drive, a full virtual OS running off of it would be unusable.

也许如果我拿起一个全速外部驱动器,我会尝试虚拟化。鉴于仅在此驱动器上运行数据库的性能不佳,运行在该驱动器上的完整虚拟操作系统将无法使用。

回答by Alex Beardsley

An alternate route would be to use something like VirtualBoxand just install your development environment (database, whatever) on there.

另一种方法是使用VirtualBox 之类的东西,然后在那里安装您的开发环境(数据库等)。

回答by user61629

There are 2 projects to try in 2014: http://sourceforge.net/projects/pgsqlportable/and http://sourceforge.net/projects/postgresqlportable/?source=recommended.

2014 年有 2 个项目要尝试:http: //sourceforge.net/projects/pgsqlportable/http://sourceforge.net/projects/postgresqlportable/?source=recommended

I can't vouch for the second, but I'm using the first and it works right out of the box.

我不能保证第二个,但我正在使用第一个,它开箱即用。

After unzipping using 7-zip (http://www.7-zip.org/download.html):

使用 7-zip ( http://www.7-zip.org/download.html)解压后:

1) Run "start service without usuario.bat" ( english translation )
2) Then run "pgadmin3.bat"

The only minimal problem for me was that its in spanish. I've been able to change the language to english by following Change language of system and error messages in PostgreSQL. Using google translate the instructions are:

对我来说唯一的小问题是它是西班牙语。通过遵循PostgreSQL 中的更改系统语言和错误消息,我已经能够将语言更改为英语。使用谷歌翻译的说明是:

Description

This is a zip to automatically run postgresql 9.1.0.1 for windows. This version already has pgagent and pldebugger. To run must: 1) unzip the zip 2) run the "start service without usuario.bat" found in the pgsql directory within the folder you just unzipped. 3) Optional. If you want to run the agent works postgresql (pgagent) should only run the "start pgagent.bat" found in the pgsql directory inside the folder you just unzipped. 4) Optional. To manage and / or develop the bd you can run the pgadmin3.bat 5 files) Optional. To stop and / or restart the server correctly use file "service without stopping usuario.bat" usuario.bat or restart service without depending on the case.

Now option for Linux (file. Tar.gz). Postgresql portable Linux 9.2    

Please use the tickets for your answer bugs.    

Username: postgres Password: 123

描述

这是一个 zip,用于为 Windows 自动运行 postgresql 9.1.0.1。这个版本已经有 pgagent 和 pldebugger。要运行必须:1) 解压 zip 2) 运行在您刚刚解压的文件夹中的 pgsql 目录中找到的“不带 usuario.bat 的启动服务”。3) 可选。如果你想运行代理工作 postgresql (pgagent) 应该只运行在你刚刚解压的文件夹内的 pgsql 目录中找到的“启动 pgagent.bat”。4) 可选。要管理和/或开发 bd,您可以运行 pgadmin3.bat 5 文件)可选。要停止和/或重新启动服务器正确使用文件“服务而不停止usuario.bat”usuario.bat 或重新启动服务而不取决于情况。

Now option for Linux (file. Tar.gz). Postgresql portable Linux 9.2    

Please use the tickets for your answer bugs.    

Username: postgres Password: 123

Just a Note : on a new computer , to get pgadminIII working you may need to add a db. The settings are in attached screenshot.

请注意:在新计算机上,要使 pgadminIII 正常工作,您可能需要添加一个 db。设置在附件截图中。

Hope it helps.

希望能帮助到你。

enter image description here

在此处输入图片说明

回答by Jhonny D. Cano -Leftware-

I agree with virtualization solution, but maybe you can find useful this linkfrom portable freeware collection, I have used this locally, not from usb though

我同意虚拟化解决方案,但也许您可以从便携式免费软件集合中找到有用的链接,我在本地使用过它,但不是从 USB 使用的