Please avoid installing any 3rd party software, including your own, under /usr. That directory is for the OS vendor / distro maintainer and is off limits for anything else.
Using /usr can cause all kinds of nasty problems down the road. My favorite example is sparse zones (virtual servers): if one installs stuff under /usr in the global zone, those packages cannot be installed in sparse zones simply because a sparse zone is loopback-mounted from the global zone. Major headache.
And if you just stuck "some stuff" under /usr, think about how you will remove it or upgrade it? You won't because unless it came onto the system as a package, who knows where junk is laying around; but even if it's a package, you have problem #1.
On a System V UNIX, such as Solaris, /opt is reserved for 3rd party and for unbundled applications; that's where stuff is supposed to go. /var/opt is where the 3rd party application data goes, and /etc/opt is where the 3rd party application's configuration files go.
Apropos GCC, GCC comes bundled with Solaris; it's in /usr/sfw/bin/, so you didn't have to install it at all.
As far as bash goes, I warmly recommend you read through the man page of `tcsh`.
And if you _must_ have /usr/local, put it in /opt/local and loopback mount that to /usr/local.
Using /usr can cause all kinds of nasty problems down the road. My favorite example is sparse zones (virtual servers): if one installs stuff under /usr in the global zone, those packages cannot be installed in sparse zones simply because a sparse zone is loopback-mounted from the global zone. Major headache.
And if you just stuck "some stuff" under /usr, think about how you will remove it or upgrade it? You won't because unless it came onto the system as a package, who knows where junk is laying around; but even if it's a package, you have problem #1.
On a System V UNIX, such as Solaris, /opt is reserved for 3rd party and for unbundled applications; that's where stuff is supposed to go. /var/opt is where the 3rd party application data goes, and /etc/opt is where the 3rd party application's configuration files go.
Apropos GCC, GCC comes bundled with Solaris; it's in /usr/sfw/bin/, so you didn't have to install it at all.
As far as bash goes, I warmly recommend you read through the man page of `tcsh`.
And if you _must_ have /usr/local, put it in /opt/local and loopback mount that to /usr/local.
本文讨论了在UNIX系统中,特别是Solaris系统下正确安装第三方软件的重要性。为了避免将来可能出现的各种问题,如稀疏区域中的安装冲突等,建议将第三方软件安装在特定目录下,例如 /opt。同时介绍了GCC和bash等工具的推荐使用方式。
3万+

被折叠的 条评论
为什么被折叠?



