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?

4

1 回答 1

2

您必须在连接到 AgensGraph 之前初始化和创建数据库。

首先,设置环境变量。

$ export AGDATA=~/Download/pgsql/data

接下来,初始化数据库。

$ 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

接下来,启动数据库。

$ ag_ctl start
server starting

接下来,创建数据库。

$ createdb

最后,连接到 AgensGraph。

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

assam=# 

用于关闭 Agensgraph。

$ ag_ctl stop
waiting for server to shut down.... done
server stopped
于 2018-09-12T05:36:04.353 回答