简体   繁体   English

如何在Windows(或CentOS7)上构建pgloader?

[英]How to build pgloader on Windows (or CentOS7)?

I need to convert some MySQL databases to Postgresql. 我需要将一些MySQL数据库转换为Postgresql。

I came across the pgloader script, which promises to be the best solution, but coming from a Windows environment I have no idea how to build it. 我遇到了pgloader脚本,它承诺是最好的解决方案,但是来自Windows环境我不知道如何构建它。 My server has CentOS7, but I have never compiled anything myself on it, other than with yum . 我的服务器有CentOS7,但我从来没有在它上面编译任何东西,除了yum I just don't know where to start or even how to run the bootstrap-centos7.sh script, which is mentioned in the readme-file. 我只是不知道从哪里开始,甚至不知道如何运行自述文件中提到的bootstrap-centos7.sh脚本。

Did anyone ever compile pgloader on Windows or can provide some clear steps how to build this program on CentOS7 ? 有没有人在Windows上编译pgloader或者可以提供一些明确的步骤如何在CentOS7上构建这个程序?

perhaps you already installed this, but for other people it should be easy: 也许你已经安装了这个,但对于其他人来说应该很容易:

sudo yum install -y git
git clone https://github.com/dimitri/pgloader.git
cd pgloader
chmod +x ./bootstrap-centos7.sh
sudo ./bootstrap-centos7.sh
make pgloader

after make you can check if pgloader is working by exexuting command ./build/bin/pgloader --help (from pgloader directory) 在make之后你可以通过exexuting命令检查pgloader是否正在工作./build/bin/pgloader --help (来自pgloader目录)

In reference to bilak's answer I have tested his solution and saw some errors and it it still not functional yet. 在参考bilak的答案时,我已经测试了他的解决方案并看到了一些错误,但它仍然没有功能。

Following changes needed to be done from my side: 需要在我身边进行以下更改:

  1. sudo 'yum install -y git' instead of sudo yum install -y git sudo'yum install -y git'而不是sudo yum install -y git
  2. for the clone step I had to use git:// instead of https:// 对于克隆步骤,我必须使用git://而不是https://

The other things are the same for me. 其他的事情对我来说都是一样的。 But as soon as I want to execute the ./bootstrap-centos7.sh I am getting a bunch of error for unavailable servers and stuff. 但是一旦我想执行./bootstrap-centos7.sh我就会因为不可用的服务器和内容而出现一堆错误。

I will create an issue on this via Github and keep this answer updated... 我将通过Github在此创建一个问题并保持此答案更新...

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

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