Samba is in such popular use that many Unix distributions come with it already installed. If you choose to use a bundled version of Samba, you can breeze through most of this chapter, but you'll be stuck with the Samba version and compile-time options your vendor selected for you. That version of Samba can't be any newer than the operating system release, so you're likely to be pretty far behind the latest developments. On the other hand, you can be fairly sure that a bundled version has been installed properly, and perhaps it will take only a few simple modifications to your smb.conf file for you to be off and running. Samba is mature enough that you probably don't need the latest release to meet your basic needs, so you might be perfectly happy running a bundled version. If you choose this option, be aware that your Samba files, including the very important smb.conf , might be in different places than they would be if you were to install from a binary or source distribution. For example, with the Red Hat, Debian, and Mandrake Linux distributions, smb.conf and some other Samba- related files are in the /etc/samba directory. If Samba is already installed on your system, you can check to see what version you have by using the command: $ smbd -V Version 2.2.6 (If this doesn't work, it might be because smbd is not in your shell's search path . If you have the locate or whereis command in your Unix variant, you can use it to locate the smbd executable.) You might also be able to use a system-specific tool to query a software-package maintenance utility. On Red Hat Linux, you can use the rpm command to query the installed packages for Samba: $ rpm -qa grep samba samba-client-2.0.8-1.7.1 samba-2.0.8-1.7.1 samba-common-2.0.8-1.7.1 This shows we have Samba 2.0.8, divided into three Red Hat Package Manager (RPM) packages, bundled with Red Hat 7.1. If your version of Samba is old, you might at the very least want to check with your vendor for an update. Otherwise, if you're sure you are going to install from a binary or source distribution, you can remove the RPM packages as follows : # rpm -e samba # rpm -e samba-client # rpm -e samba-common If you are not using Red Hat Linux, consult your system's documentation to find the method that works for you. 2.1.1 Binary or Source?Precompiled "binary" packages are also available for a large number of Unix platforms. These packages contain binaries for each Samba executable, as well as the standard Samba documentation. Note that while installing a binary distribution can save you a fair amount of time and trouble, you should keep a couple of issues in mind when deciding whether to use the binary or compile the source yourself:
One point worth mentioning is that the Samba source requires an ANSI C compiler. If you are on a legacy platform with a non-ANSI compiler, such as the cc compiler on SunOS Version 4, you'll have to install an ANSI-compliant compiler such as gcc before you do anything else. [1] If installing a compiler isn't something you want to wrestle with, you can start off with a binary package. However, for the most flexibility and compatibility on your system, we always recommend compiling from the latest stable or production source.
A typical installation will take about an hour to complete, including downloading the source files and compiling them, setting up the configuration files, and testing the server. Here is an overview of the steps:
|