Zextras Carbonio CE Multi Server : Instalasi LDAP Server

Posted by

Sesuai dengan skenario instalasi Zextras Carbonio CE Multi Server pada artikel sebelumnya, pada artikel ini akan dijelaskan tahapan instalasi Zextras Carbonio CE LDAP Server.

# Persiapan Awal

## Konfigurasi /etc/hosts

Isi file /etc/hosts seperti berikut

127.0.0.1     localhost
192.168.56.101  ldap1.imanudin.web.id  ldap1

## Konfigurasi hostname

Jalankan Perintah berikut

hostnamectl set-hostname ldap1.imanudin.web.id

## Instalasi dan konfigurasi DNS Lokal

Install paket dnsmasq

apt install dnsmasq

Tambahkan baris berikut pada file /etc/dnsmasq.conf

server=8.8.8.8
mx-host=imanudin.web.id,mtaproxy1.imanudin.web.id,10
host-record=ldap1.imanudin.web.id,192.168.56.101
host-record=mbox1.imanudin.web.id,192.168.56.102
host-record=mtaproxy1.imanudin.web.id,192.168.56.103
host-record=files.imanudin.web.id,192.168.56.104
host-record=chats.imanudin.web.id,192.168.56.105

Stop service systemd-resolved

systemctl disable --now systemd-resolved
systemctl stop systemd-resolved

Restart dnsmasq

systemctl enable --now dnsmasq
systemctl restart dnsmasq

Konfigurasi /etc/resolv.conf

vi /etc/resolv.conf

Isi dengan baris berikut

nameserver 127.0.0.1
nameserver 8.8.8.8
nameserver 1.1.1.1
search imanudin.web.id

Testing DNS

host -t MX imanudin.web.id

Hasilnya lebih kurang akan seperti ini

root@ldap1:~# host -t MX imanudin.web.id
imanudin.web.id mail is handled by 10 mtaproxy1.imanudin.web.id.

# Konfigurasi Zextras Carbonio CE Repository

Silakan akses link https://zextras.com/carbonio-community-edition/ dan isi form yang ada untuk mendapatkan intruksi mengenai konfigurasi Zextras repository via email.

# Instalasi Postgresql

apt install postgresql-12

## Setup Role dan Database pada Postgresql

Jalankan perintah berikut

su - postgres -c "psql --command=\"CREATE ROLE carbonio_adm WITH LOGIN SUPERUSER encrypted password 'DB_ADM_PWD';\""
su - postgres -c "psql --command=\"CREATE DATABASE carbonio_adm owner carbonio_adm;\""

Catatan: ganti DB_ADM_PWD dengan password yang lebih kuat

## Berikan akses node lain terhadap Postgresql

Jalankan perintah berikut

su - postgres -c "psql --command=\"ALTER SYSTEM SET listen_addresses TO '*';\""
su - postgres -c "psql --command=\"ALTER SYSTEM SET max_connections = 500;\""
su - postgres -c "psql --command=\"ALTER SYSTEM SET shared_buffers = 5000;\""
su - postgres -c "psql --command=\"ALTER SYSTEM SET port TO '5433';\""
echo "host    all             all             0.0.0.0/0            md5" >> /etc/postgresql/12/main/pg_hba.conf

Restart service postgresql

systemctl restart postgresql

## Setup PGPool

apt install pgpool2

Jalanakan perintah berikut untuk membuat pgpool.conf

echo "backend_clustering_mode = 'raw'
port = 5432
backend_hostname0 = 'localhost'
backend_port0 = 5433
backend_flag0 = 'DISALLOW_TO_FAILOVER'
num_init_children = 32
max_pool=8
reserved_connections=1" > /etc/pgpool2/pgpool.conf

Restart service pgpool

systemctl enable --now pgpool2
systemctl restart pgpool2.service

# Instalasi dan Konfigurasi Zextras Carbonio CE LDAP Server

## Instalasi paket

apt install service-discover-server \
  carbonio-directory-server carbonio-files-db \
  carbonio-mailbox-db carbonio-docs-connector-db \
  carbonio-tasks-db carbonio-message-dispatcher-db carbonio-ws-collaboration-db

## Cek service Carbonio CE

systemctl status carbonio-*

Pastikan semua servicenya running. Jika ada service yang tidak running, bisa restart kembali service tersebut

## Bootstrap Carbonio CE

carbonio-bootstrap

Cukup ketik y kemudian tekan enter. Berikut contoh tampilannya

root@ubuntu:/srv# carbonio-bootstrap
----------------------------------
| Starting Carbonio Bootstrap... |
----------------------------------
--------------------------------------------------------------------------------
The system is going to start configuring all the packages.

If you are installing Carbonio CE please refer to every single package license 
and to the Github repo for more informations on open source licenses: 
https://github.com/Zextras

