Unix Technical Forum

postgresql source build instructions for ubuntu 7.04

This is a discussion on postgresql source build instructions for ubuntu 7.04 within the Pgsql General forums, part of the PostgreSQL category; --> The INSTALL file for postgresql 8.3rc1 lists the following install instructions: ../configure gmake su gmake install adduser postgres mkdir ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 12:18 AM
Jon Hancock
 
Posts: n/a
Default postgresql source build instructions for ubuntu 7.04

The INSTALL file for postgresql 8.3rc1 lists the following install
instructions:

../configure
gmake
su
gmake install
adduser postgres
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su - postgres
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &
/usr/local/pgsql/bin/createdb test
/usr/local/pgsql/bin/psql test

I get to the 4th step and see I need gmake. I use make instead.
Things seem ok.

Then all is well, until line 10: /usr/local/pgsql/bin/initdb -D /usr/
local/pgsql/data
The bin directory is not accessible to anyone but root due to the
permissions of the install. Should I have used a different umask for
the make/install process?

As I'm new to pg, what should I change the permissions to? Should I
make the entire bin directory executable by anyone?

Does anyone have experience with installing from source on ubuntu
7.04?

thanks, Jon

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 12:19 AM
Leonel Nunez
 
Posts: n/a
Default Re: postgresql source build instructions for ubuntu 7.04

> The INSTALL file for postgresql 8.3rc1 lists the following install
> instructions:
>
> ./configure
> gmake
> su
> gmake install
> adduser postgres
> mkdir /usr/local/pgsql/data
> chown postgres /usr/local/pgsql/data
> su - postgres
> /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
> /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &
> /usr/local/pgsql/bin/createdb test
> /usr/local/pgsql/bin/psql test
>
> I get to the 4th step and see I need gmake. I use make instead.
> Things seem ok.
>
> Then all is well, until line 10: /usr/local/pgsql/bin/initdb -D /usr/
> local/pgsql/data
> The bin directory is not accessible to anyone but root due to the
> permissions of the install. Should I have used a different umask for
> the make/install process?
>
> As I'm new to pg, what should I change the permissions to? Should I
> make the entire bin directory executable by anyone?
>
> Does anyone have experience with installing from source on ubuntu
> 7.04?
>
> thanks, Jon
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>



and what are the permissions and owner for
/usr/local/pgsql/data

?


Leonel



---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-10-2008, 12:19 AM
Greg Smith
 
Posts: n/a
Default Re: postgresql source build instructions for ubuntu 7.04

On Fri, 18 Jan 2008, Jon Hancock wrote:

> I get to the 4th step and see I need gmake. I use make instead.


If you look at your make you'll probably find this:

gsmith@gsmith-ubuntu:~$ make -v
GNU Make 3.81

The standard Ubuntu make is gmake, just isn't named that way by them.

> The bin directory is not accessible to anyone but root due to the
> permissions of the install. Should I have used a different umask for
> the make/install process? As I'm new to pg, what should I change the
> permissions to? Should I make the entire bin directory executable by
> anyone?


As you're asking it this isn't really a PostgreSQL problem, it's a UNIX
permissions question. You should make the directory executable by
everybody you want it to be executable by. I think your real question
should be "how are the permissions set by the regular Ubuntu PostgreSQL
package?" so that you can do the same thing they do. What you might
consider is installing the official version, seeing how they set things
up, take some notes on the permissions used, and then set the permissions
on your source-based installation so they're similar.

--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-10-2008, 12:19 AM
=?ISO-8859-1?Q?Julio_Cesar_S=E1nchez_Gonz=E1lez?=
 
Posts: n/a
Default Re: postgresql source build instructions for ubuntu 7.04

Jon Hancock wrote:
> The INSTALL file for postgresql 8.3rc1 lists the following install
> instructions:
>
> ./configure
> gmake
> su
> gmake install
> adduser postgres
> mkdir /usr/local/pgsql/data
> chown postgres /usr/local/pgsql/data
> su - postgres
> /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
> /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &
> /usr/local/pgsql/bin/createdb test
> /usr/local/pgsql/bin/psql test
>
> I get to the 4th step and see I need gmake. I use make instead.
> Things seem ok.
>
> Then all is well, until line 10: /usr/local/pgsql/bin/initdb -D /usr/
> local/pgsql/data
> The bin directory is not accessible to anyone but root due to the
> permissions of the install. Should I have used a different umask for
> the make/install process?
>
> As I'm new to pg, what should I change the permissions to? Should I
> make the entire bin directory executable by anyone?
>
> Does anyone have experience with installing from source on ubuntu
> 7.04?
>
> thanks, Jon
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>
>

try change owner to data, "chown postgres.postgres /usr/local/pgsql/data"

