Difference between revisions of "Build Samba from Source"

(Face-lifting the page (structure, formattings, text changes, remove unneccessary text, etc.), also adapting the page to fit to all Samba builds (not only Samba AD DC))
(Moved the "obtaining Samba" section out of this page to a new, separate page.)
Line 19: Line 19:
 
= Obtaining Samba =
 
= Obtaining Samba =
  
== Stable version (recommended) ==
+
See [[Obtaining Samba|Obtaining Samba]].
 
 
You can download the latest version of Samba from [https://www.samba.org/ https://www.samba.org/].
 
 
 
It is always recommended that you install the latest version of the [[Samba_Release_Planning#Current_Stable_Release|current stable release]]. If you require to choose a previous series, always choose the last version out of the [[Samba_Release_Planning#Maintenance_Mode|Maintainance Mode series]] or at least from the [[Samba_Release_Planning#Security_Fixes_Only_Mode|Security Fixes Only Mode]]. Older version may not contain all improvements, bug- and security fixes. Also if you require help and ask e. g. on the [https://lists.samba.org/mailman/listinfo/samba Samba Mailing List], you typically will be told to try a recent version, to ensure that the problem isn't fixed in the meantime.
 
 
 
Further information about Samba Release Plannings and Supported Release Lifetime, you can find at the [[Samba_Release_Planning|Samba Release Planning]] page.
 
 
 
 
 
 
 
== Development versions ==
 
 
 
=== samba-master ===
 
 
 
'''Warning: Never install a development version in production! It may contain untested features and can cause damages to your installation! Development releases are for testing purposes only!'''
 
 
 
„samba-master“ contains the source of the [[Samba_Release_Planning#Upcoming_Release|upcomming release series]].
 
 
 
To download the latest samba-master repository, run
 
 
 
$ git clone git://git.samba.org/samba.git samba-master
 
 
 
alternatively:
 
 
 
$ git clone http://gitweb.samba.org/samba.git samba-master
 
 
 
 
 
 
 
=== Development version of a specific branch ===
 
 
 
The v*-test branches contain the latest changes and patches since the last official release of that source tree.
 
 
 
The following example demonstrate the checkout of the latest sources of Samba 4.1, scheduled for the next 4.1.x release:
 
 
 
$ git clone -b v4-1-test git://git.samba.org/samba.git samba-v4-1-test
 
 
 
alternatively:
 
 
 
$ git clone -b v4-1-test http://git.samba.org/samba.git samba-v4-1-test
 
 
 
 
 
 
=== Updating a local git repository ===
 
 
 
If you already have downloaded a development source tree via „git“ and want to update it to the latest version, run the following command out of your corresponding git source directory:
 
 
 
$ git pull
 
 
 
If you receive the following error
 
 
 
fatal: Unable to create '[...]/.git/index.lock': File exists.
 
 
 
run
 
 
 
$ git clean -x -f -d
 
 
 
to reset your tree.
 
  
  

Revision as of 23:41, 27 May 2014

Introduction

This document describes how to build Samba from source.

It can be used for any kind of Samba installation (Samba AD DC, Member Server, Samba PDC, etc.).



Samba Operating System Requirements

See OS Requirements.



Obtaining Samba

See Obtaining Samba.



Compile Samba

To build Samba, run the following commands out of the root of your Samba source directory (Only for compiling a Samba 3.x version, run the commands in the subdirectory [...]/source3/):

 $ ./configure
 $ make

The above command will setup Samba to install in /usr/local/samba/.

It's recommended to run

$ ./configure --help

to check out the possible configure options, to adapt your installation.

If you are using a development version of Samba or require a build with extra debug information, that may help to diagnose in case of failure, add the following option to „configure“:

--enable-debug 

To include the Samba selftest („make test“) in the build, add the following option to „configure“:

--enable-selftest



Install Samba

To install Samba, run the following command in your Samba source directory as user „root“ (Only for installing a Samba 3.x version, run the command in the subdirectory [...]/source3/):

# make install


Upgrading a source version

See Updating Samba.