Difference between revisions of "Package Dependencies Required to Build Samba"
(→Fedora 25: Add gpgme-devel (required for make test to pass and / or if the gpgme feature is needed))
(Added jansson-devel to the "optional" table with explanation.)
|Line 45:||Line 45:|
Revision as of 05:37, 12 June 2017
- 1 Operating System-independent Overview
- 2 Distribution-specific Packages Required to Build Samba
- 2.1 Samba Active Directory Domain Controller
- 2.2 Samba Domain Member
- 2.3 Samba NT4 PDC
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*-dev. For a list of distribution specific package installation commands, see Distribution-specific Packages Required to Build Samba.
|If you do not want to build Samba yourself, see Distribution-specific Package Installation.|
|Libraries and utilities||Required for|
|python||Several utilities, such as |
|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 |
|Libraries and utilities||Required for|
|jansson-devel||Audit logging (Samba 4.7 and later)|
|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).|
Distribution-specific Packages Required to Build Samba
The following list of commands is neither provided nor actively verified by the Samba team. If you see any missing packages or incorrect package names, please update the command or send the information to the Samba mailing list.
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 bison build-essential \ debhelper dnsutils docbook-xml docbook-xsl flex gdb krb5-user \ libacl1-dev libaio-dev libattr1-dev libblkid-dev libbsd-dev \ libcap-dev libcups2-dev libgnutls-dev libjson-perl \ libldap2-dev libncurses5-dev libpam0g-dev libparse-yapp-perl \ libpopt-dev libreadline-dev perl perl-modules pkg-config \ python-all-dev python-dev python-dnspython python-crypto \ xsltproc zlib1g-dev
- 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
- Due to a bug in the Debian
xsltprocpackage (Debian Bug #750593), Samba fails to build the
smb.confman page and a
Segmentation faulterror is displayed on 32-bit platforms. To work around the problem:
- Open the
docs-xml/wscript_buildfile in the Samba source code.
- Find this line:
- Open the
' if ('XSLTPROC_MANPAGES' in bld.env and bld.env['XSLTPROC_MANPAGES']):'
- Remove or comment out the following line:
- Start compiling the Samba sources. Please note, this will produce a build without a default smb.conf.
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
|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:
# yum install cups-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 libattr-devel keyutils-libs-devel \ libacl-devel libaio-devel libblkid-devel libxml2-devel openldap-devel \ pam-devel popt-devel python2-devel readline-devel zlib-devel jansson-devel \ gpgme-devel
# 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
Please note that the following sections assume at least an intermediate understanding of the Gentoo packaging system.
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
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
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.