If you are also installing Carbonio please refer to every single package 
license, to the Github repo for more informations on open source licenses: 
https://github.com/Zextras and to the Zextras EULA for the proprietary 
software: https://zextras.com/licenses
--------------------------------------------------------------------------------

Operations logged to /tmp/zmsetup.20240123-120329.log

Bootstrap mode: new install
Installing LDAP configuration database...done.
Setting defaults...

Querying DNS for "A" record of current hostname ldap1.imanudin.web.id...

Querying DNS for "MX" record of imanudin.web.id...done.
Checking for port conflicts

Main menu

   1) Common Configuration:                                                  
   2) carbonio-directory-server:               Enabled                       
   s) Save config to file                                                    
   x) Expand menu                                                            
   q) Quit                                    

*** CONFIGURATION COMPLETE - press 'y' to apply configuration
Select from menu, or press 'y' to apply config (? - help) y
Saving config in /opt/zextras/config.74037...done.
Operations logged to /tmp/zmsetup.20240123-120329.log
Setting local config values...done.
Setting up CA...done.
--- SKIP ---
Skipping creation of default domain GAL sync account - not a service node.
Setting up zextras crontab...done.
Moving /tmp/zmsetup.20240123-120329.log to /opt/zextras/log

Configuration complete - press return to exit 

## Set up Carbonio Mesh

service-discover setup-wizard

Masukkan IP yang digunakan beserta netmasknya. Masukkan password untuk mesh secret. Berikut adalah contoh tampilannya

Setup of first service-discover server instance
ens160 192.168.56.101/24, fe80::20c:29ff:fee9:cd29/64
Specify the binding address for service discovery: 192.168.56.101/24
Create the cluster credentials password (will be used for setups): 
Type the credential password again: 

Untuk melengkapi setup carbonio mesh, jalankan perintah berikut

pending-setups -a

Masukkan password mesh secret yang sudah disetup sebelumnya. Password mesh secret disimpan pada file /var/lib/service-discover/password. Jika lupa password mesh secret, silakan lihat isi dari file tersebut

Berikut sample outputnya

root@ubuntu:/srv# pending-setups -a
Insert the cluster credential password: 

Executing all setup scripts...

--------------------------------------------------------------------------------
Executing /etc/zextras/pending-setups.d/set-carbonio-prometheus-openldap-exporter.sh
Setup successful, moving set-carbonio-prometheus-openldap-exporter.sh to /etc/zextras/pending-setups.d/done/
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Executing /etc/zextras/pending-setups.d/carbonio-message-dispatcher-db-setup.sh
Insert the cluster credential password: 

Jalankan kembali perintah di atas untuk memastikan tidak ada service mesh yang masih pending

## Bootstrap Initial Carbonio Database

Jalankan perintah berikut untuk membuat initial database fitur files, tasks, chat, dan video

PGPASSWORD=DB_ADM_PWD carbonio-files-db-bootstrap carbonio_adm 127.0.0.1
PGPASSWORD=DB_ADM_PWD carbonio-tasks-db-bootstrap carbonio_adm 127.0.0.1
PGPASSWORD=DB_ADM_PWD carbonio-ws-collaboration-db-bootstrap carbonio_adm 127.0.0.1
PGPASSWORD=DB_ADM_PWD carbonio-message-dispatcher-db-bootstrap carbonio_adm 127.0.0.1

Berikut adalah contoh outputnya

root@ldap1:~# PGPASSWORD=DB_ADM_PWD carbonio-files-db-bootstrap carbonio_adm 127.0.0.1
Database: 127.0.0.1:5432 user carbonio_adm
Check postgres connection: OK
CREATE ROLE
CREATE DATABASE
====================================================
carbonio-files-db database initialized successfully!
====================================================

## Restart service Zextras

su - zextras
zmcontrol stop
zmcontrol start

Pastikan servicenya dalam keadaan running setelah direstart

zextras@ldap1:~$ zmcontrol status
Host ldap1.imanudin.web.id
	directory-server        Running
	service-discover        Running
	stats                   Running
	config service          Running

## Dapatkan password LDAP service

Jalankan perintah berikut untuk mendapatkan password dari LDAP service

zmlocalconfig -s | grep -i ldap | grep -i password
zextras@ldap1:~$ zmlocalconfig -s | grep -i ldap | grep -i password
ldap_amavis_password = SmotPq14w
ldap_nginx_password = SmotPq14w
ldap_postfix_password = SmotPq14w
ldap_replication_password = SmotPq14w
ldap_root_password = SmotPq14w
zimbra_ldap_password = SmotPq14w

Catat password LDAP service di atas. Password tersebut akan digunakan pada saat instalasi node lain seperti mailbox server dan mta+proxy server.

Jika membutuhkan informasi terkait solusi Zextras (Instalasi dan Implementasi), dapat menghubungi Team Aktiva melalui form: https://www.aktiva.co.id/kontak/ atau email ke sales@aktiva.co.id

Silakan dicoba dan semoga bermanfaat 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.