作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
从“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/
我是一名优秀的程序员,十分优秀!