您的位置:首页 > 数据库

龙芯麒麟操作系统安装 PostgreSql

2016-06-23 16:15 344 查看
1 PostgreSQL 9.2.7
https://ftp.postgresql.org/pub/source/v9.2.7/postgresql-9.2.7.tar.bz2

下载 PostgreSQL 9.2.7;

[root@DCGCY-PCServer39 postgresql-9.2.7]# ./configure 
checking build system type... config/config.guess: unable
to guess system type 

This script, last modified 2012-02-10, has failed to recognize 
the operating system you are using. It is advised that you 
download the most up to date version of the config scripts from 

http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 
and 
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 

If the version you run (config/config.guess) is already up to date, please 
send the following data and any information you think might be 
pertinent to <config-patches@gnu.org> in order to provide the needed 
information to handle your system. 

config.guess timestamp = 2012-02-10 

uname -m = mips64el 
uname -r = 2.6.32-0.24.ns6.mips64el 
uname -s = Linux 
uname -v = #1 SMP Wed May 29 17:12:22 CST 2013 

/usr/bin/uname -p = 
/bin/uname -X = 

hostinfo = 
/bin/universe = 
/usr/bin/arch -k = 
/bin/arch = mips64el 
/usr/bin/oslevel = 
/usr/convex/getsysinfo = 

UNAME_MACHINE = mips64el 
UNAME_RELEASE = 2.6.32-0.24.ns6.mips64el 
UNAME_SYSTEM = Linux 
UNAME_VERSION = #1 SMP Wed May 29 17:12:22 CST 2013 
configure: error: cannot guess build type; you must specify one 

注释: configure脚本执行失败,原因是系统无法识别,在 configure 的过程中需要识别特定的系统信息,但是由于中标麒麟系统无法提供相应的提取系统信息的指令,导致执行失败。

在基于 x86 的中标麒麟系统上,是可以正常执行的,build type 为 i686-pc-linux-gnu;

所以需要手动指定:
查看build type,在目录/usr/lib/gcc/ 目录下,发现:mips64el-neokylin-linux

在基于龙芯的中标麒麟系统上,需要特别指定build type,所以;
#./configure --build=mips64el-neokylin-linux    
正确执行;

[root@DCGCY-PCServer39 postgresql-9.2.7]# ./configure --build=mips64el-neokylin-linux 

checking build system type... mips64el-neokylin-linux-gnu 

checking host system type... mips64el-neokylin-linux-gnu 

checking which template to use... linux 

checking whether to build with 64-bit integer date/time support... yes 

checking whether NLS is wanted... no 

checking for default port number... 5432 

checking for block size... 8kB 

checking for segment size... 1GB 

checking for WAL block size... 8kB 

checking for WAL segment size... 16MB 

checking for gcc... gcc 

checking for C compiler default output file name... a.out 

checking whether the C compiler works... yes 

checking whether we are cross compiling... no 

checking for suffix of executables... 

checking for suffix of object files... o 

checking whether we are using the GNU C compiler... yes 

checking whether gcc accepts -g... yes 

checking for gcc option to accept ISO C89... none needed 

checking whether gcc supports -Wdeclaration-after-statement... yes 

checking whether gcc supports -Wendif-labels... yes 

checking whether gcc supports -Wmissing-format-attribute... yes 

checking whether gcc supports -Wformat-security... yes 

checking whether gcc supports -fno-strict-aliasing... yes 

checking whether gcc supports -fwrapv... yes 

checking whether gcc supports -fexcess-precision=standard... no 

checking whether the C compiler still works... yes 

checking how to run the C preprocessor... gcc -E 

checking allow thread-safe client libraries... yes 

checking whether to build with Tcl... no 

checking whether to build Perl modules... no 

checking whether to build Python modules... no 

checking whether to build with GSSAPI support... no 

checking whether to build with Kerberos 5 support... no 

checking whether to build with PAM support... no 

checking whether to build with LDAP support... no 

checking whether to build with Bonjour support... no 

checking whether to build with OpenSSL support... no 

checking whether to build with SELinux support... no 

checking for grep that handles long lines and -e... /bin/grep 

checking for egrep... /bin/grep -E 

checking for ld used by GCC... /usr/bin/ld 

checking if the linker (/usr
e68a
/bin/ld) is GNU ld... yes 

checking for ranlib... ranlib 

checking for strip... strip 

checking whether it is possible to strip libraries... yes 

checking for ar... ar 

checking for tar... /bin/tar 

checking whether ln -s works... yes 

checking for gawk... gawk 

checking for a thread-safe mkdir -p... /bin/mkdir -p 

checking for bison... /usr/bin/bison 

configure: using bison (GNU Bison) 2.4.1 

checking for flex... /usr/bin/flex 

configure: using flex 2.5.35 

checking for perl... /usr/bin/perl 

configure: using perl 5.10.1 

checking for main in -lm... yes 

checking for library containing setproctitle... no 

checking for library containing dlopen... -ldl 

checking for library containing socket... none required 

checking for library containing shl_load... no 

checking for library containing getopt_long... none required 

checking for library containing crypt... -lcrypt 

checking for library containing fdatasync... none required 

checking for library containing gethostbyname_r... none required 

checking for library containing shmget... none required 

checking for library containing readline... no 

configure: error: readline library not found 

If you have readline already installed, see config.log for details on the 

failure. It is possible the compiler isn't looking in the proper directory. 

Use --without-readline to disable readline support. 

由于系统中缺少readline库,所以接下来安装readline库;

http://down1.chinaunix.net/distfiles/readline-5.1.tar.gz

http://ftp.gnu.org/gnu/readline/readline-6.3.tar.gz

no no no

需要安装 readlin-devel 和 zlib

yum -y install -y readline-devel

yum -y install -y zlib-devel

下载 readline 库源码:readline-6.3.tar.gz;
# ./configure --build=mips64el-neokylin-linux  执行成功;

# make 成功;
# make install 成功;

然后继续安装 PostgreSQL:
# ./configure --build=mips64el-neokylin-linux  执行成功;

# make 成功;
# make install 成功;

make[1]: Entering directory `/data/anteng/postgresql-9.2.7/config'
/bin/mkdir -p '/usr/local/pgsql/lib/pgxs/config'
/bin/sh ../config/install-sh -c -m 755 ./install-sh '/usr/local/pgsql/lib/pgxs/config/install-sh'
make[1]: Leaving directory `/data/anteng/postgresql-9.2.7/config'
PostgreSQL installation complete.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息