“在Linux中设置Samba4为AD域控制器(DC)”的版本间的差异

来自YTYZX有图有真相的百科
跳转至: 导航搜索
 
第41行: 第41行:
 
firewall-cmd --add-port=464/tcp --permanent;firewall-cmd --add-port=464/udp --permanent;firewall-cmd --add-port=636/tcp --permanent; \
 
firewall-cmd --add-port=464/tcp --permanent;firewall-cmd --add-port=464/udp --permanent;firewall-cmd --add-port=636/tcp --permanent; \
 
firewall-cmd --add-port=1024-5000/tcp --permanent;firewall-cmd --add-port=3268-3269/tcp --permanent
 
firewall-cmd --add-port=1024-5000/tcp --permanent;firewall-cmd --add-port=3268-3269/tcp --permanent
 +
 +
 +
ln -sf /usr/local/samba/private/krb5.conf /etc/krb5.conf

2017年7月11日 (二) 08:55的最新版本

Samba 4.0版本开始支持将其作为活动目录(Active Directory)的域控制器(Domain Controller),本例中以最小化安装(Minimal)的CentOS 7为例。

1.输入“vi /etc/sysconfig/network-script/ifcfg-ens33”并按回车键确定。



输入“cd /tmp”进入/tmp目录。
输入“wget https://download.samba.org/pub/samba/stable/samba-4.6.5.tar.gz”下载最新版Samba。
      备注:本例中为4.6.5版本,实际使用中以最新版地址为准。
输入“tar -zxvf samba-4.6.5.tar.gz”解压下载Samba压缩文件。
输入“cd smab”进入文件夹。
输入“./configure --enable-debug --enable-selftest --with-ads --with-systemd --with-winbind”生成Makefile。
输入“make && make install”开始编译和安装,大约需要10到20分钟。


Red Hat Enterprise Linux 7 / CentOS 7 / Scientific Linux 7系统需安装
  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

其他版本

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
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
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 systemd-devel


firewall-cmd --add-port=53/tcp --permanent;firewall-cmd --add-port=53/udp --permanent;firewall-cmd --add-port=88/tcp --permanent;firewall-cmd --add-port=88/udp --permanent; \ firewall-cmd --add-port=135/tcp --permanent;firewall-cmd --add-port=137-138/udp --permanent;firewall-cmd --add-port=139/tcp --permanent; \ firewall-cmd --add-port=389/tcp --permanent;firewall-cmd --add-port=389/udp --permanent;firewall-cmd --add-port=445/tcp --permanent; \ firewall-cmd --add-port=464/tcp --permanent;firewall-cmd --add-port=464/udp --permanent;firewall-cmd --add-port=636/tcp --permanent; \ firewall-cmd --add-port=1024-5000/tcp --permanent;firewall-cmd --add-port=3268-3269/tcp --permanent


ln -sf /usr/local/samba/private/krb5.conf /etc/krb5.conf