CentOS 7

From BA3 Mapping Engine Wiki
Revision as of 04:11, 7 May 2022 by Bruce (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

AltusMarker

sudo yum -y install sqlite sqlite-devel

AltusPackage

sudo yum -y install sqlite sqlite-devel

AltusVector

sudo yum -y install sqlite sqlite-devel
sudo yum -y install http://yum.postgresql.org/9.3/redhat/rhel-7-x86_64/pgdg-centos93-9.3-1.noarch.rpm
sudo yum -y install postgresql93 postgresql93-server postgresql93-libs postgresql93-contrib postgresql93-devel
sudo yum -y install postgis2_93
sudo yum -y install geos-devel
sudo yum -y install proj-devel

Configuring PostgreSQL

Initialization and Configuration Initialize Postgres:

sudo /usr/pgsql-9.3/bin/postgresql93-setup initdb

Enable and start Postgres service:

sudo systemctl enable postgresql-9.3
sudo systemctl start postgresql-9.3

Set postgres user password:

sudo su - postgres
psql
postgres=# \password postgres
Enter new password: asdfasdf
Enter it again: asdfasdf
\quit
Create user and database:
su - postgres
createuser altusvector
createdb altusvectordb

Set password and Grant access to the database:

$ psql
psql (9.3.2)
Type "help" for help.
postgres=# alter user altusvector with encrypted password 'asdfasdf';
ALTER ROLE
postgres=# grant all privileges on database altusvectordb to altusvector;
GRANT
postgres=# \quit

Networking

Enable ports on firewall:

sudo firewall-cmd --permanent --add-port=5432/tcp
sudo firewall-cmd --reload

Configure service to listen to TCP/IP: By default, TCP/IP connection is disabled, so that the users from another computers can’t access postgresql. To allow to connect users from another computers:

Log in as root and then edit this file: /var/lib/pgsql/9.3/data/postgresql.conf:

sudo su - root vi /var/lib/pgsql/9.3/data/postgresql.conf

Find the lines: [...]

  1. listen_addresses = 'localhost'

[...]

  1. port = 5432

[...]

Uncomment both lines, and set the IP address of your postgresql server or set “*” to listen from all clients as shown below:

listen_addresses = '*' port = 5432

Save the file.

Modify the pg_hba.conf file in the same folder to look like this:

# TYPE  DATABASE        USER            ADDRESS                 METHOD
# "local" is for Unix domain socket connections only
local   all             all                                     md5
# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
host    all             all             0.0.0.0/0               md5
# IPv6 local connections:
host    all             all             ::1/128                 md5

Save the file.

Restart Postgres:

systemctl restart postgresql-9.3

Try connecting as the postgres user from another computer.

AltusTerrain

sudo yum install gdal
sudo yum install gdal-devel
sudo yum install sqlite sqlite-devel
sudo yum -y http://yum.postgresql.org/9.3/redhat/rhel-7-x86_64/pgdg-centos93-9.3-1.noarch.rpm
sudo yum install postgresql93 postgresql93-server postgresql93-libs postgresql93-contrib postgresql93-devel
sudo yum install postgis2_93
sudo yum install geos-devel
sudo yum install proj-devel
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox