Installing PostgreSQL with PostgreSQL Tools for MacOS X
April 22nd, 2008Mr. Dru made PostgreSQL server installation to OS X super EASY, Painless, and Simple.
no readline installation, no Fink port installation, no command line business!
Just simply download package from PostgreSQL for Mac.
Double click the dmg (at the time of writing postgresql_831.dmg was the current version).
Open the “Server” folder and double click “PostgreSQL 8.3.1″ to start installation.
This will install the followings:
1. Handy utilities such as start/stop server will be installed to Applications >> PostgreSQL
2. Server and the rest will be installed to Macintosh HD >> Library >> PostgreSQL8
Now, most of the time, that is all you need!!!
I personally recommend to download pgAdmin3 as client.
Of course, some will experience problem. I installed 3 times and had problem with last installation and here are the some helpful tip to resolve the problem.
Q. This installation creates new user postgres. What is the password for postgres?
password for postgres is required for some operation. Go to System Preference >> Account >> overwrite current passoword.
Q. I want to perform above but postgres user is not visible in System Pref >> Account. Can I make it visible?
1. Start NetInfo Manager (Applications >> utilities)
2. menu “Domain” >> Open >> type “localhost” in domain text field
3. Click the lock icon to unlock it (will ask you admin pswd)
4. go to users >> select postgres then change the Shell to /bin/bash
5. now the account should be visible!
Q. I want this postgres account to be invislbe but like to perform task as postgres without password. Is it possible?
Befure you “su - postgres”, use “sudo bash” so you will be root, then “su - postgres” will not ask you a password.
Q. data folder (/Library/PostgreSQL8/data) is empty and giving me an error.
Due to permission issue, this operation could fail during the installation. You just need toinit the db with following command:
su -m postgres -c ‘/Library/PostgreSQL8/bin/initdb -D /Library/PostgreSQL8/data’