Solaris Resources at Kempston
Installing software on Solaris7 and Solaris 8
| www.kempston.net/solaris/ | www.kempston.org/solaris/ |
Introduction
Most software for Solaris downloaded from the Net is supplied in one of two forms: a packaged binary which is installed by means of the 'pkgadd' command, and in source code which needs to be compiled using a C compiler. Compiling software is not difficult, even if you have no knowledge of C!
Both forms of software are generally compressed using the 'compress' or 'gzip' program. Compressed files are indicated by a ".Z" suffix and gzip'd files by a ".gz" suffix. Source code is also generally supplied in 'tar' format which is then compressed. tar is a brilliant program which can combine an entire directory tree (directories and files) into a single 'archive' file, making it simple to issue a complicated directory structure. After downloading a tar archive, tar is used again to recreate the directory structure on the target system. Tar archives which have been compressed are indicated by a ".tar.Z" suffix and tar archives which have been gzipd are indicated by a ".tar.gz" suffix.
One word of warning: some Web browsers on Windows platforms misinterpret these suffixes and tend to save files with a name ending in "tar.tar". Be careful to note the real file name of a binary file before downloading it on a Windows machine and rename the file after downloading to the correct name.
If your Solaris system dual boots into either Windows or Solaris and you want to download software using Windows, note that Solaris is quite happy to read files saved under Windows. If your Windows c: drive is the master disc on the primary IDE controller, the following commands mount your c: drive under a directory called /dos in the Solaris file system:
# mkdir /dos # mount -F pcfs /dev/dsk/c0d0p0:c /dos
and you can perform this mount automatically at boot time by adding a line to /etc/vfstab which reads:
/dev/dsk/c0d0p0:c - /dos pcfs - yes -
Note that ":c" on the end of the device name means the first DOS partition on the drive. The following command mounts the second DOS partition on the same drive:
# mount -F pcfs /dev/dsk/c0d0p0:d /dos
This page provides general guidance on installing software.
General software installation process
A quick guide to installing software follows. The general principle applies to most software downloaded from the Net and there are specific pages which provide detailed step-by-step instructions for installing gzip, gcc, flex, TCP wrappers and Samba.
If you intend to keep the downloaded distribution file after installing the software, it's convenient to create a suitable directory on a partition that has a reasonable amount of free space. I keep downloaded distribution files in the /opt partition in the directories /opt/software and /opt/source, and use /opt/temp as a temporary directory in which to uncompress downloaded files. To create these directories:
# mkdir /opt/software /opt/source /opt/temp
If the downloaded file has a .Z suffix (for example, programfile.Z), uncompress it with:
# cd /opt/temp # uncompress programfile.Z
The uncompress program replaces programfile.Z with programfile
If the downloaded file has a .gz suffix (for example, programfile.tar.gz), uncompress it with:
# cd /opt/temp # gunzip programfile.tar.gz
The gunzip program replaces programfile.tar.gz with programfile.tar
Having uncompressed the downloaded program distribution file, you may be left with a package file without a '.tar' suffix or a tar archive. If the uncompressed file doesn't have a '.tar' suffix, continue with step 3. Otherwise, the file needs to be untarred before proceeding.
If the program file is source code and you want to keep the source code, make a directory under /opt/source with a name which is the same as the program's name, copy the .tar file to this directory and untar it there:
# mkdir /opt/source/programname # cp /opt/temp/programfile.tar /opt/source/programname # cd /opt/source/programname # tar xvf programfile.tar
Once the downloaded distribution file is uncompressed, installing a package is simple:
# cd /opt/temp # pkgadd -d programfile
pkgadd may ask you a couple of questions about whether you really want to install the package and, perhaps, the name of a base directory in which to install the package. The /opt directory is a good choice. When the software is installed, you may want to clear out the /opt/temp directory:
# cd /opt/temp # rm programfile
And that's all there is to it.
When the downloaded distribution file has been uncompressed and untarred, go to the source directory and have a look at the files in it:
# cd /opt/source/programname # ls
You'll probably find one or more text files there, with names such as README and INSTALL, as well as one or more directories containing the source code itself. Read through these text files and you're likely to find detailed instructions telling you how to compile and install the software. Often, the procedure is as simple as issuing a number of commands such as:
# ./configure # make # make install
For detailed examples of how to install several specific programs, please see my detailed step-by-step instructions for installing gzip, gcc and flex and TCP wrappers
Has this guide been useful?
I hope these instructions prove useful. If you have any comments or suggestions for improvement, or have found any technical errors, please email me at mike@kempston.net
This page is copyright © mike@kempston.net 2000. Reproduction is forbidden without the author's permission. You are welcome to link to these pages if you wish but please point to the pages at www.kempston.net: Solaris Resources at Kempston
| Home | Free Solaris | Connecting to an ISP |
| Configuring mail | Configuring modem dialup | Configuring a PPP server |
| Installing Software | Solaris FAQs and Software | Site Index |
This page is maintained by the
Kempston Webmaster
Last updated 2 February 2000