PostgreSQL Solaris PKG Installation
PostgreSQL Solaris PKG Installation
PostgreSQL Solaris PKG Installation
SPARC / x86
version 1.0
Written by
Robert Lor, Sun Microsystems, robert.lor@sun.com
Rob Stephens, Sun Microsystems, rob.stephens@sun.com
Last updated: Thu January 22, 2005
This documentation provides informal discussion and details for installing and getting
started with the PostgreSQL Database Server on Solaris SPARC/x86. The Solaris
packages are ready-to-install binary files for Solaris distributions. Please note that this
article is written for 8.1 and above.
The format and some of its content was derived from the PostgreSQL Linux installation guide by Devrim
GUNDUZ and Lamar Owen, available at http://pgfoundry.org/projects/pgsqlrpms.
General Information
The following email aliases are being provided for discussions, updates and anything
related to this project and its distribution. These aliases are open to all and we
encourage your feedback.
• Project Announcements
• solarispackages-announce@pgfoundry.org
• Project Discussions and Feedback
• solarispackages-general@pgfoundry.org
• solarispackages-hackers@pgfoundry.org
Obtaining the Packages
The packages provided in this release are currently in Beta. We encourage your
feedback and any comments you may have. The beta packages can be downloaded
from.
http://pgfoundry.org/projects/solarispackages/
The official package release will be available from the PostgreSQL FTP site and all of its
mirrors once the project is out of Beta. For your convenience, you may try using the
PostgreSQL's FTP site web interface. There it will suggest a suitable download. The URL
is:
http://www.postgresql.org/ftp
The official release will also be made available via a bittorrent client. For details, please
visit
http://www.postgresql.org/download/bittorrent
SUNWpostgr-libs The SUNWpostgr-libs package provides the essential shared libraries for any
PostgreSQL client program or interface. You will need to install this package to
use any other PostgreSQL package or any clients that need to connect to a
PostgreSQL server.
SUNWpostgr If you want to manipulate a PostgreSQL database on a local or remote
PostgreSQL server, you need this package. You also need to install this
package if you're installing the SUNWpostgr-server package.
SUNWpostgr- The SUNWpostgr-contrib package contains contributed packages that are
contrib included in the PostgreSQL distribution.
SUNWpostgr- The SUNWpostgr-devel package contains the header files and libraries needed
devel to compile C or C++ applications which will directly interact with a
PostgreSQL database management server and the ecpg Embedded C Postgres
preprocessor. You need to install this package if you want to develop
applications which will interact with a PostgreSQL server.
SUNWpostgr-docs The SUNWpostgr-docs package includes the SGML source for the
documentation as well as the documentation in PDF format and some extra
documentation. Install this package if you want to help with the PostgreSQL
documentation project, or if you want to generate printed documentation.
SUNWpostgr- The SUNWpostgr-server package includes the programs needed to create and
server run a PostgreSQL server, which will in turn allow you to create and maintain
PostgreSQL databases. You should install SUNWpostgr-server if you want to
create and maintain your own PostgreSQL databases and/or your own
PostgreSQL server. You also need to install the SUNWpostgr package and its
requirements.
SUNWpostgr- The SUNWpostgr-server-data package creates the default data directories and
server-data may contain demo database.
SUNWpostgr-tcl The SUNWpostgr-tcl package contains the Pgtcl client library and its
documentation.
SUNWpostgr-jdbc The SUNWpostgrjdbc package includes the .jar files needed for Java programs
to access a PostgreSQL database.
SUNWpostgr-pl The SUNWpostgr-pl package contains the the PL/Perl, and PL/Python
procedural languages for the backend. PL/Pgsql is part of the core server
package.
To quickly get PostgreSQL up and running, you can install a subset of the packages
available. See the table above for further information. Here are a couple of scenarios:
• If you only want to run a Postgres server, install SUNWpostgr-libs, SUNWpostgr,
SUNWpostgr-server-data, and SUNWpostgr-server.
• If you only want to run the Postgres client, install SUNWpostgr-libs and
SUNWpostgr.
If a package depends on other package(s), you will need to install these dependencies
first. You will be notified of these dependencies during install.
These Solaris packages do not support any sort of upgrading process other than that
documented in the regular documentation. That is, you must dump, upgrade, initdb,
and restore your data. You must remove the old server package, install the new
package and restore the data from dump.
Executables /usr/bin
Libraries /usr/lib
Documentation /usr/share/doc/pgsqlx.y.z
/usr/share/doc/pgsqlx.y.z/contrib
Contrib /usr/share/pgsql/contrib
Data /var/lib/pgsql/data
Backup area /var/lib/pgsql/backup
Templates /usr/share/pgsql
Procedural Languages /usr/lib/pgsql
Development
/usr/include/pgsql
Headers
Other shared data /usr/share/pgsql
The above list references the Solaris OS file system structure. These locations may
change for other distributions. It is recommended that you follow these guidelines to
ensure the system functions properly.
For example, the following command will install SUNWpostgr-libs package from the
current directory.
# pkgadd -d . SUNWpostgr-libs
1. Download the patch, unzip and untar it into any directory (e.g. /var/tmp).
2. Add the patch to the system. You must have root privileges to add a patch.
# patchadd /var/tmp/121606-01
After the patch is installed successfully, you can proceed to install PL/Python.
3. Verify that the package has successfully been removed, use the
pkginfo command.
# pkginfo | egrep pkg-abbrev
NOTE: You should stop all server processes before removing packages.
2. The next step is to ensure that the user administering the database has write
permissions to the PostgreSQL data directory. The default location for this
directory is /var/lib/pgsql/data. This can be accomplished in several ways. It is
recommended that you set the ownership of the PostgreSQL data directory to
the user you have determined will administer the database and set it with read,
write, and execute permissions.
For example, to set ownership and permissions for a user called “postgres”,
execute the following commands:
3. You are now ready to create the database cluster. Login as the user you have
just created or have previously determined will administer the database and
execute the following command.
$ initdb -D /var/lib/pgsql/data/mydata
You're done!
Contrib Files
The contents of the contrib tree are packaged into the SUNWpostgr-contrib package
and are processed with make and make install. There is documentation in
/usr/share/doc/postgresql-contrib-VERSION for these modules. Most of the modules are
in /usr/lib/pgsql for loadable modules, and binaries are in /usr/bin. In the future these
files may be split out, depending upon function and dependencies.
More Information
You can get more information at http://www.postgresql.org
Please help make this packaging better --let us know if you find problems, or better
ways of doing things. You can reach us by e-mail at solarispackages-
hackers@pgfoundry.org.