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.
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.)
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 the pkg
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.
pkg install pkg://solaris/developer/build/gnu-make \ pkg://solaris/developer/build/make \ pkg://solaris/developer/gcc-45 \ pkg://solaris/system/header \ pkg://solaris/developer/build/autoconf \ pkg://solaris/developer/build/automake-110
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.
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.
精彩评论