RSS

PostgreSQL with pgAdmin on Lion Server

24 Oct

I have to say I am a PostgreSQL fan when it comes to databases, mostly because that is what I am familiar with and what I started using first. I also tend to like softwares and services that are more to the open source side of things. But I was surprised to see that Mac OS X Lion Server came with PostgreSQL instead of MySQL unlike its predecessor Snow Leopard Server. Must be some licensing issue Apple had with Oracle I assume. But I will just provide a simple guide to help you get started using Postgres with pgAdmin. First step, open up the Server.app and turn on the web service.

Now download the latest version of pgAdmin and install.

The next step is to make sure postgres is listening for connection on localhost. For this open up terminal and open up /System/Library/LaunchDaemons/org.postgresql.postgres.plist for editing. Find listen_addresses and set it equal to 127.0.0.1.

If you are not sure how to do that, open up a new terminal, type in the following in order

cd ..
cd ..
sudo nano System/Library/LaunchDaemons/org.postgresql.postgres.plist

Find listen_addresses and make it listen_addresses=127.0.0.1

Now hit Ctrl+X and hit Y when asked to save.

Now restart postgres with the following commands

sudo serveradmin stop postgres
sudo serveradmin start postgres

Now go to the pgAdmin application downloaded earlier. It will ask you for a new server registration as shown below.

Use _postgres for username and the Administrator password as password.

Now you should have a pgAdmin successfully configured. You can use the PSQL console available under the menu for the rest of the work. All the documentation you will need are available here. Enjoy and let me know if you need any help.

Advertisements
 
3 Comments

Posted by on October 24, 2011 in Updates

 

3 responses to “PostgreSQL with pgAdmin on Lion Server

  1. serj

    October 1, 2013 at 12:32 am

    Not so far I have found new cool tool to work with postgresql – Valentina Studio. Its free edition can do things more than many commercial tools!!
    I very recommend check it. http://www.valentina-db.com/en/valentina-studio-overview

     
  2. Tim

    November 8, 2013 at 10:48 am

    What is the trick for OSX Server 10.9?

     
    • joe916

      November 8, 2013 at 11:04 am

      I have yet to try setting this up on 10.9
      I will update this as soon as I get around to it.

       

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: