- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
<分区>
当我在 FreeBSD jail 中初始化 PostgreSQL 数据库时出现问题。
我找到了一篇关于该问题的文章。我尝试了它的建议,但我没有任何运气,我也不知道为什么。有链接:PostgreSQL in jail .
我还阅读了关于 kernel resources 的 PostgreSQL 文档:
If running in FreeBSD jails by enabling
sysctl
'ssecurity.jail.sysvipc_allowed
, postmasters running in different jails should be run by different operating system users. This improves security because it prevents non-root users from interfering with shared memory or semaphores in different jails, and it allows the PostgreSQL IPC cleanup code to function properly. (In FreeBSD 6.0 and later the IPC cleanup code does not properly detect processes in other jails, preventing the running of postmasters on the same port in different jails.)
我做了什么:
/etc/rc.conf
(在主机上)并添加了行 jail_sysvipc_allow="YES"
/etc/sysctl.conf
中,我添加行 security.jail.sysvipc_allowed=1
我多次重启了 jail 机器。我没有重启主机,也不想重启。
希望有人能给我一个解决方案或一些建议。非常感谢。
这是我重启 jail 时的消息:
/etc/rc.d/sysctl: WARNING: unable to set security.jail.sysvipc_allowed=1
或者当我手动运行 sysctl 时:(在 jail 中)
root@xxxxx:/home/xxxx# sysctl security.jail.sysvipc_allowed=1
security.jail.sysvipc_allowed: 0
sysctl: security.jail.sysvipc_allowed: Operation not permitted
Freebsd 版本:FreeBSD xxxxxxx 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE
postgreSQL 版本:postgresql-server-9.1.4
错误信息:
root@xxxxxx:/home/xxx # /usr/local/etc/rc.d/postgresql initdb
The files belonging to this database system will be owned by user "pgsql".
This user must also own the server process.
The database cluster will be initialized with locale C.
The default text search configuration will be set to "english".
creating directory /usr/local/pgsql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 10
selecting default shared_buffers ... 400kB
creating configuration files ... ok
creating template1 database in /usr/local/pgsql/data/base/1 ... FATAL: could not create
shared memory segment: Function not implemented
DETAIL: Failed system call was shmget(key=1, size=2146304, 03600).
child process exited with exit code 1
initdb: removing data directory "/usr/local/pgsql/data"
更新:
在主机中,/etc/sysctl.conf: security.jail.sysvipc_allowed=1/etc/rc.conf : jail_sysvipc_allow="YES"
在 Jail 服务器中,没有额外的 jail_sysvipc 配置。
主机中的 sysctl 值:
root@xxxxx:/home/xxxx# sysctl -a | grep 'sysvipc'
security.jail.param.allow.sysvipc: 0
security.jail.sysvipc_allowed: 1
我仍然收到与之前相同的错误消息。
另外,我想知道security.jail.param.allow.sysvipc有没有什么?因为,在主机中,我不允许设置它。 (security.jail.param.allow.sysvipc 0-> 0)
关闭。这个问题是off-topic .它目前不接受答案。 想改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 关闭 9 年前。 Improve this
我是一名优秀的程序员,十分优秀!