Table of Contents

Install Samba4

There are a few steps to install Samba4:

  1. Build Samba by yourself. Download the latest tarball from the official Samba Web Site or UCLV Repository
  2. Install from your distribution package manager. In this case the latest version can be found on backports repositories (Debian)
  3. Install from SerNet Enterprise Samba package. You need to register in Sernet Enterprise Web Site and follow the instructions. Another way is follow the instructions in Samba4 Sernet Repository Wiki to configure the repository and install Samba4 from Sernet Repository.

Build Samba

 # tar -zxvf samba-4.x.x.tar.gz
 # cd samba-4.x.x
 # ./configure --enable-debug --enable-selftest
 # make

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

If you want to install Samba in a different directory, then you should use the - -prefix option to configure. Too the availables options in './configure':

 # ./configure --help

We recommend using '- -enable-debug - -enable-selftest' for Samba is that it will include extra debug information that will help us diagnose problems in case of failures, and will also allow you to run our selftest make test to validate that Samba can behave correctly on your platform. Both of these are however, entirely optional.

To install Samba, run the following command in your samba directory:

 # make install

Add Samba binaries location to $PATH variable:

 # nano ~/.bashrc

At the end add:

 PATH=$PATH:/usr/local/samba/bin/:/usr/local/samba/sbin/

Apply the changes:

 # cd ~
 # .  .bashrc

Upgrading a source version

To upgrade to the latest Samba version from a previous Samba release, you must first download the latest tarball.Then stop all samba process that are running. Once you have obtained the latest version, simply run the following commands:

 # cd samba-4.x.x
 # ./configure --enable-debug --enable-selftest
 # make
 # make install

Note: Please use the same './configure' options as before to retain full functionality.

Install Samba4 from SerNet

To install Samba4 using SerNet packages, you must to configure your "sources.list", then install Samba4:

 # apt-get install sernet-samba-ad