2
0
mirror of https://github.com/xcat2/xcat-dep.git synced 2024-11-21 17:11:45 +00:00

notes and instructions to build postgresql database

Former-commit-id: c59e439e355ab6c19f82c846b7db43d7beebced6
This commit is contained in:
lissav 2010-05-26 17:34:03 +00:00
parent ab02261c41
commit be4242ddcd
2 changed files with 103 additions and 0 deletions

66
AIX/xcat-Pg/Build-notes Normal file
View File

@ -0,0 +1,66 @@
Notes to build, install and create rpms for Postgresql for AIX 6.1
Get from the Linux toolbox and install:
zlib-1.2.3-4.aix5.2.ppc.rpm
zlib-devel-1.2.3-4.aix5.2.ppc.rpm
gcc-4.2.0-3.aix6.1.ppc.rpm
make-3.80-1.aix5.1.ppc.rpm
readline* ( did not work for me)
Download postgresql source tarball recent release ( we had 8.4.4)
/www.postgresql.com
put in /postgres directory ( make sure you have plenty of / and /var space)
cd /postgres
unzip and untar the file
gunzip postgresql-8.4.4.tar*
tar -xvf postgresql-8.4.4.tar
cd postgresql-8.4.4
read INSTALL for all instructions, what follows is from that file
Setup to build on the machine and install in /var/lib/pgsql directory
./configure --prefix=/var/lib/pgsql --with-openssl --without-readline
gmake
If the build complete ok then:
su - lissa ( any non-root user)
cd /postgres/postgresql-8.4.4
gmake check
Should come back with:
============== shutting down postmaster ==============
server stopped
=======================
All 120 tests passed.
=======================
If check is ok, then return to root
As root:
cd /postgres/postgresql-8.4.4
gmake install
When the install is complete, build a tarball out of the compiles installed pg
tar -cvf postgresql-8.4.4-aix6.1.tar.gz /var/lib/pgsql
Build the rpm
Remove any old RPMs
rm -f /opt/freeware/src/packages/SRPMS/postgresql*rpm /opt/freeware/src/packages/RPMS/ppc/postgresql*rpm
Put the tarball in
/opt/freeware/src/packages/SOURCES/postgresql-8.4.4-aix6.1.tar.gz
Get the shipped xCAT spec file : xcat-Pg.spec
Run rpm -ba xcat-Pg.spec
Should build the following rpm:
/opt/freeware/src/packages/RPMS/ppc/xcat-Pg-8.4.4.aix6.1.ppc.rpm

37
AIX/xcat-Pg/xcat-Pg.spec Normal file
View File

@ -0,0 +1,37 @@
Summary: Package for Postgresql on AIX
Name:xcat-postgresql
Version: 5
Release: 1
License: GPL
Group: Applications/System
Vendor: postgresql
Packager: IBM Corp.
Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
Prefix: /
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root
#BuildRoot: /var/tmp/postgresql-root
BuildArch: ppc
Source: postgresql-8.4.4-aix6.1.tar.gz
Provides: xcat-postgresql = %{version}
%description
postgresql-8.4.4 (64-bit).
%prep
%setup -q -n postgresql-8.4.4
%build
%install
mkdir -p $RPM_BUILD_ROOT/var/lib/pgsql
cp -rp /opt/freeware/src/packages/BUILD/postgresql-8.4.4/* $RPM_BUILD_ROOT/var/lib/pgsql
%post
%clean
%files
%defattr(-,root,root)
/var/lib/pgsql