Online Book Reader

Home Category

Running Linux, 5th Edition - Matthias Kalle Dalheimer [302]

By Root 1191 0
from the Samba web site http://www.samba.org/. To obtain a development version, you can download Samba from Subversion or using rsync.

Samba is developed in an open environment. Developers use Subversion to check in (also known as commit) new source code. Samba's various Subversion branches can be accessed via anonymous Subversion using SVNweb or using the Subversion client.

To use SVNweb, access the URL http://svnweb.samba.org.

Subversion gives you much more control over what you can do with the repository and allows you to check out whole source trees and keep them up-to-date via normal Subversion commands. This is the preferred method of access by Samba developers.

In order to download the Samba sources with Subversion, you need a Subversion client. Your distribution might include one, or you can download the sources from http://subversion.tigris.org.

To gain access via anonymous Subversion, use the following steps.

Install a recent copy of Subversion. All you really need is a copy of the Subversion client binary.

Run the command: linux:~ # svn co svn://svnanon.samba.org/samba/trunk samba.

This will create a directory called samba containing the latest Samba source code (usually the branch that is going to be the next major release). At the time of writing, this corresponded to the 3.1 development tree.

Other Subversion branches besides the trunk can be obtained by adding branches/BRANCH_NAME to the URL you check out. A list of branch names can be found on the Development page of the Samba web site. A common request is to obtain the latest 3.0 release code, which can be done using the following command: linux:~ # svn co svn://svnanon.samba.org/samba/branches/SAMBA_3_0_RELEASE samba_3

Whenever you want to merge in the latest code changes, use the following command from within the Samba directory: linux:~ # svn update

Building Samba from source. To install from source, go to the Samba web site at http://www.samba.org and click on one of the links for a download site near you. This will take you to one of the mirror sites for FTP downloads. The most recent stable source release is contained in the file samba-latest.tar.gz. This file will give you detailed instructions on how to compile and install Samba. Briefly, you will use the following commands:

linux:~ # tar xzvf samba-latest.tar.gz

linux:~ # cd samba-VERSION

linux:~ # su

Password:

linux:~ # ./configure

linux:~ # make

linux:~ #make install

Make sure to become superuser before running the configure script. Samba is a bit more demanding in this regard than most other open source packages you may have installed. After running the commands just shown, you will be able to find Samba files in the following locations:

Executables in /usr/local/samba/bin

Configuration file in /usr/local/samba/lib

Logfiles in /usr/local/samba/log

smbpasswd file in /usr/local/samba/private

Manual pages in /usr/local/samba/man

You will need to add the /usr/local/samba/bin directory to your PATH environment variable to be able to run the Samba utility commands without providing a full path. Also, you will need to add the following two lines to your /etc/man.config file to get the man command to find the Samba manpages:

MANPATH /usr/local/samba/man

MANPATH_MAP /usr/local/samba/bin /usr/local/samba/man

Configuring Samba

The next step is to create a Samba configuration file for your system. Many of the programs in the Samba distribution read the configuration file, and although some of them can get by with a file containing minimal information (even with an empty file), the daemons used for file sharing require that the configuration file be specified in full.

The name and location of the Samba configuration file depend on how Samba was compiled and installed. An easy way to find it is to use the testparm command, shown later in this section. Usually, the file is called smb.conf, and we'll use that name for it from now on.

The format of the smb.conf file is like that of the .ini files used by Windows 3.x: there are entries of the type:

key

Return Main Page Previous Page Next Page

®Online Book Reader