Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Default /etc/sysctl.conf settings for Mac OS X Snow Leopard?

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.

like image 823
Mur Quirk Avatar asked Feb 12 '12 10:02

Mur Quirk


2 Answers

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
like image 196
James Allman Avatar answered Sep 26 '22 20:09

James Allman


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.

like image 44
Eelke Avatar answered Sep 25 '22 20:09

Eelke