Honka Ádám weboldala

AD telepítési leírás centos 7-re

By in 2023.07.01.
## Forrás:
https://www.howtoforge.com/tutorial/samba-4-with-active-directory-on-centos-7-rpm-based-installation-with-share-support/

# Telepítsük fel a centos 7-et

# Változtassuk meg az fqdn nevét másra
[root@localhost ~]#  hostnamectl set-hostname adhost.ceg.teszt

# ??? de kell
[root@localhost ~]#  yum install epel-release -y
[root@localhost ~]# yum install vim wget authconfig krb5-workstation -y

# készítsük elő a samba telepítést 
[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# wget http://wing-net.ddo.jp/wing/7/EL7.wing.repo
[root@localhost yum.repos.d]# sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/EL7.wing.repo

[root@localhost yum.repos.d]# yum install -y samba46 samba46-winbind-clients samba46-winbind samba46-client samba46-dc samba46-pidl samba46-python samba46-winbind-krb5-locator perl-Parse-Yappperl-Test-Base python2-crypto samba46-common-tools

[root@localhost ~]# service smbd stop
[root@localhost ~]# service nmbd stop
[root@localhost ~]# mv /etc/samba/smb.conf /etc/samba/smb.conf.old
[root@localhost yum.repos.d]# mv /etc/krb5.conf /etc/krb5.conf.old

# fel kell rakni még pár csomagot
[root@localhost ~]# yum install ntp


[root@localhost ~]# yum install attr

[root@localhost ~]# vim /etc/fstab
/dev/mapper/centos-root /                       xfs     defaults,acl,user_xattr        0 0

[root@localhost ~]# mount -a


### --use-xattrs=yes ezt nem tudtam belerakni
[root@localhost yum.repos.d]# samba-tool domain provision --realm=ceg.teszt --domain=CEGTESZT --adminpass='Ceg123' --server-role=dc --ldapadminpass='Ceg123' --use-rfc2307

[root@localhost yum.repos.d]# 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-3500/tcp --permanent;firewall-cmd --add-port=3268-3269/tcp --permanent

[root@localhost yum.repos.d]# firewall-cmd --reload


[root@localhost yum.repos.d]# vim /etc/systemd/system/samba.service
[Unit]
Description= Samba 4 Active Directory
After=syslog.target
After=network.target

[Service]
Type=forking
PIDFile=/var/run/samba.pid
ExecStart=/usr/sbin/samba

[Install]
WantedBy=multi-user.target

[root@localhost yum.repos.d]# systemctl enable samba

[root@localhost yum.repos.d]# systemctl restart samba

Comments (0)