Wiki Wiki

Installation_FreeBSD

Installation Tips on FreeBSD

FreeBSD 8.0

Background

  • Using PostgreSQL 8.4.4 from ports

Tip: After other updates, I appeared to be left without a gettext library, libintl.so.8, which is specifically required by postgresql. After much searching I found a tip on the web suggesting a symlink as such:

# cd /usr/local/lib
# ln -s libintl.so.9 libintl.so.8
So far so good!
  • Using R 2.11.1 from ports
    • This provides a 64 bit build.
  • Using the 8.3.0.10 pl/r build

1. I installed

  • Install the ports as above

2. Get to the contrib directory

$ cd /usr/local/share/postgresql/contrib

3. get plr

# sudo curl -O [http://www.joeconway.com/plr/plr-8.3.0.10.tar.gz]
	Password:
  • Actually, using sudo the whole way can be tedious. You might prefer to su - I did this and it was much easier in the end.
  • You also have to be prepared to be careful, as you can do horrendous damage if you are not careful. You have been warned!

4. Extract package

sh-3.2# tar -xzf plr-8.3.0.10.tar.gz

5. look inside

sh-3.2# cd plr

6. set environment variables:

(actually, I've now put these into ~/.profile)

sh-3.2# setenv USE_PGXS 1

7. Make & Install

The trick here is to use gmake (gnu make), not the normal make command, which invokes FreeBSD's entire make process.

sh-3.2# gmake
sh-3.2# gmake install

8. restart postmaster with the appropriate environment variables :

sh-3.2# su pgsql
    Password:
sh-3.2$ pg_ctl -D /usr/local/pgsql/data stop
waiting for server to shut down.... done
server stopped
sh-3.2$ pg_ctl -D /usr/local/pgsql/data start
server starting
sh-3.2$ exit

9. load database

From the command line:

$ psql -d mydatabase -U myowner -f /usr/local/share/postgresql/contrib/plr/plr.sql

or reading the file into the database:

$ psql mydatabase
mydatabase=# \i /usr/local/share/postgresql/contrib/plr.sql
0 Załączniki 0 Załączniki
403 Wyświetleń

Średnia (0 Głosy)
Copyright (c) 2010 Joseph E Conway. All rights reserved.