2012-04-24 29 views
2

我在postgresql網站上獲得了postgresql-8.4.9.tar.bz2軟件包,並按照文件INSTALL上的說明進行安裝。但是,當我們嘗試運行它,它不工作,並拋出這個錯誤:如何在有mysql的機器上安裝(並運行)postgresql?

/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data 
LOG: could not bind IPv6 socket: Address already in use 
HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. 
LOG: could not bind IPv4 socket: Address already in use 
HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry. 
WARNING: could not create listen socket for "localhost" 
FATAL: could not create any TCP/IP sockets 

我不知道,也許是因爲MySQL的一些衝突。有人知道發生了什麼事嗎?

在此先感謝!

+1

MySQL和PostgreSQL可以運行在同一臺服務器上就好了一起。這聽起來像你已經有一個Postgres運行的實例。試試'ps ax | grep postmaster「或類似文件來確定服務器守護進程是否已經在運行。 – 2012-04-24 16:57:31

+0

它確實在運行!殺死它幾乎解決了所有問題。謝謝! – 2012-04-24 17:38:02

回答

6

看來,另一個進程正在偵聽端口5432嘗試運行以下命令:

sudo netstat -tulpn | grep 5432 
+0

是啊!這基本上是問題所在。只需要殺死進程並更改postgres目錄的權限以及正在運行的東西。非常感謝你! – 2012-04-24 17:37:04

+0

@Jayme你是如何殺死netstat命令中找到的進程的? – guptron 2014-09-09 13:56:44

+0

@dotsConnect我想我使用了這個命令:kill -9'ps aux | grep -i'postgres'| awk'{print $ 2}''或類似的東西。 netstat給出你需要的進程ID。例如: tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 1201/postgres kill -9 1201也解決了它。 ;) – 2014-09-09 14:36:19

相關問題