设为首页 加入收藏

TOP

PostgreSQL数据库安装部署(一)
2019-06-02 00:12:12 】 浏览:177
Tags:PostgreSQL 数据库 安装 部署

一、postgresql数据库部署


  1、前往postgresql安装包的目录(这里我部署的是10.5的版本)


[root@web1 ~]# cd /package/
[root@web1 package]# ls
apache-tomcat-8.5.39.tar.gz  jdk-8u131-linux-x64.tar.gz  postgresql-10.5.tar.gz  redis-3.2.0.tar.gz
[root@web1 package]#


  2、解压缩包


[root@web1 package]# tar xf postgresql-10.5.tar.gz
[root@web1 package]# ls
apache-tomcat-8.5.39.tar.gz  jdk-8u131-linux-x64.tar.gz  postgresql-10.5  postgresql-10.5.tar.gz  redis-3.2.0.tar.gz
[root@web1 package]#


  3、进入解压后生成的目录文件进行编译


[root@web1 postgresql-10.5]# ./configure --prefix=/usr/local/pgsql-10.5
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking which template to use... linux
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


  4、提示如下信息是缺少包文件


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.


  5、安装相应的包文件文件


[root@web1 postgresql-10.5]#yum install ncurses* readline* zlib* -y
######################################
[root@web1 postgresql-10.5]# rpm -aq ncurses* readline* zlib*
readline-devel-6.2-10.el7.x86_64
zlib-static-1.2.7-18.el7.x86_64
ncurses-libs-5.9-14.20130511.el7_4.x86_64
ncurses-devel-5.9-14.20130511.el7_4.x86_64
readline-static-6.2-10.el7.x86_64
zlib-devel-1.2.7-18.el7.x86_64
readline-6.2-10.el7.x86_64
ncurses-base-5.9-14.20130511.el7_4.noarch
ncurses-5.9-14.20130511.el7_4.x86_64
zlib-1.2.7-18.el7.x86_64
[root@web1 postgresql-10.5]#


  6、安装完成后重新编译下


[root@web1 postgresql-10.5]# ./configure --prefix=/usr/local/pgsql-10.5
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking which template to use... linux
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


  7、解析文件(在postgresql-10.5目录执行:make install),最后输出结果没提示异常【error】便可开始安装了


rm -f pg_regress.o && ln -s ../../../src/test/regress/pg_regress.o .
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -Wl,--as-needed -Wl,-rpath,'/usr/local/pgsql-10.5/lib',--enable-new-dtags  -lpgcommon -lpgport -lpthread -lz -lreadline -lrt -lcrypt -ldl
make[2]: Leaving directory `/package/postgresql-10.5/src/test/isolation'
make -C test/perl all
make[2]: Entering directory `/package/postgresql-10.5/src/test/perl'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/package/postgresql-10.5/src/test/perl'
make[1]: Leaving directory `/package/postgresql-10.5/src'
make -C config all
make[1]: Entering directory `/package/postgresql-10.5/config'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/package/postgresql-10.5/config'
All of PostgreSQL successfully made. Ready to install.


  8、开始安装(在postgresql-10.5目录执行:make install),最后输出
编程开发网

首页 上一页 1 2 3 4 5 下一页 尾页 1/5/5
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇MySQL中使用group_concat遇到的问.. 下一篇MySQL中group by 与 order by 一..