0% found this document useful (0 votes)
70 views7 pages

Ldap

The document provides instructions for installing an LDAP server on CentOS 7. It involves 9 steps: 1) Installing CentOS 7, 2) Configuring timezone, hostname and hosts file, 3) Installing and configuring Chrony for NTP, 4) Installing and configuring Dnsmasq for DNS, 5) Configuring the firewalld, 6) Installing prerequisite packages for Zimbra, 7) Installing the Zimbra LDAP server software, 8) Checking the Zimbra service status, and 9) Viewing the Zimbra LDAP password. The overall goal is to set up an LDAP server for use with the Zimbra collaboration software.

Uploaded by

Senthil Kumarc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views7 pages

Ldap

The document provides instructions for installing an LDAP server on CentOS 7. It involves 9 steps: 1) Installing CentOS 7, 2) Configuring timezone, hostname and hosts file, 3) Installing and configuring Chrony for NTP, 4) Installing and configuring Dnsmasq for DNS, 5) Configuring the firewalld, 6) Installing prerequisite packages for Zimbra, 7) Installing the Zimbra LDAP server software, 8) Checking the Zimbra service status, and 9) Viewing the Zimbra LDAP password. The overall goal is to set up an LDAP server for use with the Zimbra collaboration software.

Uploaded by

Senthil Kumarc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Installation LDAP Server Part 1

Step 1: Install CentOS 7 minimum

Step one is to install CentOS 7 minimum on LDAP server.

Step 2: Set timezone - hostname - hosts

timedatectl set-timezone Asia/Ho_Chi_Minh

hostnamectl set-hostname ldap01.dinhdu.cf

echo 192.168.30.201 ldap01.dinhdu.cf ldap01 >> /etc/hosts

echo 192.168.30.202 mta01.dinhdu.cf mta01 >> /etc/hosts

echo 192.168.30.203 mail01.dinhdu.cf mail01 >> /etc/hosts

Verify new settings

date

ls -l /etc/localtime
hostname
cat /etc/hosts

Step 3: Install Chrony

yum -y install epel-release

yum -y install deltarpm bind-utils net-tools


yum -y install chrony

systemctl enable chronyd

echo "SELINUX=disabled" > /etc/selinux/config

cp -p /etc/chrony.conf /etc/chrony.conf.bk

sed -i "/server 0.centos.pool.ntp.org/,/iburst/


s/0.centos.pool.ntp.org/0.asia.pool.ntp.org/" /etc/chrony.conf

sed -i "/server 1.centos.pool.ntp.org/,/iburst/


s/1.centos.pool.ntp.org/1.asia.pool.ntp.org/" /etc/chrony.conf

sed -i "/server 2.centos.pool.ntp.org/,/iburst/


s/2.centos.pool.ntp.org/2.asia.pool.ntp.org/" /etc/chrony.conf

sed -i "/server 3.centos.pool.ntp.org/,/iburst/


s/3.centos.pool.ntp.org/3.asia.pool.ntp.org/" /etc/chrony.conf

echo "allow 192.168.30.0/24" >> /etc/chrony.conf

systemctl restart chronyd

Verify new settings

chronyc tracking
chronyc sources

Step 4: Install Dnsmasq

yum -y install dnsmasq

groupadd -r dnsmasq
useradd -r -g dnsmasq dnsmasq

systemctl enable dnsmasq

cp /etc/dnsmasq.conf /etc/dnsmasq.conf.bk

cat /dev/null > /etc/dnsmasq.conf

echo "bogus-priv" >> /etc/dnsmasq.conf

echo "interface=eth0" >> /etc/dnsmasq.conf

echo "listen-address=127.0.0.1" >> /etc/dnsmasq.conf

echo "port=53" >> /etc/dnsmasq.conf

echo "bind-interfaces" >> /etc/dnsmasq.conf

echo "user=dnsmasq" >> /etc/dnsmasq.conf

echo "group=dnsmasq" >> /etc/dnsmasq.conf

echo "no-dhcp-interface=eth0" >> /etc/dnsmasq.conf

echo "pid-file=/var/run/dnsmasq.pid" >> /etc/dnsmasq.conf

echo "log-facility=/var/log/dnsmasq.log" >> /etc/dnsmasq.conf

echo "log-queries" >> /etc/dnsmasq.conf

echo "domain-needed" >> /etc/dnsmasq.conf

echo "no-hosts" >> /etc/dnsmasq.conf

echo "dns-forward-max=150" >> /etc/dnsmasq.conf


echo "cache-size=1000" >> /etc/dnsmasq.conf

echo "neg-ttl=3600" >> /etc/dnsmasq.conf

echo "resolv-file=/etc/resolv.dnsmasq" >> /etc/dnsmasq.conf

echo "no-poll" >> /etc/dnsmasq.conf

echo "domain=dinhdu.cf" >> /etc/dnsmasq.conf

echo "server=/dinhdu.cf/192.168.30.202" >> /etc/dnsmasq.conf

echo "address=/dinhdu.cf/192.168.30.202" >> /etc/dnsmasq.conf

echo "address=/ldap01.dinhdu.cf/192.168.30.201" >> /etc/dnsmasq.conf

echo "address=/mta01.dinhdu.cf/192.168.30.202" >> /etc/dnsmasq.conf

echo "address=/mail01.dinhdu.cf/192.168.30.203" >> /etc/dnsmasq.conf

echo "address=/mail.dinhdu.cf/192.168.30.202" >> /etc/dnsmasq.conf

echo "mx-host=dinhdu.cf,mail.dinhdu.cf,10" >> /etc/dnsmasq.conf

echo 'txt-record=dinhdu.cf,"v=spf1 mx ~all"' >> /etc/dnsmasq.conf

touch /etc/resolv.dnsmasq

echo "nameserver 8.8.8.8" >> /etc/resolv.dnsmasq

echo "nameserver 9.9.9.9" >> /etc/resolv.dnsmasq

sed -i "s/DNS/#DNS/g" /etc/sysconfig/network-scripts/ifcfg-eth0

echo "DNS1=127.0.0.1" >> /etc/sysconfig/network-scripts/ifcfg-eth0


echo "DNS2=8.8.8.8" >> /etc/sysconfig/network-scripts/ifcfg-eth0

systemctl restart network

systemctl restart dnsmasq

Verify new settings

nslookup

Step 5: Configure Firewalld

firewall-cmd --remove-service=dhcpv6-client --permanent

firewall-cmd --permanent --zone=public --add-rich-rule="rule family="ipv4" source


address=192.168.30.202 accept"

firewall-cmd --permanent --zone=public --add-rich-rule="rule family="ipv4" source


address=192.168.30.203 accept"

firewall-cmd --reload

Verify new settings

firewall-cmd --list-all

Step 6: Install package necessary for Zimbra


yum -y remove postfix
yum -y install nmap-ncat sudo libidn gmp libaio libstdc++ unzip perl sysstat sqlite
yum -y update
reboot
Installation LDAP Server Part 2
Step 7: Install Zimbra LDAP Server (ldap01.dinhdu.cf)

# tar xvzf zcs-8.7.11_GA_1854.RHEL7_64.20170531151956.tgz

# cd zcs-8.7.11_GA_1854.RHEL7_64.20170531151956

# ./install.sh

INSTALL_PACKAGES="zimbra-core zimbra-ldap zimbra-snmp "

Step 8: Check service zimbra


su – zimbra
zmcontrol status

Step 9: Show Zimbra LDAP Password on ldap01 server


su - zimbra
zmlocalconfig -s zimbra_ldap_password ldap_master_url
zimbra_ldap_password = NEflj_jf

You might also like