Installare Zammad su Ubuntu 20.04

Luglio 4, 2022 By luca@studiomondello.eu

Prerequisiti

apt install apt-transport-https sudo wget curl gnupg

Elastic Search

echo "deb [signed-by=/etc/apt/trusted.gpg.d/elasticsearch.gpg] https://artifacts.elastic.co/packages/7.x/apt stable main"| tee -a /etc/apt/sources.list.d/elastic-7.x.list > /dev/null

curl -fsSL https://artifacts.elastic.co/GPG-KEY-elasticsearch | gpg --dearmor | tee /etc/apt/trusted.gpg.d/elasticsearch.gpg> /dev/null

apt update

apt install elasticsearch

/usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment

systemctl start elasticsearch

systemctl enable elasticsearch

Zammad

curl -fsSL https://dl.packager.io/srv/zammad/zammad/key | gpg --dearmor | tee /etc/apt/trusted.gpg.d/pkgr-zammad.gpg> /dev/null

echo "deb [signed-by=/etc/apt/trusted.gpg.d/pkgr-zammad.gpg] https://dl.packager.io/srv/deb/zammad/zammad/stable/ubuntu 20.04 main"| tee /etc/apt/sources.list.d/zammad.list > /dev/null

apt update

apt install zammad

chcon -Rv --type=httpd_sys_content_t /opt/zammad/public/

zammad run rails r "Setting.set('es_url', 'http://localhost:9200')"

zammad run rake zammad:searchindex:rebuild

Configurazione Firewall

ufw allow 80

ufw allow 443

ufw reload

Configurazione nginx

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

cambiare server_name server.dominio.it;

/etc/init.d/nginx reload