栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

ARM架构软件安装--postgresql

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

ARM架构软件安装--postgresql

OS:
Linux-arm
安装版本:
postgresql-9.6.9  https://www.postgresql.org/ftp/source/v9.6.9/
proj-4.8.0            http://download.osgeo.org/proj/
geos-3.6.1           http://download.osgeo.org/geos/
json-c-0.12         https://s3.amazonaws.com/json-c_releases/releases/json-c-0.12.tar.gz
postgis-2.5.3      http://download.osgeo.org/postgis/source/
开始安装 Postgresql
tar xvfz postgresql-9.6.9.tar.gz
cd postgresql-9.6.9
./configure --prefix=/opt/postgresql-9.6.9
make
make install
ln -s /opt/postgresql-9.6.9 /usr/local/pgsql
proj
tar xvfz proj-4.9.3.tar.gz
cd proj-4.9.3
./configure --prefix=/opt/proj-4.9.3
make
make install
ln -s /opt/proj-4.9.3 /usr/local/proj
geos
tar xvfj geos-3.6.1.tar.bz2
cd geos-3.6.1
./configure --prefix=/opt/geos-3.6.1
make;
make install;
ln -s /opt/geos-3.6.1 /usr/local/geos
json-c
tar xvfz json-c-0.12.tar.gz
cd json-c-0.12
./configure --prefix=/opt/json-c-0.12
make;
make install;
ln -s /opt/json-c-0.12 /usr/local/json-c
Postgis
tar xvfz postgis-2.5.3.tar.gz
cd postgis-2.5.3./configure --prefix=/opt/postgis-2.5.3 --with-pgconfig=/usr/local/pgsql/bin/pg_config --with-projdir=/usr/local/proj --with-geosconfig=/usr/local/geos/bin/geos-config
--with-jsondir=/usr/local/json-c --without-raster --with-xml2config=/usr/bin/xml2-config
make
make install
ln -s /opt/postgis-2.5.3 /usr/local/postgis
配置环境 创建postgres用户
groupadd postgres
useradd -g postgres postgres
用户postgres环境变量
su - postgres
$ vi .bash_profile
PGDATA=$HOME/data
PGSQL_HOME=/usr/local/pgsql
PROJ_HOME=/usr/local/proj
GEOS_HOME=/usr/local/geos
LD_LIBRARY_PATH=$PGSQL_HOME/lib:$PROJ_HOME/lib:$GEOS_HOME/lib
PATH=$PGSQL_HOME/bin:$PATH:$HOME/bin
export PATH PGDATA PGSQL_HOME PROJ_HOME GEOS_HOME LD_LIBRARY_PATH
Postgresql初始化
su - postgres
$ initdb -D data
$ cd data
PostGIS 安装配置
su - postgres
$ pg_ctl start
$ createdb postgis
$ cd $PGSQL_HOME/share/contrib/postgis-2.5
$ psql -d postgis -f postgis.sql
$ psql -d postgis -f spatial_ref_sys.sql
配置允许远程访问
  • vi /home/postgres/data/pg_hba.conf

  • vi /home/postgres/data/postgresql.conf

重启生效
su - postgres
$pg_ctl restart
安装遇到的问题 1.readline library not found


解决办法

yum install  readline-devel -y
2.zlib library not found


解决办法

yum install zlib-devel -y
3.cannot guess build type;you must specify one


解决办法

./configure ..... --build=arm-linux
4.variable ‘size’ set but not used


解决办法

找到MakeFile 删掉-Werror。重新make
5.make出现 json-c-0.12/missing: line 81: autoheader: command not found

解决办法

yum  install  libtool autoconf -y
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/334629.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号