在Solaris中安装和使用开发工具
我对 Solaris 完全陌生,有 Linux 背景。我想知道如何在 Solaris 以及任何其他程序上安装 gcc、g++ 等开发工具。是否有任何相当于 apt-get、sudo 等的东西... 其次,OpenSolaris 相对于 Oracle Solaris 的优势是什么。
I'm completey new to Solaris, coming from a Linux background. I would like to know how can I install developement tools such as gcc, g++ etc... on Solaris and also any other program. Is there any equivalent of apt-get, sudo etc... Secondly, what is the advantage of OpenSolaris over Oracle Solaris.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
一些网络搜索会出现BlastWave。这是付费软件。
pkgin
/pkgsrc
包管理器最初来自 NetBSD,具有也被移植到Solaris。如果您不依赖于特定的 Solaris 版本,那么您可能会对 OpenSolaris 发行版 Nexenta 感兴趣,该发行版有一个从 Ubuntu 移植过来的 GNU/Linux 用户区,包括 Debian 包管理器和 apt-get。 (这就是 Solaris 与 OpenSolaris 的区别;另外,我不确定 OpenSolaris 是否在 SPARC 硬件上运行。)
Some web searching turns up BlastWave. It's payware. The
pkgin
/pkgsrc
package manager, originally from NetBSD, has also been ported to Solaris.If you're not tied to a specific Solaris version, then you might be interested in the OpenSolaris distro Nexenta, which has a GNU/Linux userland ported over from Ubuntu, including the Debian package manager and
apt-get
. (There's your Solaris vs. OpenSolaris difference; also, I'm not sure if OpenSolaris runs on SPARC hardware.)在现代,即 Solaris 11 及更高版本,您无需通过第三方即可获得此功能。 Solaris 中与 apt-get 等效的命令是 pkg 命令。该包管理器称为 IPS。
例如,要获得最典型的开发工具(您的问题),只需以 root 或类似用户身份执行以下命令即可。
有关更多信息,请参阅这篇关于 Unix&Linux Stackexchange 的帖子。
Oracle 运行自己的 IPS 存储库,当您在软件包名称前添加
pkg://solaris
时,您将引用该存储库(如上例所示)。也有第三方存储库,但我发现 Oracle 的存储库可以满足我的需求。请记住,Solaris 实际上是一个服务器操作系统。在这方面它是首屈一指的。您也可以将它用作桌面操作系统,但与 Ubuntu 和 Windows 等操作系统相比,它还远远落后。
In modern days, i.e. Solaris 11 and beyond, you wouldn't have to go to third parties to get this. The equivalent of
apt-get
in Solaris is thepkg
command. This package manager is known as IPS.For example to get the most typical development tools (your question) simply execute the command below as root or similar user.
For more information look at this posting on Unix&Linux Stackexchange.
Oracle runs its own IPS repo which is what you reference when you prepend package names with
pkg://solaris
as in the example above. There are third-party repos out there as well but I've found Oracle's to be pretty complete for my needs.Remember that Solaris is really a server operating system. In this respect it is second-to-none. You can use it as a desktop operating system as well but compared to things like Ubuntu and Windows it is far behind.
包管理
BlastWave 已经消亡很长一段时间了。
请尝试使用 OpenCSW。它具有适用于 Solaris 8 及以上版本(x86 和 SPARC)的软件包存储库。
软件包安装就像
pkgutil -i
一样简单;所有依赖关系都将自动解决。发行版选择
至于操作系统本身,我建议使用 Sun/Oracle 版本,而不是 Nexenta 和其他分支,因为它们似乎拥有更大的用户群(因此更容易获得帮助)。此外,官方 Solaris 中的 ZFS 实现可能会更加稳定且功能丰富。 dtrace 也是如此。
另外,您还可以获得标准的 Sun 增强型 CDE 桌面。
分叉
如果您决定继续分叉,基于 Illumos 内核的发行版列表不仅限于 Nexenta:请参阅 此处。
对于桌面设备,OpenIndiana、OpenSXCE 和 Tribblix 似乎是最好的候选者。
Package management
BlastWave is dead for a long time now.
Please try OpenCSW instead. It has package repositories for Solaris 8 onwards, both x86 and SPARC.
Package installation is as easy as
pkgutil -i <package name>
; all dependencies will be resolved automatically.Distribution selection
As for the OS itself, I'd recommend Sun/Oracle versions over Nexenta and other forks, as they seem to have a larger user base (so it's easier to get help). Additionally, ZFS implementation in the official Solaris is likely to be more stable and feature-rich. The same is true for dtrace.
Plus, you get the standard Sun-enhanced CDE desktop.
Forks
If you decide to proceed with a fork instead -- the list of distributions based on the Illumos kernel is not limited to Nexenta alone: see here.
For desktops, OpenIndiana, OpenSXCE and Tribblix appear to be the best candidacies.