Package Dependencies Required to Build Samba: Difference between revisions

From SambaWiki
(→‎Debian / Ubuntu: added liblmdb-dev, now required for Samba 4.9)
(46 intermediate revisions by 9 users not shown)
Line 1: Line 1:
= OS independent =
= Operating System-independent Overview =


Depending on your distribution, the package name of the following libraries and programs may differ. Typically they are labled with lib*-dev or lib*-devel. See [[#Distribution_specific_package_installation|Distribution specific package installation]].
The following is an operating system-independent list of libraries and utilities <u>required to build</u> and install Samba. Depending on your distribution, the name of packages can differ. Usually library packages are named <code>lib*-devel</code> or <code>lib*-dev</code>. For a list of distribution specific package installation commands, see [[#Distribution-specific_Packages_Required_to_Build_Samba|Distribution-specific Packages Required to Build Samba]].


{{Imbox
<u>Required:</u>
| type = note
| text = If you do not want to build Samba yourself, see [[Distribution-specific_Package_Installation|Distribution-specific Package Installation]].
}}


* python
:A good portion of Samba is written using python, including the build system itself (waf).


* perl


== Mandatory ==
<u>(Recommended) Optional:</u>


{| class="wikitable"
* acl
!Libraries and utilities
:Required for a successfull Samba AD DC deployment! On Member Servers it is required to use the complete set of Windows ACLs.
!Required for
|-
|python
|Several utilities, such as <code>samba-tool</code> and the build system ([[Waf|Waf]]), are written in Python.
|-
|perl
|
|-
|acl
|Required only on [[Active_Directory_Domain_Controller|Samba Active Directory domain controllers]] and member servers using [[Setting_up_a_Share_Using_Windows_ACLs|Windows ACLs]].
|-
|xattr
|Required only on [[Active_Directory_Domain_Controller|Samba Active Directory domain controllers]] and member servers using [[Setting_up_a_Share_Using_Windows_ACLs|Windows ACLs]].
|-
|python-crypto
|Samba AD DC only. Required by <code>samba-tool</code>, for example, to establish trusts.
|}


* xattr
:Required for a successfull Samba AD DC deployment! On Member Servers it is required to use the complete set of Windows ACLs.


* python-crypto
:Required by samba-tool, e. g. for creating trusts.


== Optional ==
* blkid


{| class="wikitable"
* gnutls
!Libraries and utilities
!Required for
|-
|krb5-devel and krb5-server
|MIT Kerberos support (Samba 4.7 and later). Requires MIT Kerberos 1.15.1 or later.
|-
|blkid
|
|-
|gnutls
|
|-
|jansson-devel
|Audit logging (Samba 4.7 and later)
|-
|readline
|
|-
|bsd or setproctitle
|Process title updating support.
|-
|xsltproc or docbook
|Man pages and other documentation.
|-
|pam-devel
|PAM support. For example, to [[Authenticating_Domain_Users_Using_PAM|authenticate domain users using PAM]].
|-
|cups
|[[Setting_up_Samba_as_a_Print_Server#CUPS|CUPS printer sharing support]].
|-
|openldap
|[[NT4_Domains|NT4 Domains]] support, including the [[Migrating_a_Samba_NT4_Domain_to_Samba_AD_(Classic_Upgrade)|Samba NT4 to AD migration (Classic Upgrade)]].
|}


* readline


== Selftest ==
* cups
:Required for CUPS printer sharing support.


The following additional packages / utilities are required only for running some tests.
* bsd or setproctitle
:Required for process title updating support.


{| class="wikitable"
* xsltproc / docbook
!Libraries and utilities
:Required for building man pages and other documentation.
!Required for
|-
|bash
|Some blackbox tests are bash-specific
|-
|python-markdown
|Reading Microsoft AD schema from github
|-
|patch
|Running some AD DC database tests
|}


= Distribution-specific Packages Required to Build Samba =
* pam-devel or libpam0g-dev
:Required to [[Setup_Samba_as_an_AD_Domain_Member#Authenticating_Domain_users_via_PAM|authenticate Domain users via PAM]]


{{Imbox
* openldap
| type = important
:Required to build the Samba NT4-style PDC components with LDAP support and Active Directory Member Server support. Also required for the [[Migrating_a_Samba_NT4_domain_to_a_Samba_AD_domain_(classic_upgrade)|Samba classicupgrade]].
| text = The following list of commands is neither provided nor actively verified by the Samba team. Additionally, it might be possible that you require additional or less packages than shown in the later commands - depending on the purpose you install Samba.
}}






== Samba Active Directory Domain Controller ==


The following installation commands include the BIND DNS server. If you are using the Samba internal DNS server, omit the BIND package(s). However, you require the package containing the <code>nsupdate</code> utility to enable dynamic DNS support.


= Distribution specific package installation =


== For a Samba Active Directory Domain Controller ==


=== Debian / Ubuntu ===
The following examples will cover all of the required libraries and programs. It will also cover BIND, kerberos and file system tools. If you plan to use the internal DNS server, you do not need BIND, but you do still need the package that contains the „nsupdate“ binary.


# apt-get install acl attr autoconf bind9utils bison build-essential \
debhelper dnsutils docbook-xml docbook-xsl flex gdb libjansson-dev krb5-user \
libacl1-dev libaio-dev libarchive-dev libattr1-dev libblkid-dev libbsd-dev \
libcap-dev libcups2-dev libgnutls28-dev libgpgme-dev libjson-perl \
libldap2-dev libncurses5-dev libpam0g-dev libparse-yapp-perl \
libpopt-dev libreadline-dev nettle-dev perl perl-modules pkg-config \
python-all-dev python-crypto python-dbg python-dev python-dnspython \
python3-dnspython python-gpgme python3-gpgme python-markdown python3-markdown \
python3-dev xsltproc zlib1g-dev liblmdb-dev


Notes:
* Before Debian 8 and Ubuntu 14.04, <code>libgnutls28-dev</code> was known as <code>libgnutls-dev</code>.
* perl-modules has been replace by perl-modules-5.24 on Debian Stretch (9)
* perl-modules has been replace by perl-modules-5.26 on Ubuntu Artful (17.10)
* python-gpgme and python3-gpgme have been replaced by python-gpg and python3-gpg on Debian Stretch and Ubuntu Artful
* If you are building Samba on a system that uses systemd, you will also require the libsystemd-dev package
* To use a [[Running a Samba AD DC with MIT Kerberos KDC | MIT Kerberos KDC]], you will need <code>libkrb5-dev</code> and <code>krb5-kdc</code>, version 1.15.1 or greater.


=== Red Hat Enterprise Linux 7 / CentOS 7 / Scientific Linux 7 ===
=== Debian / Ubuntu ===


Install the following packages to build Samba as an Active Directory (AD) domain controller (DC) on a minimal Red Hat Enterprise Linux 7, CentOS 7, or Scientific Linux 7 installation:
# apt-get install acl attr autoconf bison build-essential \

debhelper dnsutils docbook-xml docbook-xsl flex gdb krb5-user \
# yum install attr bind-utils docbook-style-xsl gcc gdb krb5-workstation \
libacl1-dev libaio-dev libattr1-dev libblkid-dev libbsd-dev \
libsemanage-python libxslt perl perl-ExtUtils-MakeMaker \
libcap-dev libcups2-dev libgnutls-dev libjson-perl \
perl-Parse-Yapp perl-Test-Base pkgconfig policycoreutils-python \
libldap2-dev libncurses5-dev libpam0g-dev libparse-yapp-perl \
python-crypto gnutls-devel libattr-devel keyutils-libs-devel \
libpopt-dev libreadline-dev perl perl-modules pkg-config \
libacl-devel libaio-devel libblkid-devel libxml2-devel openldap-devel \
python-all-dev python-dev python-dnspython python-crypto \
pam-devel popt-devel python-devel readline-devel zlib-devel systemd-devel
xsltproc zlib1g-dev

{{Imbox
| type = note
| text = Red Hat Enterprise Linux 7 does not include all required packages to build a Samba AD DC. Enable the external Extra Packages for Enterprise Linux (EPEL) repository before you install the packages. For details, see https://fedoraproject.org/wiki/EPEL. Enabling the EPEL repository is not requied on CentOS 7 and Scientific Linux 7.
}}


If the DC should act as print server (not recommended) with CUPS back end, additionally install:
Notes:
libgnutls-dev has been replace by libgnutls28-dev on Debian 8 Jessie and Ubuntu >=14.04
If you are building Samba on a system that uses systemd, you will also require the libsystemd-dev package
If you are building Samba >= 4.5.0, you will also require libgpgme11-dev python-gpgme python-m2crypto


# yum install cups-devel




Line 75: Line 149:
=== Fedora ===
=== Fedora ===


==== Fedora 26 ====
# yum install libacl-devel libblkid-devel gnutls-devel \
readline-devel python-devel gdb pkgconfig libattr-devel \
krb5-workstation python-crypto docbook-style-xsl openldap-devel


Install the following packages to build Samba as an Active Directory (AD) domain controller (DC) on Fedora 25:


# dnf install attr bind-utils docbook-style-xsl gcc gdb krb5-workstation \
libsemanage-python libxslt perl perl-ExtUtils-MakeMaker \
perl-Parse-Yapp perl-Test-Base pkgconfig policycoreutils-python \
python-crypto gnutls-devel gpgme-devel jansson-devel libattr-devel \
keyutils-libs-devel libacl-devel libaio-devel libblkid-devel \
libxml2-devel openldap-devel pam-devel popt-devel python2-devel \
readline-devel systemd-devel zlib-devel python-markdown


=== Red Hat Enterprise Linux / CentOS / Scientific Linux ===



# yum install perl gcc attr libacl-devel libblkid-devel \
==== Fedora 25 ====
gnutls-devel readline-devel python-devel gdb pkgconfig \

krb5-workstation zlib-devel setroubleshoot-server libaio-devel \
Install the following packages to build Samba as an Active Directory (AD) domain controller (DC) on Fedora 25:
setroubleshoot-plugins policycoreutils-python \

libsemanage-python perl-ExtUtils-MakeMaker perl-Parse-Yapp \
# dnf install attr bind-utils docbook-style-xsl gcc gdb krb5-workstation \
perl-Test-Base popt-devel libxml2-devel libattr-devel \
libsemanage-python libxslt perl perl-ExtUtils-MakeMaker \
keyutils-libs-devel cups-devel bind-utils libxslt \
perl-Parse-Yapp perl-Test-Base pkgconfig policycoreutils-python \
docbook-style-xsl openldap-devel autoconf python-crypto pam-devel
python-crypto gnutls-devel gpgme-devel jansson-devel libattr-devel \
keyutils-libs-devel libacl-devel libaio-devel libblkid-devel \
libxml2-devel openldap-devel pam-devel popt-devel python2-devel \
readline-devel systemd-devel zlib-devel python-markdown




Line 178: Line 261:
FIXME: Are dev-python/dnspython net-dns/libidn still required?
FIXME: Are dev-python/dnspython net-dns/libidn still required?


== Samba Domain Member ==




== For a Samba Member Server ==


=== Red Hat Enterprise Linux / CentOS / Scientific Linux ===
=== Red Hat Enterprise Linux / CentOS / Scientific Linux ===
Line 192: Line 271:




== Samba NT4 PDC ==


To be added.

== For a Samba NT4 PDC ==

Please add content or send the information to the [https://lists.samba.org/mailman/listinfo/samba Samba mailing list]

Revision as of 03:12, 25 May 2018

Operating System-independent Overview

The following is an operating system-independent list of libraries and utilities required to build and install Samba. Depending on your distribution, the name of packages can differ. Usually library packages are named lib*-devel or lib*-dev. For a list of distribution specific package installation commands, see Distribution-specific Packages Required to Build Samba.


Mandatory

Libraries and utilities Required for
python Several utilities, such as samba-tool and the build system (Waf), are written in Python.
perl
acl Required only on Samba Active Directory domain controllers and member servers using Windows ACLs.
xattr Required only on Samba Active Directory domain controllers and member servers using Windows ACLs.
python-crypto Samba AD DC only. Required by samba-tool, for example, to establish trusts.


Optional

Libraries and utilities Required for
krb5-devel and krb5-server MIT Kerberos support (Samba 4.7 and later). Requires MIT Kerberos 1.15.1 or later.
blkid
gnutls
jansson-devel Audit logging (Samba 4.7 and later)
readline
bsd or setproctitle Process title updating support.
xsltproc or docbook Man pages and other documentation.
pam-devel PAM support. For example, to authenticate domain users using PAM.
cups CUPS printer sharing support.
openldap NT4 Domains support, including the Samba NT4 to AD migration (Classic Upgrade).


Selftest

The following additional packages / utilities are required only for running some tests.

Libraries and utilities Required for
bash Some blackbox tests are bash-specific
python-markdown Reading Microsoft AD schema from github
patch Running some AD DC database tests

Distribution-specific Packages Required to Build Samba


Samba Active Directory Domain Controller

The following installation commands include the BIND DNS server. If you are using the Samba internal DNS server, omit the BIND package(s). However, you require the package containing the nsupdate utility to enable dynamic DNS support.


Debian / Ubuntu

# apt-get install acl attr autoconf bind9utils bison build-essential \
  debhelper dnsutils docbook-xml docbook-xsl flex gdb libjansson-dev krb5-user \
  libacl1-dev libaio-dev libarchive-dev libattr1-dev libblkid-dev libbsd-dev \
  libcap-dev libcups2-dev libgnutls28-dev libgpgme-dev libjson-perl \
  libldap2-dev libncurses5-dev libpam0g-dev libparse-yapp-perl \
  libpopt-dev libreadline-dev nettle-dev perl perl-modules pkg-config \
  python-all-dev python-crypto python-dbg python-dev python-dnspython \
  python3-dnspython python-gpgme python3-gpgme python-markdown python3-markdown \
  python3-dev xsltproc zlib1g-dev liblmdb-dev

Notes:

  • Before Debian 8 and Ubuntu 14.04, libgnutls28-dev was known as libgnutls-dev.
  • perl-modules has been replace by perl-modules-5.24 on Debian Stretch (9)
  • perl-modules has been replace by perl-modules-5.26 on Ubuntu Artful (17.10)
  • python-gpgme and python3-gpgme have been replaced by python-gpg and python3-gpg on Debian Stretch and Ubuntu Artful
  • If you are building Samba on a system that uses systemd, you will also require the libsystemd-dev package
  • To use a MIT Kerberos KDC, you will need libkrb5-dev and krb5-kdc, version 1.15.1 or greater.

Red Hat Enterprise Linux 7 / CentOS 7 / Scientific Linux 7

Install the following packages to build Samba as an Active Directory (AD) domain controller (DC) on a minimal Red Hat Enterprise Linux 7, CentOS 7, or Scientific Linux 7 installation:

 # yum install attr bind-utils docbook-style-xsl gcc gdb krb5-workstation \
       libsemanage-python libxslt perl perl-ExtUtils-MakeMaker \
       perl-Parse-Yapp perl-Test-Base pkgconfig policycoreutils-python \
       python-crypto gnutls-devel libattr-devel keyutils-libs-devel \
       libacl-devel libaio-devel libblkid-devel libxml2-devel openldap-devel \
       pam-devel popt-devel python-devel readline-devel zlib-devel systemd-devel

If the DC should act as print server (not recommended) with CUPS back end, additionally install:

# yum install cups-devel


Fedora

Fedora 26

Install the following packages to build Samba as an Active Directory (AD) domain controller (DC) on Fedora 25:

# dnf install attr bind-utils docbook-style-xsl gcc gdb krb5-workstation \
       libsemanage-python libxslt perl perl-ExtUtils-MakeMaker \
       perl-Parse-Yapp perl-Test-Base pkgconfig policycoreutils-python \
       python-crypto gnutls-devel gpgme-devel jansson-devel libattr-devel \
       keyutils-libs-devel libacl-devel libaio-devel libblkid-devel \
       libxml2-devel openldap-devel pam-devel popt-devel python2-devel \
       readline-devel systemd-devel zlib-devel python-markdown


Fedora 25

Install the following packages to build Samba as an Active Directory (AD) domain controller (DC) on Fedora 25:

# dnf install attr bind-utils docbook-style-xsl gcc gdb krb5-workstation \
       libsemanage-python libxslt perl perl-ExtUtils-MakeMaker \
       perl-Parse-Yapp perl-Test-Base pkgconfig policycoreutils-python \
       python-crypto gnutls-devel gpgme-devel jansson-devel libattr-devel \
       keyutils-libs-devel libacl-devel libaio-devel libblkid-devel \
       libxml2-devel openldap-devel pam-devel popt-devel python2-devel \
       readline-devel systemd-devel zlib-devel python-markdown


openSUSE

# zypper install libacl-devel python-selinux autoconf make \
    python-devel gdb sqlite3-devel libgnutls-devel binutils \
    policycoreutils-python setools-libs selinux-policy \
    setools-libs popt-devel libpcap-devel keyutils-devel \
    libidn-devel libxml2-devel libacl-devel libsepol-devel \
    libattr-devel zlib-devel cyrus-sasl-devel gcc \
    krb5-client openldap2-devel libopenssl-devel\
    bind-utils bind-lib


Gentoo

Please note that the following sections assume at least an intermediate understanding of the Gentoo packaging system.


Python

Gentoo uses Python 3 as the default python interpreter, but at this time Samba requires Python 2 (2.4.2 or later). The following set of commands will install and set up Python 2 as the default python interpreter.

# emerge --ask --noreplace '<dev-lang/python-3'
# eselect python set python2.7
# python-updater


Kerberos

On Gentoo, you have two choices for a kerberos implementation, app-crypt/mit-krb5 and app-crypt/heimdal. Unfortunately the two implementations can not be installed at the same time. Currently, the Samba only supports app-crypt/heimdal. So you must first uninstall app-crypt/mit-krb5, if installed. Then install app-crypt/heimdal and rebuild any packages that were using the previous kerberos implementation.

# emerge --unmerge --ask app-crypt/mit-krb5
# emerge --ask app-crypt/heimdal
# revdep-rebuild -- -ask


BIND

To enable automatic zone management, net-dns/bind and net-dns/bind-tools should be emerged with the USE flags for berkdb, dlz and gssapi set. To enable them permanently, add the following to /etc/package.use:

net-dns/bind berkdb dlz gssapi
net-dns/bind-tools gssapi

Then, emerge net-dns/bind:

# emerge --ask  net-dns/bind net-dns/bind-tools


Samba-supplied Libraries (tdb/ldb/tevent)

There are a few Samba libraries that need to be installed. Note that these packages might be keyworded as unstable, so you might need to add the following to your /etc/package.keywords:

~sys-libs/tevent-0.9.17
~sys-libs/tdb-1.2.10
~sys-libs/ldb-1.1.12
~sys-libs/talloc-2.0.7

Additionally, Samba requires sys-libs/tdb and sys-libs/talloc to be emerged with the USE flag python set. To enable this permanently, add the following to /etc/package.use:

sys-libs/tdb python
sys-libs/talloc python

Note: In new(er) installations of Gentoo, the above files will be located in /etc/portage/, i.e. /etc/portage/package.keywords and /etc/portage/package.use. They may be symlinked to /etc for backward compatibility.

Now, emerge the packages:

# emerge --ask '=sys-libs/talloc-2.0.7' '=sys-libs/tdb-1.2.10' '=sys-libs/tevent-0.9.17' '=sys-libs/ldb-1.1.12'

Note that ebuilds for the required versions of the above packages might not be availiable in the portage tree. In this case, check Gentoo's Bugzilla for updated ebuilds.


Other Misc. Build/Run Dependencies

To ensure a successful Samba 4 installation, there are a few other packages that should be installed, as shown below:

# emerge --ask net-libs/gnutls sys-apps/acl dev-libs/cyrus-sasl dev-python/subunit dev-python/dnspython net-dns/libidn 

FIXME: Are dev-python/dnspython net-dns/libidn still required?

Samba Domain Member

Red Hat Enterprise Linux / CentOS / Scientific Linux

# yum install autoconf automake gcc gdb krb5-devel krb5-workstation \
   openldap-devel make pam-devel python-devel docbook-style-xsl \
   libacl-devel libattr-devel libxslt 


Samba NT4 PDC

To be added.