mirror of
https://github.com/xcat2/xcat-dep.git
synced 2024-11-21 17:11:45 +00:00
1ca6d1da23
Former-commit-id: 8d1cde42a7e3924bfe5155095b3152a8733d1261
75 lines
3.6 KiB
Plaintext
75 lines
3.6 KiB
Plaintext
This information is to build postgresql 9.1.X on a Redhat6 machine. postgresql9.1 will not officially be in a distro until Redhat7 and SLES 12, so for PCM to use it we need to build for the current Redhat6.3 which we will release xCAT/PCM produce.
|
|
|
|
[RHEL6]
|
|
1) Need to install rpmbuild from the distro and gcc on your build machine
|
|
2) Must have uuid-devel, did not see to be in the Redhat6.3 distro.
|
|
* Downloaded the packages from
|
|
http://pkgs.org/centos-6-rhel-6/centos-rhel-x86_64/uuid-devel-1.6.1-10.el6.x86_64.rpm/download/
|
|
* On x86_64, there's already an existed prebuilt rpm package available
|
|
rpm -ivh uuid-devel-1.6.1-10.el6.x86_64.rpm
|
|
* On ppc64, need to download the source rpm and rebuild it with the spec provided by xCAT.
|
|
rpm -ivh uuid-1.6.1-10.el6.src.rpm
|
|
cd /root/rpmbuild/SPECS
|
|
backup uuid.spec to uuid.spec.orig
|
|
cp uuid.spec provided by xCAT in this directory to /root/rpmbuild/SPECS
|
|
rpmbuild -ba /root/rpmbuild/SPECS/uuid.spec
|
|
rpm -ivh /root/rpmbuild/RPMS/ppc64/uuid-devel-1.6.1-10.el6.ppc64.rpm
|
|
|
|
3) Use the below website to download src rpms for postgresql91. I picked the latest
|
|
PTF level 9.1.5.
|
|
http://yum.postgresql.org/srpms/9.1/redhat/rhel-6-x86_64/
|
|
From here I got postgresql91-9.1.5-1PGDG.rhel6.src.rpm
|
|
|
|
4) Run rpm -ivh postgresql91-9.1.5-1PGDG.rhel6.src.rpm to install the source rpms on the build machine.
|
|
|
|
|
|
5) When you installed the source rpm, it put the data in /root/rpmbuild
|
|
cd /root/rpmbuild/SPECS
|
|
cp postgresql-9.1.spec postgresql-9.1.spec.orig
|
|
We have modified the spec that Fedora16 used to build postgresql91, so
|
|
that all the commands and code will go in the normal locations and provide
|
|
that spec here
|
|
cp postgresql-9.1.spec provided by xCAT in this directory to /root/rpmbuild/SPECS
|
|
|
|
6) build the rpms
|
|
rpmbuild -ba postgresql-9.1.spec
|
|
|
|
7) Packages required by PCM on RHEL:
|
|
- postgresql, postgresql-libs, postgresql-server, postgresql-contrib
|
|
|
|
[SLES11]
|
|
1) Need to install rpmbuild from the distro and gcc on your build machine, and we need SLES11 SP2 SDK1 iso to install extra build dependencies
|
|
2) Must have uuid-devel, we can get it from "server:database:postgresql" project on OBS (OpenSUSE Build Service)
|
|
* Download the packages from repository for SLE_11_SP2_Update
|
|
- libossp-uuid16-1.6.2-36.1
|
|
- libossp-uuid_dce16-1.6.2-36.1
|
|
- libossp-uuid++16-1.6.2-36.1
|
|
- uuid-devel
|
|
* Or just add the repository
|
|
zypper ar http://download.opensuse.org/repositories/server:/database:/postgresql/SLE_11_SP2_Update/ postgresql_build
|
|
zypper install uuid-devel
|
|
|
|
3) Download the src rpms for postgresql from "openSUSE" project on OBS
|
|
* wget http://download.opensuse.org/repositories/openSUSE:/12.2:/Update/standard/src/postgresql-libs-9.1.5-7.8.1.src.rpm
|
|
* wget http://download.opensuse.org/repositories/openSUSE:/12.2:/Update/standard/src/postgresql-9.1.5-7.8.1.src.rpm
|
|
|
|
4) Run rpm -ivh postgresql-9.1.5-7.8.1.src.rpm/postgresql-libs-9.1.5-7.8.1.src.rpm to install the source rpms on the build machine
|
|
|
|
5) When you installed the source rpm, it put the data in /usr/src/packages
|
|
cd /usr/src/packages/SPECS
|
|
cp postgresql.spec postgresql.spec.orig
|
|
We have modified the spec that OpenSUSE12.2 used to build postgresql to disable regression test.
|
|
cp postgresql-9.1.spec.sles provided by xCAT in this directory to /usr/src/packages/SPECS
|
|
|
|
6) build the rpms
|
|
rpmbuild -ba postgresql-libs.spec
|
|
rpmbuild -ba postgresql-9.1.spec.sles
|
|
|
|
7) Packages required by PCM on SLES:
|
|
- postgresql, postgresql-libs, postgresql-server, postgresql-contrib
|
|
- libossp-uuid16
|
|
|
|
|
|
Note: If not building 9.1.5-x then modifiy postgresql-9.1.spec and change the VERSION: and RELEASE: line to match your level of postgresql.
|
|
|