3

After Download AgensGraph from "https://github.com/bitnine-oss/agensgraph".

When configure and install done, I try to connect AgensGraph.

It failed like this :

agens: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

How to start AgensGraph server on Mac OS X?

1 Answers1

2

You must initialize & create database before connecting to AgensGraph.

First, Set environment variable.

$ export AGDATA=~/Download/pgsql/data

Next, Initialize database.

$ initdb
The files belonging to this database system will be owned by user "assam".
This user must also own the server process.

The database cluster will be initialized with locale "ko_KR.UTF-8".
The default database encoding has accordingly been set to "UTF8".
initdb: could not find suitable text search configuration for locale "ko_KR.UTF-8"
The default text search configuration will be set to "simple".

Data page checksums are disabled.

creating directory /Users/assam/Download/pgsql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.

Success. You can now start the database server using:

    ag_ctl -D /Users/assam/Download/pgsql/data -l logfile start

Next, Startup database.

$ ag_ctl start
server starting

Next, Create database.

$ createdb

Finally, Connect to AgensGraph.

$ agens
agens (AgensGraph 1.3.1, based on PostgreSQL 9.6.2)
Type "help" for help.

assam=# 

For shutdown Agensgraph.

$ ag_ctl stop
waiting for server to shut down.... done
server stopped
최현수
  • 56
  • 2