Get Started With Blastwave.org for Solaris 10 Users

    技术2022-05-11  7

    Step 1 - Install pkg-get

    To do much of anything you will need pkg-get on your system. Thanks to a few new features in the pkgadd command you can do this directly from the Blastwave.org site with no need for fancy footwork. Simply do the following :

    # pkgadd -d http://www.blastwave.org/pkg_get.pkg

    Those of you that are very security conscious may choose to manually fetch the package and check the MD5 sig. Here then is the link that you will need:

    Download pkg-get package. 

    And locally install the package:

    # pkgadd -d pkg_get.pkg

    Step 2 - Edit the pkg-get configuration file

    You may be located in Germany or United States or Kalamazoo . In each of these cases you should edit the pkg-get configuration file in order that we will get software packages from a nearby source. 

    # vi /opt/csw/etc/pkg-get.conf   

     

    # Configuration file for "pkg-get"   

    # man pkg-get for details on the program   

    # This config file has been pre-customized for use with CSW packages.   

     

    # The latest set of CSW mirrors is always available at   

    # http://www.blastwave.org/mirrors.html   

    # default site, in USA :   

    url=http://ibiblio.org/pub/packages/solaris/csw/unstable

     

    # If you are behind a firewall, set one of these as appropriate

    ftp_proxy=http://proxy02.pd.intel.com:911

    http_proxy=http://proxy02.pd.intel.com:911

    export http_proxy ftp_proxy

     

    The other option is to use a Blastwave Mirror server near you and to ensure that the url in the /opt/csw/etc/pkg-get.conf reflects your choice.

     

    Step 3 - Install the complete wget package

    We will now use pkg-get to install the complete wget package along with all its dependencies.

    Simply type the following:

    # /opt/csw/bin/pkg-get -i wget

    Note:

    If you haven't installed the entire Solaris OS, the pkg-get may fail to install wget, with the error:

    "no working version of wget found, in PATH"This is due to the miss of SUNWwgetr and SUNWwgetu packages. Install them by inserting an installation DVD disk into the DVDROM and mount it to /media/xxxx# cd Solaris_11/Product/# pkgadd -d . SUNWwgetr# pkgadd -d . SUNWwgetu

     

    Note: Do not be alarmed if you see a large amount of text streaming across your screen. This is just pkg-get doing its job for you. A complete log of what you can expect to see is here. You may now install GNOME and KDE and Mozilla and XFCE or SeaMonkey or anything else that you want.

     

    To install GNOME :

    # pkg-get -i gnome

     

    To install KDE :

    # pkg-get -i kde_gcc

     

    To install Mozilla :

    # pkg-get -i mozilla

     

    To install SeaMonkey :

    # pkg-get -i seamonkey

     

     

    Note:By default you may be asked confirmation questions many many many times. This is very annoying when you are installing large suites of software like GNOME or KDE. Something that you should do is look at the man page for pkg-get with the following command :

    man -M /opt/csw/man pkg-get

    If you actually read that man page you will find a section titled "MORE AUTOMATION" in which you will learn that you can configure the pkgadd ( the software package maintainance utility ) to NOT ASK YOU these questions.

     

    Simply do the following : You must be root for this

    cp -p /var/pkg-get/admin-fullauto /var/pkg-get/admin

     

    Now you will be able to run a “pkg-get install foobar” and not get any questions about any of the dependencies of foobar. This makes life very easy. To install a massive package like GNOME you can type “# pkg-get -i gnome” and then walk away for a coffee. Everything will be done for you!

    Step 4 - Best Practices

    What I have to say here will be “Motherhood” statements at best. Really just a bit of advice if you are making the leap from Linux and wonder where to set the PATH for your users and things like that.

    Firstly we need to talk about the root user. Don't mess with the root user account! That was less than clear so I guess I had better elaborate. It seems to be common practice to change the root users default shell. Don't do that unless you have Solaris 10

     

    What I do recommend is that you change the root users home directory location to /root and nothing more fancy than that. You can edit the /etc/passwd file and change the entry for the root user thus:

    root:x:0:1:Super-User:/root:/sbin/sh

     

    Be very diligent about creating the root users home directory right away and ensure that it is only readable by the root user :

     

    # mkdir /root

    # chmod 700 /root

    # chown root:root /root

     

     

    Also, you may be wondering why you should not change the root users default shell to bash. Simply put, any other shell than /sbin/sh will be a dynamically linked executable with dependencies. If you were to check /sbin/sh you would find that it is a standalone program:

     

    $ ldd /sbin/sh

    ldd: /sbin/sh: file is not a dynamic executable or shared object

     

    That means that your machine can suffer some horrible disaster and still be able to function in single user mode if you can boot the kernel and get to a running shell with the root user. That is because the root user only needs /sbin/sh to have a fully functional shell. If you were to use bash or any other shell then you would need a stack of dependencies. Those dependencies may not exist if they are on some other file system or on a damaged file system.

     

    Solaris 10 is different. Solaris 10 has a default Bourne Shell /sbin/sh that is not statically linked anymore. This was done intentionally when the single/multi threaded process model was unified and the statically linked libc was removed. Solaris 10 commands in /sbin should only link with things in /lib. There are symlinks in /usr/lib to /lib for some libraries for backwards compatibility reasons. In fact, Solaris 10 is so smart that both su and login will fall back to /sbin/sh if the shell you specify in /etc/passwd for root can not be executed for some reason. What I am saying here is that you can change root's shell in Solaris 10 and still sleep well at night.

     

    Next item is the default PATH for the root user and regular users. You can set this in the files /etc/default/login and /etc/default/su. Please feel free to be pedantic and set PATH and SUPATH in both of those files to something useful thus:

    PATH=/opt/csw/bin:/usr/sbin:/usr/bin:/usr/dt/bin:/usr/openwin/bin:/usr/ccs/bin

     

    Really you can leave /opt/csw/bin out of there entirely if you want. The software from Blastwave is isolated in /opt/csw and will not interfere with your other software. You can use GNOME from somewhere else if you want. Your users can have there own .profile files that determine that they run JDS if they want.

     

    On the other hand your users may place /opt/csw/bin first in their PATH and then will be running with the desktop software and applications from Blastwave. Again, this will be isolated. Don't be surprised if you have problems switching back and forth from different distributions of GNOME however. There are a lot of configuration files that get created in the users home directory and you can really only depend on them to work consistently when you stay on one edition of KDE or GNOME. 


    最新回复(0)