Postgre和拓展PostGIS 搭建和配置

目录:搭建过程安装PostGIS搭建过程安装PG[root@localhost ~]# yum install readline* -y[root@localhost ~]# wget https://ftp.postgresql.org/pub/source/v9.5.1/postgresql-9.5.1.tar.gz[root@localhost ~]# tar xv...
摘要由CSDN通过智能技术生成

目录:

  1. 搭建过程
  2. 安装PostGIS
搭建过程
  1. 安装PG

    [root@localhost ~]# yum install readline* -y
    [root@localhost ~]# wget https://ftp.postgresql.org/pub/source/v9.5.1/postgresql-9.5.1.tar.gz
    [root@localhost ~]# tar xvf postgresql-9.5.1.tar.gz
    [root@localhost ~]# cd postgresql-9.5.1/
    [root@localhost postgresql-9.5.1]# ./configure --prefix=/usr/local/pgsql --without-zlib
    [root@localhost postgresql-9.5.1]# make world && make install-world 
    
  2. 创建用户及用户组

    [root@localhost postgresql-9.5.1]# groupadd -g 101 dba
    [root@localhost postgresql-9.5.1]# useradd -u 516 -g dba -G root -d /usr/local/pgsql postgres
    [root@localhost postgresql-9.5.1]# id postgres
    uid=516(postgres) gid=101(dba) groups=101(dba),0(root)
    [root@localhost postgresql-9.5.1]# passwd postgres
    
  3. 配置.bash_profile

    [root@localhost ~]# cp /etc/skel/.* /usr/local/pgsql/
    [root@localhost skel]# cd /usr/local/pgsql/
    
    [root@localhost pgsql]# vim .bash_profile 
    # .bash_profile
    
    # Get the aliases and functions
    if [ -f ~/.bashrc ]; then
            . ~/.bashrc
    fi
    
    # User specific environment and startup programs
    
    PATH=$PATH:$HOME/bin
    
    export PGHOME=/usr/local/pgsql
    
    export PGDATA=/usr/local/pgsql/data
    
    export PATH=$PATH:/usr/local/pgsql/bin
    
    #stty erase ^H
    set umask to 022
    umask 022
    PS1
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值