--
Regards,

Julio Cesar Sánchez González.

--
Ahora me he convertido en la muerte, destructora de mundos.
Soy la Muerte que se lleva todo, la fuente de las cosas que vendran.

www.sistemasyconectividad.com.mx http://darkavngr.blogspot.com/


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-10-2008, 12:19 AM
T.J. Adami
 
Posts: n/a
Default Re: postgresql source build instructions for ubuntu 7.04

On 22 jan, 05:02, know...@sistemasyconectividad.com.mx (Julio Cesar
Sánchez González) wrote:
> Jon Hancock wrote:
> > The INSTALL file for postgresql 8.3rc1 lists the following install
> > instructions:

>
> > ./configure
> > gmake
> > su
> > gmake install
> > adduser postgres
> > mkdir /usr/local/pgsql/data
> > chown postgres /usr/local/pgsql/data
> > su - postgres
> > /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
> > /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &
> > /usr/local/pgsql/bin/createdb test
> > /usr/local/pgsql/bin/psql test

>
> > I get to the 4th step and see I need gmake. I use make instead.
> > Things seem ok.

>
> > Then all is well, until line 10: /usr/local/pgsql/bin/initdb -D /usr/
> > local/pgsql/data
> > The bin directory is not accessible to anyone but root due to the
> > permissions of the install. Should I have used a different umask for
> > the make/install process?

>
> > As I'm new to pg, what should I change the permissions to? Should I
> > make the entire bin directory executable by anyone?

>
> > Does anyone have experience with installing from source on ubuntu
> > 7.04?

>
> > thanks, Jon


By the way, if you want compile PostgreSQL and all of its features on
Ubuntu, you'll need to do some sets and install some extra packages
(make sure your universe and multiverse repositories are working
fine).

1) Installing all necessary packages for PostgreSQL:
sudo apt-get install g++ libreadline5-dev flex bison libzzip-dev libio-
zlib-perl zlib1g-dev zlib-bin zlibc zziplib-bin libperl-dev python-dev
build-essential

2) Expect libperl to work fine (assume your right version of installed
libperl, mine is 5.8);
sudo ln -s /usr/lib/libperl.so.5.8 libperl.so

3) Expand files
sudo tar -xjvf postgresql-8.2.5.tar.bz2

4) Access the source dir
cd postgresql-8.2.5

5) Adding group and user
sudo groupadd postgres
sudo adduser -g postgres postgres

6) Configure (please fill the options with your preferences)
sudo ./configure --prefix=/usr/local/postgres --bindir=/usr/bin --
sysconfdir=/etc/postgres --with-perl --with-python

7) Do make!
sudo make
sudo make install

8) Create postgresql folder and set the owner to postgres group and
user
sudo mkdir /usr/local/postgres/data
sudo chown postgresostgres /usr/local/postgres/data

9) Change the current user to postgres
sudo su postgres

10) Start a new cluster (choose your enconding, mine is latin1)
initdb -E latin1 -D /usr/local/postgres/data

And there you go!

If you get any errors, please fell free to contact me on (adamitj at
gmail dot com).
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-10-2008, 12:19 AM
Jon Hancock
 
Posts: n/a
Default Re: postgresql source build instructions for ubuntu 7.04

On Jan 21, 5:16 am, gsm...@gregsmith.com (Greg Smith) wrote:
> On Fri, 18 Jan 2008, Jon Hancock wrote:
> > I get to the 4th step and see I need gmake. I use make instead.

>
> If you look at your make you'll probably find this:
>
> gsmith@gsmith-ubuntu:~$ make -v
> GNU Make 3.81
>
> The standard Ubuntu make is gmake, just isn't named that way by them.
>
> > The bin directory is not accessible to anyone but root due to the
> > permissions of the install. Should I have used a different umask for
> > the make/install process? As I'm new to pg, what should I change the
> > permissions to? Should I make the entire bin directory executable by
> > anyone?

>
> As you're asking it this isn't really a PostgreSQL problem, it's a UNIX
> permissions question. You should make the directory executable by
> everybody you want it to be executable by. I think your real question
> should be "how are the permissions set by the regular Ubuntu PostgreSQL
> package?" so that you can do the same thing they do. What you might
> consider is installing the official version, seeing how they set things
> up, take some notes on the permissions used, and then set the permissions
> on your source-based installation so they're similar.
>
> --
> * Greg Smith gsm...@gregsmith.comhttp://www.gregsmith.comBaltimore, MD
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings


I'm still trying to figure out if I have all the options as needed.
However, I have learned that if I set my umask to 022 prior to the
make or install process that I do get decent permissions and the rest
of the source install instructions work without modification. Would be
good for this data point to be added to the instructions for us
nubes

thanks, Jon
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:07 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com