Mac OS X Snow Leopard 的默认 /etc/sysctl.conf 设置?

发布于 2025-01-05 11:17:49 字数 472 浏览 1 评论 0原文

我尝试为 Mac OS X 10.6 安装 PostgreSQL 9.1.2,它要求我编辑 /etc/ 目录中的 sysctl.conf 文件,以便它可以使用 PostgreSQL 要求的更多共享内存。

我继续编辑文件,保存它,重新启动,然后在登录屏幕上,由于某种原因,我被要求以安全启动身份登录,我登录后,互联网似乎无法正常工作,并且扩展坞菜单很滞后。

所以很明显这是因为我在重新启动之前编辑了 sysctl.conf 文件而发生的,所以我回到 /etc 目录并删除了 sysctl.conf 文件,认为它会自动创建一个新的 sysctl.conf 文件使用默认设置,但即使重新启动后也不是这样。

所以现在我几乎没有 sysctl.conf 文件,我阅读了该文件的 Mac 开发人员文档,但它没有说太多。我知道我可能不应该弄乱我不知道的文件,但我真的想让 PostgreSQL 为我本地的 Ruby on Rails 开发工作。

关于这个主题的任何内容都会有帮助。

I tried to install PostgreSQL 9.1.2 for Mac OS X 10.6 and it asked me to edit the sysctl.conf file inside the /etc/ directory, so it could use more of the shared memory PostgreSQL was asking for.

I went ahead and edited the file, saved it, rebooted and then on the login screen I was asked to login as safe boot for some reason, I logged in and internet did not seem to work and the dock menu was laggy.

So it was pretty obvious this was happening because of the sysctl.conf file that I edited before the reboot, so I went back into the /etc directory and deleted the sysctl.conf file thinking it would auto-create a new sysctl.conf file with the default settings but that wasn't the case even after a reboot.

So now I'm pretty much left without a sysctl.conf file, I read the Mac Developer documentation for this file and it didn't say much. I know I probably shouldn't be messing with files that I don't have a clue about but I really wanted to get PostgreSQL working for my local Ruby on Rails development.

Anything on this topic would be helpful.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

深府石板幽径 2025-01-12 11:17:49

我在 OS X 10.7.2 (Lion) 上没有 /etc/sysctl.conf 文件。


我建议您使用 Homebrew 包管理器来安装 Postgres,这样可以省去很多麻烦。

安装 XCode 后,步骤如下:

安装 Homebrew

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"

安装 Postgres

brew update; brew install postgres

初始化 Postgres

initdb /usr/local/var/postgres

将 Postgres 设置为自动运行

mkdir -p ~/Library/LaunchAgents
cp /usr/local/Cellar/postgresql/9.1.2/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist

I have no /etc/sysctl.conf file on OS X 10.7.2 (Lion).


I suggest you save yourself a lot of headaches and install Postgres using the Homebrew package manager.

The steps, once XCode is installed, are:

Install Homebrew

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"

Install Postgres

brew update; brew install postgres

Initialize Postgres

initdb /usr/local/var/postgres

Set Postgres to run automatically

mkdir -p ~/Library/LaunchAgents
cp /usr/local/Cellar/postgresql/9.1.2/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/
launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
万劫不复 2025-01-12 11:17:49

我的包含以下内容:

kern.sysv.shmmax=134217728
kern.sysv.shmmin=1
kern.sysv.shmmni=256
kern.sysv.shmseg=64
kern.sysv.shmall=32768

我自己有Lion,但我认为当我使用Snow Leopard 时,里面没有其他任何东西。

Mine contains the following:

kern.sysv.shmmax=134217728
kern.sysv.shmmin=1
kern.sysv.shmmni=256
kern.sysv.shmseg=64
kern.sysv.shmall=32768

I have Lion myself but I don't think there was anything else in it when I was using Snow Leopard.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文