Debian 9 64 Bits – Installation Zammad

Auteur : Vince Nadus
Date de publication : 12 juin 2019
zammad debian

Pré-requis

locale apt-get install apt-transport-https locales sudo wget locale-gen en_US.UTF-8 echo "LANG=en_US.UTF-8" > /etc/default/locale

Installation Elasticsearch

apt-get install apt-transport-https sudo wget echo "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | tee -a /etc/apt/sources.list.d/elastic-5.x.list wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add - apt-get update apt-get install openjdk-8-jre elasticsearch sudo /usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment systemctl restart elasticsearch systemctl enable elasticsearch

Installation Zammad

wget -O /etc/apt/sources.list.d/zammad.list https://dl.packager.io/srv/zammad/zammad/stable/installer/debian/9.repo

apt-get update apt-get install zammad

Configuration Zammad avec Elasticsearch

zammad run rake searchindex:rebuild

zammad run rake searchindex:rebuild

nano /etc/nginx/sites-enabled/zammad.conf

server { listen 80;

# replace 'localhost' with your fqdn if you want to use zammad from remote
server_name localhost;

Gestion du service

systemctl status zammad systemctl stop zammad systemctl start zammad systemctl restart zammad

Changer l’adresse d’écoute du service :

https://docs.zammad.org/en/latest/appendix/configure-env-vars.html

zammad config:set ZAMMAD_BIND_IP=0.0.0.0 systemctl restart zammad

Mettre en place le reverse Proxy Nginx distant

server { listen 443 ssl; server_name support.domain.com; # security - prevent information disclosure about server version server_tokens off;

access_log /var/log/nginx/support.domain.com/access.log;
error_log  /var/log/nginx/support.domain.com/error.log;

client_max_body_size 50M;

location ~ ^/(assets/|robots.txt|humans.txt|favicon.ico) {
    expires max;
}

location /ws {
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header CLIENT_IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_read_timeout 86400;
    proxy_pass http://10.10.10.30:6042;
}

location / {
    proxy_set_header Host $http_host;
    proxy_set_header CLIENT_IP $remote_addr;
   proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_read_timeout 300;
    proxy_pass http://10.10.10.30:3000;

}
ssl_certificate /etc/letsencrypt/live/support.domain.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/support.domain.com/privkey.pem; # managed by Certbot

}