Re: postgresql source build instructions for ubuntu 7.04

Поиск
Список
Период
Сортировка
От T.J. Adami
Тема Re: postgresql source build instructions for ubuntu 7.04
Дата
Msg-id 6b2fa39e-03f4-4d17-9fdc-ca3a9561ca81@s13g2000prd.googlegroups.com
обсуждение исходный текст
Ответ на postgresql source build instructions for ubuntu 7.04  (Jon Hancock <redstarling@gmail.com>)
Список pgsql-general
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).

В списке pgsql-general по дате отправления:

Предыдущее
От: "Marko Kreen"
Дата:
Сообщение: Re: Postgresql + digital signature
Следующее
От: Rick Schumeyer
Дата:
Сообщение: Tips for upgrading from 7.4