Unix/Linux Go Back    


Fedora is an operating system centered on the Linux open source kernel and is developed by the community-supported Fedora Project. Fedora is sponsored by Red Hat. Fedora contains software distributed under a free and open-source license. Fedora focuses on innovation, integrating and adopting new technologies and working closely with various Linux communities. The default desktop in Fedora is the GNOME desktop environment and the default user interface is the GNOME Shell. Other desktop environments include KDE Plasma, Xfce, LXDE, MATE and Cinnamon. Security is an important aspect of Fedora with one specific security feature, Security-Enhanced Linux, implementing a variety of software security policies, including mandatory access controls.

Clueless re Java: /opt vs. /usr/local

Fedora


Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 12-09-2013   -   Original Discussion by sas
sas sas is offline
Registered User
 
Join Date: Aug 2013
Last Activity: 29 December 2013, 8:21 AM EST
Posts: 30
Thanks: 3
Thanked 0 Times in 0 Posts
Clueless re Java: /opt vs. /usr/local

It seems this is a oft debated item, that's over my head.

So here's what I've got:
Java 7 set up at /opt/ but I really want it at /usr/local...

What have I done?

Have: Debian 7 (whezzy) with gnome, so what do I do to set things back where it should be?

I guess this is a hot topic according to these two who made some good points....I'm having issue getting Hadoop happy bc I followed the /opt path for Java and I think /usr/local is what it's looking for...

http://m.linuxjournal.com/magazine/p...pt-vs-usrlocal

---------- Post updated at 02:59 PM ---------- Previous update was at 12:04 PM ----------

Think I got it, just needed to set the PATH

Can now run jpsLinux
Sponsored Links
    #2  
Old Unix and Linux 12-15-2013   -   Original Discussion by sas
bakunin bakunin is offline Forum Staff  
Bughunter Extraordinaire
 
Join Date: May 2005
Last Activity: 15 November 2017, 4:57 AM EST
Location: In the leftmost byte of /dev/kmem
Posts: 5,633
Thanks: 107
Thanked 1,603 Times in 1,180 Posts
The debate about "/opt" versus "/usr/local" boils down to the following:

In Unix the layout of the filesystem is more or less fixed. Every file, executable or not, should have its designated place where it has to go. This only as an afore.

The Linux initiative came up with an attempt to further codify this already long-used "best practice" and published the "Filesystem Hierarchy Standard".

I won't comment on the other parts of the document, just the part dealing with "/usr/local" and "/opt":

"/opt" is where all application should go. For every application there should be a subdirectory with its name (and optionally manufacturer) and in that a directory with its version. The "foo" application of the "bar" company in version 1.23 would go to "/opt/bar/foo/1.23", for instance. The executables for this software should be in "/opt/bar/foo/1.23/bin" with optional links to "/opt/bin" to avoid a convoluted PATH.

"/usr/local" is the place for all the OS extensions the administrator wants to have at this particular system. As "/usr" (short for "Unix Software Resources") is under the sole discretion of the OS provider this is the only place that should be modifyable by the SysAdmin. Still, this should be limited to OS-relevant utilities, not for applications in their own right. You might place a third-party "ssh"-client there or "gzip", but not, for instance, "MySQL".

Having said that: if you put java into "/usr/local" or into "/opt" is a question of if you see it as an application in its own right or merely a system tool. There is no "correct" answer to that, just your sensible decision about what best describes its usage on your system.

I hope this helps.

bakunin
Sponsored Links
    #3  
Old Unix and Linux 12-15-2013   -   Original Discussion by sas
fpmurphy's Unix or Linux Image
fpmurphy fpmurphy is offline
Registered User
 
Join Date: Dec 2003
Last Activity: 12 June 2016, 11:03 PM EDT
Location: /dev/ph
Posts: 4,996
Thanks: 73
Thanked 475 Times in 437 Posts
A word of caution regarding the FHS. It is quite an old document. Many distributions, led by Fedora, are moving away from this standard as far as /usr/bin, /bin, /usr/sbin, /sbin and other OS-specifc directories are concerned.

However the intended purpose for /usr/local and /opt has not changed over the years.
    #4  
Old Unix and Linux 12-16-2013   -   Original Discussion by sas
vbe's Unix or Linux Image
vbe vbe is offline Forum Staff  
Moderator
 
Join Date: Sep 2005
Last Activity: 17 November 2017, 4:00 AM EST
Location: Switzerland - GE
Posts: 6,479
Thanks: 289
Thanked 553 Times in 515 Posts
As an addition to Buknin's post /opt is considered as "static" (vs dynamic ) and so any data variable or dynamic files for the application's configuration etc should be played in /var/opt/<app-name>, it has its importance if you have limited time frame for e.g. backups, you know that what is important to you on a daily basis check is in /var/opt for all your applications which should be save with your data...
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
sudo chown -R `whoami` /usr/local chancho OS X (Apple) 7 11-21-2011 12:19 PM
/usr/local/bin/cvs: Not found hifirockz AIX 6 08-05-2011 01:28 AM
Difference between /opt and /usr/local. rama krishna UNIX for Dummies Questions & Answers 7 05-28-2011 02:37 AM
configure /usr/local/etc/be-agent.cfg ccc BSD 0 01-10-2010 10:51 PM
/usr/bin/ld: warning: libgfortran.so.1, needed by /opt/openmpi/lib/libmpi_f90.so, may sreekar Programming 1 09-08-2009 01:02 AM



All times are GMT -4. The time now is 04:30 AM.