Tille - I can see you, read those man pages!   Tille's Site

How to add Open Source software in 10 steps

In the example below, we will make ourselves a full-featured bash. It is a good idea to compile your own if you want full compatibility.

  1. Download the source, e.g. from a mirror of sunfreeware.com. Make sure that you download the source with the highest version number. In the example, we put this archive, bash-2.05.tar.gz in a subdirectory src in our home directory.

  2. Check that you have gcc, so that you can compile your own software. If not, grab your copy, also available from sunfreeware, and add it with the pkgadd command.

  3. Set the CC variable:

    user@host ~/src> export CC=/opt/bin/gcc

    or where you have yours. You may want to add this line to your personal shell resource configuration file if you plan on doing this kind of work more often, e.g.:

    user@host ~/src> echo "export CC=/opt/bin/gcc" >> ~/.bashrc
  4. Check that you have a make in your PATH. If you don't, you can use the default Solaris /usr/ccs/bin/make program.

    The /usr/ccs/bin directory should be in your path if you did not install all necessary GNU software. In that case, make sure that it is listed in the PATH variable before the /usr/ucb directory.

    If you did install all needed GNU software such as the binutils and make packages, these are probably in a central directory. Of course, that directory should be in your path. Make sure that it is listed before the /usr/ccs/bin and /usr/ucb directories, e.g.:

    user@host ~/src> echo $PATH
  5. Unpack the source:

    user@host ~/src> gunzip -dc bash-2.05.tar.gz | tar xvf -
    --output ommitted--
  6. cd into the directory created and READ THE README FILE:

    user@host ~/src> cd bash-2.05
    user@host ~/src/bash-2.05> less README

    Every software comes with a README file. READ IT. It contains important information and guidelines for installation.

  7. The first step will usually be a series of probes to determine your system configuration:

    user@host ~/src/bash-2.05> ./configure
    --output ommitted--

    This will create a Makefile (creating Makefile), holding instructions of how to make this software for your machine. Advanced users may want to check this file. It is also usefull to check the first part of the configure file, especially if the ./configure command results in errors.

    Check the README file and other files it points to for special instructions! The configure command can usually take some options!

  8. Usually you will have to run the make command after this. Check with the documentation!

    The make generates a lot of output, just let it scroll. For larger programs, this is the time for having that cigarette.

    Check with the documentation for any additional make commands!

  9. After making the software, you should test it, in this case:

    user@host ~/src/bash-2.05> ./bash
    user@host ~/src/bash-2.05> 

    Test your favorite variables and commands. If everything seems OK, you may install this program. Mind that the actual executable binaries that you created, might be in a subdirectory of the current one, for other packages.

  10. For installing the newly created software in a public directory, you ned to have root privileges, so switch to the root account:

    # cd /export/home/user/src/bash-2.05
    # /usr/ccs/bin/make install
    --output ommitted--

    You will find the new bash version in the directory specified in the configure file.

Note that on Solaris 9, some of the GNU software is installed by default in /usr/sfw/bin. It also comes with Samba, OpenLDAP (SunONE Directory Server), wget, ncftp, Apache and OpenSSH installed by default.

© 1995-2010 Machtelt Garrels - tille - Powered by vIm - Best viewed with your eyes - Validated by W3C - Last update 20100511