一.安裝Python html
1.從http://www.python.org/download/下載Python源碼包 python
2.解壓縮:#tar -zvxf Python-3.3.2.tar sql
3.編譯安裝 post
#./configure --enable-shared ui
#make && make install spa
二.安裝PostgreSQL 9.3 postgresql
1.從http://www.postgresql.org/下載 htm
2.解壓縮:#tar -zvxf postgresql-9.3beta1.tar.gz rem
3.安裝依賴包 get
#yum -y install gcc zlib-devel readline-devel python-devel
4.編譯安裝
#./configure --with-python
#make && make install
三.備註
1.安裝Python時指定--enable-shared參數是爲了解決:
*** Cannot build PL/Python because libpython is not a shared library.(參見http://www.postgresql.org/docs/9.2/static/install-requirements.html)
2.安裝PostgreSQL時,預先安裝python-devel包,是爲了解決./configure時的下述報錯:
header file <Python.h> is required for Python