Point/Counterpoint - /opt vs. /usr/local
Kyle Rankin is a systems architect; and the author of DevOps Troubleshooting, The Official Ubuntu Server Book, Knoppix Hacks, Knoppix Pocket Reference, Linux Multimedia Hacks, and Ubuntu Hacks.
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.
Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.
Sponsored by ActiveState
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?
| Non-Linux FOSS: libnotify, OS X Style | Jun 18, 2013 |
| Containers—Not Virtual Machines—Are the Future Cloud | Jun 17, 2013 |
| Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer | Jun 12, 2013 |
| Weechat, Irssi's Little Brother | Jun 11, 2013 |
| One Tail Just Isn't Enough | Jun 07, 2013 |
| Introduction to MapReduce with Hadoop on Linux | Jun 05, 2013 |
- Containers—Not Virtual Machines—Are the Future Cloud
- Non-Linux FOSS: libnotify, OS X Style
- Linux Systems Administrator
- Validate an E-Mail Address with PHP, the Right Way
- Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer
- Technical Support Rep
- Senior Perl Developer
- UX Designer
- Introduction to MapReduce with Hadoop on Linux
- Weechat, Irssi's Little Brother
- user namespaces
2 hours 12 min ago - yea
2 hours 37 min ago - One advantage with VMs
5 hours 6 min ago - about info
5 hours 39 min ago - info
5 hours 40 min ago - info
5 hours 41 min ago - info
5 hours 43 min ago - info
5 hours 44 min ago - abut info
5 hours 46 min ago - info
5 hours 47 min ago




Comments
/opt or /usr/local
I usually put small type of applications in /usr/local like clients types applications and servers type applications in /opt. /opt could possible be a nfs or samba mount which makes disaster recovery more easier of that mount. Now having said that you would want to make sure that share was located on a system that has a redundant backups ie RAID.
What about /srv vs. /var/lib ?
... and /home vs. /usr/home ? And /usr vs. /usr/local ?
An alternative view point just to mix it up.
I agree with both Bill and Kyle in their discussion of /opt vs. /usr/local (if such a thing is allowed) but I have yet another take on it given to me by some of the brains I used to work with who had a keener grasp of the idea of multiple computers vs single standalones.
If I am running a system as a standalone machine (even if it is networked to others of it's ilk) but shares no common data/code then /opt is a symlink to /usr/local
However, if I have a set of systems that have locally unique files, they, as Kyle said, go in /usr/local but the packages/tools/files that I build in one place to make available to all the systems in my "cluster" (not cluster computing, just grouped) then all these files and things go into /opt which is a shared mount point as Bill discussed.
And, if you are really good, you'll have /opt for different flavors of systems, such as opt.x86_64, opt.i386, opt.sol9, opt.irix, etc. and they automount as needed.
A simplistic example of the difference would be something like this:
Say you have four Linux hosts, one in Buffalo, one in Boston, and two in the central office in Dallas. The weather data from each of the sites is automatically stored in a data file in /usr/local because two of the three sites don't need to know about the data for the remotes. The program which reads this data, is the same binary and is found in /opt on each machine. Each of the systems can generate the local data trending information and store it in /usr/local but none of the systems can write to /opt.
Yes, it's a contrived example but I hope it illustrates the point reasonably well.
Does the use of a "formal" packaging system such as RPM or DEB change this? No, it just makes it different.
So, in closing, in my opinion, it's a draw!
(If any sysadmin counts the six extra characters in /usr/local as an impediment to their job, they should be hanging it up right now. I question if any decent sysadmin can even measure the difference in time between typing /opt and typing /usr/local it is so small.)
Thanks for all the conversations!