Проверяем имя хоста
Код: Выделить всё
hostname
hostname -f
Код: Выделить всё
hostnamectl set-hostname ldap1
Код: Выделить всё
echo '192.168.100.84 ldap1.ph.local ldap1' >> /etc/hosts
Код: Выделить всё
# hostname
ldap1
# hostname -f
ldap1.ph.local
Устанавливаем необходимые пакеты
Код: Выделить всё
sudo apt install apache2 php php-cgi libapache2-mod-php php-mbstring php-common php-pear
sudo apt install slapd ldap-utils
Creating initial configuration... done.
Creating LDAP directory... done.
Processing triggers for libc-bin (2.31-13+deb11u8) ...
Проверяем установленное
Код: Выделить всё
sudo slapcat
objectClass: top
objectClass: dcObject
objectClass: organization
o: ph.local
dc: ph
structuralObjectClass: organization
entryUUID: 21841f62-a2f7-103e-9ab4-9f9bb81af1f3
creatorsName: cn=admin,dc=ph,dc=local
createTimestamp: 20240510085753Z
entryCSN: 20240510085753.398837Z#000000#000#000000
modifiersName: cn=admin,dc=ph,dc=local
modifyTimestamp: 20240510085753Z
Должен получиться домен: ph.local
и админский акк: admin
--------------------------------------------------------------------------
Устанавливаем LDAP Account Manager
Код: Выделить всё
sudo apt install ldap-account-manager
Код: Выделить всё
sudo a2enconf php*-cgi
sudo systemctl restart apache2
Код: Выделить всё
sudo systemctl enable apache2
Код: Выделить всё
systemctl status apache2