Thread: 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
> 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
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
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/
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 postgres:postgres /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).