HAYCORN — 19 June 2010

chown -R mjs:mjs /usr/local for easy installs

This seems totally obvious to me now, but I only made this change about 6 months ago, so it’s pos­si­ble others may have sim­i­larly over­looked it: on single user Unix op­er­at­ing systems (e.g. OS X, Linux virtual machines), if you change the own­er­ship of /usr/local to your own user and own group, then you can safely let various command-line install scripts run with their default settings, and not under sudo, without wor­ry­ing that they’ll un­ex­pect­edly change some system files. (Well-behaved scripts will usually install into /usr/local, but you can’t be sure that they will—this way, chang­ing /usr/local will be allowed, but every­thing else not.)

I used to try to install into $HOME by passing switches to the various command-line installers, but it got too dif­fi­cult to figure out how the various perl and ruby and python in­stallers worked. (./configure --prefix="$HOME/local" --exec-prefix="$LOCAL" is ac­tu­ally pretty reliable, though, where $LOCAL is an architecture-specific di­rec­tory like $HOME/local-darwin.)