Installing Software
From Mac OS X Server FAQ
There are several ways to install software in Mac OS X Server. First we'll talk about installer packages, then move on to less common scenarios.
Packaged Software
- The traditional method is to install from the server's console by double clicking the installer package and following the onscreen instructions.
- From the command line; there is the
installerprogram. This assumes that the installer package is already on the server and just needs to be installed. If the package needs to be copied to the server, use scp to copy the file over. An example scp usage would be:
scp -r /path/to/installer.pkg admin@my.server.com:
Note that we need to use the -r switch for scp since the installer package is actually a directory, not a regular file. Once the installer package is copied over, SSH into the server to run installer. man installer for more info
- Using Apple Remote Desktop it is possible to both push the installer package to the server and also install it.
Non-Apple GUI installers
If the stuff to be installed is not in apple's package installer format, things may get a tad more difficult. Both the GUI "Installer" and the CLI "installer" will be of no help; same with Remote Desktop's "Install Packages" function.
If the software to be installed comes with its own installer (e.g. a Vise installer), then double-clicking that and running it from the server's console is great - if you have console access. Controlling the server's GUI with Remote Desktop or another such solution would also work.
There is no universal command line method for executing non-apple installer formats that traditionally operate in the GUI. To get around this, you'll need to install the software on a workstation on which you DO have GUI access. Hopefully there is an installer log telling you what was placed where, because you'll need to manually move all the files to the server. Sometimes this works with ease, but it very possibly may not work at all (e.g. if the software relies on a post-installation script that does something machine-specific). If you are uncomfortable with this, it may be best to forego it entirely in favor of a better solution. Feel free to ask the vendor to get with the times; otherwise, consider creating your own package installer.
Also it is possible to create a disk image that can be used in a restore context to install software. To do.
UNIX / CLI software
UNIX software is commonly distributed in a 'gzipped tarball'; that is, a file that ends with .tar.gz or .tgz (there are several other formats, but this is the most common).
Begin by decompressing and extracting the archive (if Stuffit Expander didn't do it for you already):
gunzip file.tar.gz tar -xf file.tar
or
tar -zxf file.tgz
This will create a new directory and unarchive the software into this directory. Proceed straight to the README or INSTALL files. Read them.
UNIX software that utilizes make / autoconf (and most does) can typically be installed with these three steps, performed in the archive directory:
./configure make sudo make install
Even if if all that works with seemingly no errors (warnings are generally ok), you may not be done yet. By default, OS X does not include directories that are commonly used by third-party unix software such as /usr/local/bin. While the installer may create the necessary directories for you, you may still be unable to easily run the new program since your shell does not know to look in this new folder when you type command names. To remedy this, add /usr/local/bin to your shell's PATH.
Edit /etc/profile as root and change
PATH="/bin:/sbin:/usr/bin:/usr/sbin"
to
PATH="/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin"
Close / open a new terminal and try running your newly installed program by name.
Perhaps some of this content should be merged with this page
Installing UNIX software is much easier with a package manager such as Fink.
