读完后FHS,我总结如下表:
+----------------+-------------------+---------------------------------+-----------------------+
| Part | Sofware in /opt | Installed by package manager/OS | User local software |
+----------------+-------------------+---------------------------------+-----------------------+
| executable | /opt/X/bin/ | /usr/bin/ | /usr/local/bin/ |
| read only data | /usr/share/X/ | /usr/share/X/ | /usr/local/share/X/ |
| global rw data | /var/opt/X/ | /var/lib/X/ | /var/lib/X/ |
| global config | /etc/opt/X/ | /etc/X/ | /etc/X/ |
| user data | ~/X/ | ~/X/ | ~/X/ |
| man page | /opt/X/share/man/ | /usr/share/man/ | /usr/local/share/man/ |
| source code | /opt/X/src/X/ | /usr/src/X/ | /usr/local/src/X |
+----------------+-------------------+---------------------------------+-----------------------+
该表对于所有要使用的软件都正确吗?
另外,程序在安装时如何“知道”它是放置在 /opt 还是 /usr/local/bin 中,以便将其文件放置在正确的位置?