centos7上安装postgresql10.0 Beta2版

1.下载安装包

https://ftp.postgresql.org/pub/source/v10beta2/postgresql-10beta2.tar.gz

2.解压编译

tar zxvf postgresql-10beta2.tar.gz

configure

configure: creating ./config.status
config.status: creating GNUmakefile
config.status: creating src/Makefile.global
config.status: creating src/include/pg_config.h
config.status: creating src/include/pg_config_ext.h
config.status: creating src/interfaces/ecpg/include/ecpg_config.h
config.status: linking src/backend/port/tas/dummy.s to src/backend/port/tas.s
config.status: linking src/backend/port/dynloader/linux.c to src/backend/port/dynloader.c
config.status: linking src/backend/port/posix_sema.c to src/backend/port/pg_sema.c
config.status: linking src/backend/port/sysv_shmem.c to src/backend/port/pg_shmem.c
config.status: linking src/backend/port/dynloader/linux.h to src/include/dynloader.h
config.status: linking src/include/port/linux.h to src/include/pg_config_os.h
config.status: linking src/makefiles/Makefile.linux to src/Makefile.port

make

cp ../../../contrib/spi/refint.so refint.so
cp ../../../contrib/spi/autoinc.so autoinc.so
make[2]: Leaving directory `/usr/etc/postgresql-10beta2/src/test/regress'
make -C test/perl all
make[2]: Entering directory `/usr/etc/postgresql-10beta2/src/test/perl'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/etc/postgresql-10beta2/src/test/perl'
make[1]: Leaving directory `/usr/etc/postgresql-10beta2/src'
make -C config all
make[1]: Entering directory `/usr/etc/postgresql-10beta2/config'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/etc/postgresql-10beta2/config'
All of PostgreSQL successfully made. Ready to install.

make install

make[2]: Leaving directory `/usr/etc/postgresql-10beta2/src/test/regress'
make -C test/perl install
make[2]: Entering directory `/usr/etc/postgresql-10beta2/src/test/perl'
make[2]: Nothing to be done for `install'.
make[2]: Leaving directory `/usr/etc/postgresql-10beta2/src/test/perl'
/usr/bin/mkdir -p '/usr/local/pgsql/lib/pgxs/src'
/usr/bin/install -c -m 644 Makefile.global '/usr/local/pgsql/lib/pgxs/src/Makefile.global'
/usr/bin/install -c -m 644 Makefile.port '/usr/local/pgsql/lib/pgxs/src/Makefile.port'
/usr/bin/install -c -m 644 ./Makefile.shlib '/usr/local/pgsql/lib/pgxs/src/Makefile.shlib'
/usr/bin/install -c -m 644 ./nls-global.mk '/usr/local/pgsql/lib/pgxs/src/nls-global.mk'
make[1]: Leaving directory `/usr/etc/postgresql-10beta2/src'
make -C config install
make[1]: Entering directory `/usr/etc/postgresql-10beta2/config'
/usr/bin/mkdir -p '/usr/local/pgsql/lib/pgxs/config'
/usr/bin/install -c -m 755 ./install-sh '/usr/local/pgsql/lib/pgxs/config/install-sh'
/usr/bin/install -c -m 755 ./missing '/usr/local/pgsql/lib/pgxs/config/missing'
make[1]: Leaving directory `/usr/etc/postgresql-10beta2/config'
PostgreSQL installation complete.

 

3.生成postgres组和用户

[root@localhost usr]# groupadd postgres
[root@localhost usr]# useradd -g postgres postgres
[root@localhost usr]# passwd postgres

 

4.建立数据文件目录

[root@localhost bin]# mkdir /usr/pgdata
[root@localhost bin]# chown -R postgres:postgres /usr/pgdata
[root@localhost bin]# chmod 700 /usr/pgdata

5.初始化数据库

[postgres@localhost bin]$ ./initdb -D /usr/pgdata/

6.修改postgresql.conf

listen_addresses = '*'     

port = 5432

7.修改pg_hba.conf

# "local" is for Unix domain socket connections only
local   all             all                                     trust
# IPv4 local connections:
host    all             all             0.0.0.0/0            trust

8.启动数据库

[postgres@localhost bin]$ ./pg_ctl start -D /usr/pgdata/

9.验证

[postgres@localhost bin]$ ./psql
psql (10beta2)
Type "help" for help.

postgres=# select version();
                                                  version
-----------------------------------------------------------------------------------------------------------
 PostgreSQL 10beta2 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4), 64-bit
(1 row)

postgres=# \q

 

 

 

转载于:https://my.oschina.net/u/3641613/blog/1505951

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值