Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have an OS X server that is co-located; that is, we have access by SSH and via the Server Admin utilities, but not via Remote Desktop.

Several months later, I'd like to install git on the server. However, it appears that Developer Tools were never installed; make and gcc aren't there. So I can't build from source. Also, without remote desktop, I can mount a .dmg file, but I can't actually run the installer.

Can anyone suggest a strategy to either run the installer from the command line, or get the relevant developer tools installed (again, these are normally a .dmg) so I can build from source?

share|improve this question
up vote 2 down vote accepted

Run man installer and scroll down to the examples section. It should be able to install any mpkg or pkg. You could even download the Developer Tools mpkg from Apple's website and run that via the installer command.

Note that the installer command will not reboot the system so you will need to do that yourself.

share|improve this answer
Awesome. Never would've known about that without Server Fault! – pjmorse Oct 4 '10 at 20:28
:) Check out as well. There's a good example of using the command to do exactly what you want. – Jack Lawrence Oct 4 '10 at 20:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.