从“ https://github.com/bitnine-oss/agensgraph”下载AgensGraph之后。
配置和安装完成后,我尝试连接AgensGraph。
它失败了:
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"?
如何在Mac OS X上启动AgensGraph服务器?
答案 0 :(得分:0)
在连接到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