在OpenBSD上配置PostgreSQL
发布时间:2020-12-13 17:18:35 所属栏目:百科 来源:网络整理
导读:当PostgreSQL安装完成后,我们进行以下操作 su-_postgresqlinitdb-D/var/postgresql/data-Upostgres-EUTF8-Amd5-W 之后我们需要配置自动启动 OpenBSD 5.6版本 配置自动启动rc.local if[-x/usr/local/bin/pg_ctl];thenecho-n'postgresql'su-l_postgresql-c"no
当PostgreSQL安装完成后,我们进行以下操作 su-_postgresql initdb-D/var/postgresql/data-Upostgres-EUTF8-Amd5-W 之后我们需要配置自动启动 OpenBSD 5.6版本 配置自动启动rc.local if[-x/usr/local/bin/pg_ctl];then echo-n'postgresql' su-l_postgresql-c"nohup/usr/local/bin/pg_ctlstart -D/var/postgresql/data-l/var/postgresql/logfile -o'-D/var/postgresql/data'>/dev/null" fi 配置自动停止 if[-f/var/postgresql/data/postmaster.pid];then su-l_postgresql-c"/usr/local/bin/pg_ctlstop-mfast -D/var/postgresql/data" rm-f/var/postgresql/data/postmaster.pid fi OpenBSD 5.7版本 在rc.conf.local中添加 pkg_scripts=postgresql 或使用新的rcctl工具 rcctlenablepostgresql (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |