Search Postgresql Archives

Re: Still no way to install PostGres on os x Lion?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday, August 27, 2011 4:26:59 PM UTC-6, Darren Duncan wrote:
> Kenneth McDonald wrote:
> > Unfortunately, "initdb" has not been installed into a directory on the shell
> > search path, and I can't find it by inspecting other likely places. I do like
> > OS X, but sometimes its unique approach to doing things causes problems.
> 
> I don't believe that is an OS X problem but rather a problem with your installer.
> 
> Try building from source instead, which I believe would use the normal Unix 
> locations.
> 
> In fact, in my experience, having built Postgres on Mac OS X and using the 
> binary installer, I found the source was actually easier to do.
> 
> FYI, this is basically what I did; I use custom locations by preference for both 
> the binaries and data, and I use custom OS users and custom ports, so to avoid 
> conflicts with any other installed software including some other Pg install. 
> But at the same time, no default locations for config/data/etc files are changed 
> at compile time so the binary should behave like default settings.
> 
> First, this was done as the OS user that would own the program files:
> 
>      tar zxvf postgresql-9.0.4.tar.gz
>      cd postgresql-9.0.4
>      ./configure --with-openssl --prefix=/myapp/deps/shared/Postgres/current
>      make
>      make check
>      make install
> 
> Then to create a database, done as the OS user that would own the db files or 
> that Postgres would execute as:
> 
>      /myapp/deps/shared/Postgres/current/bin/initdb \
>          -D /myapp/data/postgres/current -U postgres -W
> 
> To start the Postgres server, do this as the OS user that Postgres runs as:
> 
>      /myapp/deps/shared/Postgres/current/bin/postmaster \
>          -D /myapp/data/postgres/current &
> 
> To stop the server:
> 
>      /myapp/deps/shared/Postgres/current/bin/pg_ctl stop \
>          -D /myapp/data/postgres/current -m fast
> 
> To make the server run automatically at startup, I think I had a process but it 
> was outdated so you'll have to figure this out yourself.
> 
> Details of how to login with psql or create databases etc or to choose what port 
> you want to use, I'm sure you know or could figure out.
> 
> If you want to use Pg in its default location, remove the --prefix= part or 
> otherwise make appropriate adjustments.
> 
> My example didn't select any options except for openssl, so for example I didn't 
> add PL/whatever, though I believe PL/PgSQL is standard with Pg 9+ (in 8.4 it 
> wasn't).
> 
> See also the Pg install/setup info files as they suggest changes to certain Mac 
> OS X settings so Pg runs better.
> 
> I hope this helps.
> 
> -- Darren Duncan
> 
> > On Aug 27, 2011, at 3:48 PM, Darren Duncan wrote:
> > 
> >> Kenneth McDonald wrote:
> >>> While trying to install 9.0.4, I ran into this: Problem running
> >>> post-install step. Installation may not complete correctly The database
> >>> cluster initialisation failed. A little bit of digging revealed reports
> >>> to the effect that the PostGres installer did not yet handle Lion. Is
> >>> there a workaround for this, or a fix in the near (hopefully immediate)
> >>> future?
> >> Are you running a binary installer or are you building from source?
> >> 
> >> You should be able to create the database cluster yourself on the command
> >> line.  The software is already installed, it sounds like.  You would be
> >> doing this periodically anyway; a cluster is just your Postgres data files.
> 
> -- 
> Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

Thank you for this concise and accurate post. 
I made the same mistake of installing Postgres DB Enterprise binaries, which is not what I wanted as a developer.
Will follow Darren's instructions to get the install done right...

Rick Casey


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux