开发者

Unable to install PostgreSQL on dev machine

I'm trying to install PGSQL 8.3 (and 8.4 and 9.0) on my work laptop. At the end of the installation, the installer complains it can't init the cluster. Investigating more, I noticed that the service is not even installed. I did use the "OneClick Installer", not the pgAdmin stand alone install. I tried installing as Administrator and as a regular user. In all the cases, the pgsql system account is created and the files copied, but the service is not.

I successfully installed PGSQL many times on my home PC. Both the laptop and desktop use Windows 7 64 bits (former is Professional, later is Ultimate). The only differences I can think of are that the laptop is part of an Active Directory and uses McAfee, while the desktop is only on a 开发者_开发知识库workgroup and uses Windows Security Essentials.


Are you sure the postgres user is allowed to create files in the data directory? The installer defaults to putting the data directory where the binaries are installed (e.g. c:\Program Files) which is usually not writeable by a regular user (and I never understood why the installer contains such an idiotic default).

McAffee could be an issue though. I have heard several stories about virus scanners infering with the Postgres (or other DBMS). Can you turn McAffee off - at least for the data directory?

Another problem could be that the installer is not able to create the postgres windows user (that is used to run the service).

If you are a local administrator on that machine, try to create the user before the installer does it. The installer will then not try to create the user account.

As a last ressort, you could install PostgreSQL without the installer (this is what I usually do).

  • Download the ZIP file from http://www.enterprisedb.com/products-services-training/pgbindownload
  • Unzip it into a convenient location
  • Run initdb (make sure you do that using the postgres user account - the one that is used to run the service later!)
  • run pg_ctlr register to create the Windows service

If any of those steps fails you'll see a proper error message which is not always the case with the installer.


Anti-virus is a well known issue:

  • http://wiki.postgresql.org/wiki/Running_&_Installing_PostgreSQL_On_Native_Windows#Antivirus_software

  • PostgreSQL connection problems (answer is from one the core developers)

  • Postgresql 8.4 and BitDefender 11


With earlier versions of PostgreSQL, I found I had to delete the user "postgres" before reinstalling would work. Not sure what versions had that problem, though.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