0

I read some posts and parts of FHS to understand which directory I should install packages in. As far as I could understand /opt is for independent packages and /usr/local is for packages that are not maintained by distro repo's.

I want to install a network emulator called "mininet" on my Debian wheezy, so that all users can use it. It has an install.sh script which installs both types of packages: maintained by repo & not maintained by repo. As the first step of the installation I can indicate where I want my base directory to be. Now my question is which directory I should indicate as the base directory? should it be: "/usr/local", "/usr/local/mininet", "/usr/local/bin", "/usr/local/bin/mininet", "/opt" or some other directory?

I would appreciate if you could explain your answer too Thank you.

EDIT: Should I specify the name of the package in the path like we do when installing in /opt (e.g. /usr/local/mininet/) or I shouldn't?

Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255
Sav
  • 1

2 Answers2

0

If the base directory you mean is used for the --prefix option of ./configure or make, it should be /usr/local.

This way, the software can be installed into the subdirectories of /usr/local, like
/usr/local/bin, /usr/local/lib/mininet and /usr/local/man.

Volker Siegel
  • 17,283
  • I did that once and I realized that the installer has created some files and directories outside of /usr/local/bin in /usr/local/.... is that compliant with FHS? – Sav Aug 17 '14 at 22:13
  • The FHS explicitly does not specify anything under /usr/local - so it's compliant. To me, it makes sense to use a structure like under /usr. – Volker Siegel Aug 18 '14 at 09:41
0

for mininet, probably the best way to install it is trying to use the ubuntu packages (option three at http://mininet.org/download/). This will put the package in /usr but more than that will allow you to uninstall the package, even in the case you are doing an upgrade, using apt-get, without leaving litter around your system.

Otherwise I suggest you to install it in /opt/mininet or something. Avoid /usr/local if possible, because all package will mix together and you won't be able to sort which file is related to which package should you want to remove something.

pqnet
  • 2,700
  • If you want the binaries or man pages to be usable by everyone you can manually put symlinks into /usr/local/... pointing to /opt/mininet/.... This would still let you distinguish which files are related to mininet and which ones aren't. – pqnet Aug 17 '14 at 18:21