NYCPHP Meetup

NYPHP.org

[nycphp-talk] where in filesystem to install php application

Leam Hall leam at reuel.net
Sun Jul 5 16:19:47 EDT 2009


David Mintz wrote:
> Perhaps this is one of those things that doesn't matter a helluva lot, but:
> when you have a freshly installed Debian-style LAMP (actually Ubuntu server
> 9.04) and you are looking for a place in the filesystem to install your PHP
> application files -- where do you like to put them? /usr/local/share/... ?
> Or /usr/local/lib/php/... ? /opt/...?
> 
> It's nice if it isn't /something/too/terribly/hideously/long/to/type
> although there are always shortcuts, like environment vars.

/opt is for anything an application might use. The logic is that /opt is 
  generally a separate filesystem and if an application mis-behaves and 
writes lots of logs you're not crashing the box. Just the application.

It also lets you bind mount to wherever you need, and if you need to 
work on the machine in single user mode you don't have to mount /opt to 
make server stuff work.

Also, for those who work in mixed environments; /opt is a Unix-ism. 
/usr/local is a Linux-ism.

Leam



More information about the talk mailing list