ARM架构软件安装--postgresql
系统:Linux-arm安装版本:postgresql-9.6.9https://www.postgresql.org/ftp/source/v9.6.9/proj-4.8.0http://download.osgeo.org/proj/geos-3.6.1http://download.osgeo.org/geos/json-c-0.12https://s3.amazonaws.com/json
·
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
更多推荐
已为社区贡献2条内容
所有评论(0)