从“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 服务器?
最佳答案
在连接到 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
关于agens-graph - 如何在 Mac OS X 上启动 AgensGraph 服务器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52288032/