** Install Samba4 **
There are a few steps to install Samba4:
- Build Samba by yourself. Download the latest tarball from the official [[http://ftp.samba.org/pub/samba/stable/|Samba Web Site]] or [[http://softlib.uclv.edu.cu/Samba| UCLV Repository]]
- Install from your distribution package manager. In this case the latest version can be found on backports repositories (Debian)
- Install from SerNet Enterprise Samba package. You need to register in [[http://www.enterprisesamba.com/samba/|Sernet Enterprise Web Site]] and follow the instructions. Another way is follow the instructions in [[reposwiki#samba4_sernet|Samba4 Sernet Repository Wiki]] to configure the repository and [[install_samba4#install_samba4_from_sernet|install Samba4 from Sernet Repository]].
===== Build Samba =====
* Download the latest stable tarball form [[http://ftp.samba.org/pub/samba/stable/|Official Website]] or [[http://softlib.uclv.edu.cu/softlib/Software/Samba/| UCLV Repository]]
* Unpack the tarball
# tar -zxvf samba-4.x.x.tar.gz
* Enter to directory
# cd samba-4.x.x
* Type the following commands
# ./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 [[reposwiki#samba4_sernet|configure your "sources.list"]], then install Samba4:
# apt-get install sernet-samba-ad