{"id":2945,"date":"2018-02-28T18:13:35","date_gmt":"2018-02-28T15:13:35","guid":{"rendered":"https:\/\/www.howtoforge.com\/tutorial\/how-to-install-zammad-ticketing-system-on-centos-7\/"},"modified":"2018-02-28T18:13:35","modified_gmt":"2018-02-28T15:13:35","slug":"how-to-install-zammad-ticketing-system-on-centos-7","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/how-to-install-zammad-ticketing-system-on-centos-7\/","title":{"rendered":"How to Install Zammad Ticketing System on CentOS 7"},"content":{"rendered":"<p>Zammad is an open source helpdesk\/customer support system written in Ruby. It&#8217;s a web-based ticketing system with many features, including support to manage customer communication over several channels like Facebook, telegram, chat, and emails. Zammad is distributed under the GNU AFFERO General public License (AGPL) and can be installed on different platforms like Linux, AIX, FreeBSD, OpenBSD, and MacOSX. It&#8217;s available on Github and is free for install on your own server.<\/p>\n<p>In this tutorial, I will show you how to install and configure Zammad Ticketing System using the Nginx web server and PostgreSQL for the database system. We will be using CentOS 7 server, and using SSL Letsencrypt to secure client-server connections.<\/p>\n<h2 id=\"what-we-will-do\">What we will do<\/h2>\n<ol>\n<li>Install Zammad Ticketing System<\/li>\n<li>Install and Configure Letsencrypt<\/li>\n<li>Configure Nginx Web server<\/li>\n<li>Zammad Configuration<\/li>\n<li>Zammad Additional Tips<\/li>\n<\/ol>\n<h2 id=\"prerequisites\">Prerequisites<\/h2>\n<ul>\n<li>CentOS 7 System<\/li>\n<li>At least 2GB RAM<\/li>\n<li>Root Privileges<\/li>\n<\/ul>\n<h2 id=\"step-install-zammad-ticketing-system\">Step 1 &#8211; Install Zammad Ticketing System<\/h2>\n<p>Before installing Zammad ticketing system on CentOS 7, we need to install EPEL (Extra Packages for Enterprise Linux) repository for our Nginx web server installation.<\/p>\n<p>Add EPEL repository by installing the epel package using the following yum command.<\/p>\n<p class=\"command\">sudo yum -y install epel-release<\/p>\n<p>EPEL repository has been added to the system.<\/p>\n<p>Next, import the Zammad key with the rpm import command.<\/p>\n<p class=\"command\">sudo rpm &#8211;import https:\/\/rpm.packager.io\/key<\/p>\n<p>Add the Zammad repository by creating a new .repo file in the &#8216;yum.repos.d&#8217; directory using the <a href=\"https:\/\/www.howtoforge.com\/vim-basics\" target=\"_blank\" rel=\"noopener noreferrer\">vim editor<\/a>.<\/p>\n<p class=\"command\">vim \/etc\/yum.repos.d\/zammad.repo<\/p>\n<p>Paste the following info there.<\/p>\n<pre class=\"system\">[zammad]<br\/>name=Repository for zammad\/zammad application.<br\/>baseurl=https:\/\/rpm.packager.io\/gh\/zammad\/zammad\/centos7\/stable<br\/>enabled=1<\/pre>\n<p>That&#8217;s it. Save and exit.<\/p>\n<p>Now install Zammad using the following yum command.<\/p>\n<p class=\"command\">sudo yum -y install zammad<\/p>\n<p><strong>Note: <\/strong>When we are installing Zammad, it will automatically install other required packages, including Nginx web server and PostgreSQL database.<\/p>\n<p>And after the installation is complete, you will see the result similar to the one shown below.<\/p>\n<p><a class=\"fancybox\" id=\"img-1\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_zammad_ticketing_system_on_centos_7\/big\/1.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/02\/how-to-install-zammad-ticketing-system-on-centos-7.png\" alt=\"Install zammad ticketing system\" width=\"500\" height=\"134\" title=\"\"><\/a><\/p>\n<p>Zammad and other packages &#8211; Nginx web server and PostgreSQL database &#8211; have been installed.<\/p>\n<h2 id=\"step-install-and-configure-letsencrypt-ssl\">Step 2 &#8211; Install and Configure Letsencrypt SSL<\/h2>\n<p>In this tutorial, we want to set up Zammad under Nginx HTTPS and using free SSL from the Letsencrypt. And we will do that in this step and use the certbot tool (Letsencrypt Agent) that can be installed from the repository.<\/p>\n<p>Install certbot package tool from the repository using yum.<\/p>\n<p class=\"command\">yum -y install certbot<\/p>\n<p>Next, we need to generate new SSL certificates with the certbot tool. Make sure you have your own domain to generate the certificate files. We will use a domain name &#8216;zammad.hakase-labs.com&#8217;.<\/p>\n<p>Go to the Nginx configuration directory and open the nginx.conf file in the vim editor.<\/p>\n<p class=\"command\">cd \/etc\/nginx\/<br \/>vim nginx.conf<\/p>\n<p>Paste the following configuration under the &#8216;<strong>server {}<\/strong>&#8216; block.<\/p>\n<pre class=\"system\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 location ~ \/.well-known {<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 allow all;<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }<\/pre>\n<p>Save and exit. Then test the configuration and restart the web server.<\/p>\n<p class=\"command\">nginx -t<br \/>systemctl restart nginx<\/p>\n<p><a class=\"fancybox\" id=\"img-2\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_zammad_ticketing_system_on_centos_7\/big\/2.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/02\/how-to-install-zammad-ticketing-system-on-centos-7-1.png\" alt=\"Configure Nginx\" width=\"500\" height=\"142\" title=\"\"><\/a><\/p>\n<p>Before generating SSL certificate files, make sure your system port for HTTP and HTTPS is not blocked by the firewall. You can open the HTTP and HTTPS ports on CentOS using the firewall-cmd command as shown below.<\/p>\n<p class=\"command\">firewall-cmd &#8211;permanent &#8211;add-service=https<br \/>firewall-cmd &#8211;reload<\/p>\n<p>Now generate SSL certificate files using the following certbot command.<\/p>\n<p class=\"command\">certbot certonly &#8211;standalone -d zammad.hakase-labs.co<\/p>\n<p>You will be asked about your email address for renewing notification &#8211; type your email address and press &#8216;<strong>Enter<\/strong>&#8216; to continue. For Letsencrypt Term Of Services (TOS), type &#8216;<strong>A<\/strong>&#8216; to agree. Similarly, when asked to share email with EFF Foundation, just type &#8216;<strong>N<\/strong>&#8216; for no.<\/p>\n<p><a class=\"fancybox\" id=\"img-31\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_zammad_ticketing_system_on_centos_7\/big\/31.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/02\/how-to-install-zammad-ticketing-system-on-centos-7-2.png\" alt=\"Create the SSL certificate\" width=\"500\" height=\"322\" title=\"\"><\/a><\/p>\n<p>When the certbot command is complete, you will see the result as shown below.<\/p>\n<p><a class=\"fancybox\" id=\"img-4\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_zammad_ticketing_system_on_centos_7\/big\/4.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/02\/how-to-install-zammad-ticketing-system-on-centos-7-3.png\" alt=\"Certbot command finished successfully\" width=\"500\" height=\"282\" title=\"\"><\/a><\/p>\n<p>New SSL certificate files for our Zammad installation has been generated. All certificates are in the &#8216;<strong>\/etc\/letsencryp\/live\/<\/strong>&#8216; directory.<\/p>\n<h2 id=\"step-configure-nginx-web-server\">Step 3 &#8211; Configure Nginx Web server<\/h2>\n<p>In this step, we will configure a virtual host file for Zammad. It&#8217;s automatically created in the &#8216;\/etc\/nginx\/conf.d\/&#8217; directory during zammad installation.<\/p>\n<p>Go to the &#8216;<strong>\/etc\/nginx\/conf.d<\/strong>\/&#8217; and edit the <strong>zammad.conf<\/strong> file.<\/p>\n<p class=\"command\">cd \/etc\/nginx\/conf.d\/<br \/>vim zammad.conf<\/p>\n<p>Change all configuration as shown below.<\/p>\n<pre class=\"system\" readability=\"43\">#<br\/># this is the Nginx config for zammad<br\/>#<p>upstream zammad {<br\/>\u00a0\u00a0\u00a0 server localhost:3000;<br\/>}<\/p><p>upstream zammad-websocket {<br\/>\u00a0\u00a0\u00a0 server localhost:6042;<br\/>}<\/p><p>server {<br\/>\u00a0\u00a0\u00a0 listen 80;<br\/>\u00a0\u00a0\u00a0 server_name zammad.hakase-labs.co;<br\/>\u00a0\u00a0\u00a0 return 301 https:\/\/$host$request_uri;<br\/>}<\/p><p>server {<br\/>\u00a0\u00a0\u00a0 listen 443 http2 ssl;<\/p><p>\u00a0\u00a0\u00a0 ssl_certificate \/etc\/letsencrypt\/live\/zammad.hakase-labs.co\/fullchain.pem;<br\/>\u00a0\u00a0\u00a0 ssl_certificate_key \/etc\/letsencrypt\/live\/zammad.hakase-labs.co\/privkey.pem;<br\/>\u00a0\u00a0\u00a0 ssl_protocols TLSv1 TLSv1.1 TLSv1.2;<br\/>\u00a0\u00a0\u00a0 ssl_prefer_server_ciphers on;<br\/>\u00a0\u00a0\u00a0 ssl_ciphers \"EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH\";<br\/>\u00a0\u00a0\u00a0 ssl_ecdh_curve secp384r1;<br\/>\u00a0\u00a0\u00a0 ssl_session_cache shared:SSL:10m;<br\/>\u00a0\u00a0\u00a0 ssl_session_tickets off;<br\/>\u00a0\u00a0\u00a0 ssl_stapling on;<br\/>\u00a0\u00a0\u00a0 ssl_stapling_verify on;<br\/>\u00a0\u00a0\u00a0 resolver 8.8.8.8 8.8.4.4 valid=300s;<br\/>\u00a0\u00a0\u00a0 resolver_timeout 5s;<br\/>\u00a0\u00a0\u00a0 add_header Strict-Transport-Security \"max-age=63072000; includeSubdomains\";<br\/>\u00a0\u00a0\u00a0 add_header X-Frame-Options DENY;<br\/>\u00a0\u00a0\u00a0 add_header X-Content-Type-Options nosniff;<\/p><p>\u00a0\u00a0\u00a0 # replace 'localhost' with your fqdn if you want to use zammad from remote<br\/>\u00a0\u00a0\u00a0 server_name zammad.irsyadf.me;<\/p><p>\u00a0\u00a0\u00a0 root \/opt\/zammad\/public;<\/p><p>\u00a0\u00a0\u00a0 access_log \/var\/log\/nginx\/zammad.access.log;<br\/>\u00a0\u00a0\u00a0 error_log\u00a0 \/var\/log\/nginx\/zammad.error.log;<\/p><p>\u00a0\u00a0\u00a0 client_max_body_size 50M;<\/p><p>\u00a0\u00a0\u00a0 location ~ ^\/(assets\/|robots.txt|humans.txt|favicon.ico) {<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 expires max;<br\/>\u00a0\u00a0\u00a0 }<\/p><p>\u00a0\u00a0\u00a0 location \/ws {<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_http_version 1.1;<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_set_header Upgrade $http_upgrade;<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_set_header Connection \"Upgrade\";<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_set_header CLIENT_IP $remote_addr;<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_read_timeout 86400;<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_pass http:\/\/zammad-websocket;<br\/>\u00a0\u00a0\u00a0 }<\/p><p>\u00a0\u00a0\u00a0 location \/ {<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_set_header Host $http_host;<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_set_header CLIENT_IP $remote_addr;<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_read_timeout 180;<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 proxy_pass http:\/\/zammad;<\/p><p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 gzip on;<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 gzip_types text\/plain text\/xml text\/css image\/svg+xml application\/javascript application\/x-javascript application\/json application\/xml;<br\/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 gzip_proxied any;<br\/>\u00a0\u00a0\u00a0 }<br\/>}<\/p><\/pre>\n<p>Save and exit.<\/p>\n<p>Next, test Nginx configuration and make sure there is no error. Then restart the web server.<\/p>\n<p class=\"command\">nginx -t<br \/>systemctl restart nginx<\/p>\n<p>The zammad virtual host file is now using SSL. Check with the netstat command and make sure you have port <strong>443<\/strong> for HTTPS with the state &#8216;<strong>LISTEN<\/strong>&#8216;.<\/p>\n<p class=\"command\">netstat -plntu<\/p>\n<p><a class=\"fancybox\" id=\"img-5\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_zammad_ticketing_system_on_centos_7\/big\/5.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/02\/how-to-install-zammad-ticketing-system-on-centos-7-4.png\" alt=\"Configure Nginx web server\" width=\"500\" height=\"304\" title=\"\"><\/a><\/p>\n<h2 id=\"step-zammad-configuration\">Step 4 &#8211; Zammad Configuration<\/h2>\n<p>Zammad has been installed on CentOS 7 with Nginx as a web server and PostgreSQL as a database server, and it&#8217;s running under HTTPS connection. In this step, we will do basic configuration of Zammad Ticketing System.<\/p>\n<p>Open your web browser and type zammad address &#8216;zammad.hakase-labs.co&#8217;. You will be redirected to the HTTPS connection. Click the &#8216;<strong>Setup new system<\/strong>&#8216; button to continue.<\/p>\n<p><a class=\"fancybox\" id=\"img-6\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_zammad_ticketing_system_on_centos_7\/big\/6.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/02\/how-to-install-zammad-ticketing-system-on-centos-7-5.png\" alt=\"Start zammad setup\" width=\"500\" height=\"240\" title=\"\"><\/a><\/p>\n<p>Now fill all the admin configuration. Username, email address, and password, and then click &#8216;<strong>Create<\/strong>&#8216;.<\/p>\n<p><a class=\"fancybox\" id=\"img-7\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_zammad_ticketing_system_on_centos_7\/big\/7.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/02\/how-to-install-zammad-ticketing-system-on-centos-7-6.png\" alt=\"Set username and password\" width=\"500\" height=\"261\" title=\"\"><\/a><\/p>\n<p>For organization name, type your company name and click &#8216;<strong>Next<\/strong>&#8216;.<\/p>\n<p><a class=\"fancybox\" id=\"img-8\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_zammad_ticketing_system_on_centos_7\/big\/8.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/02\/how-to-install-zammad-ticketing-system-on-centos-7-7.png\" alt=\"Set organization\" width=\"500\" height=\"279\" title=\"\"><\/a><\/p>\n<p>For email notification, click &#8216;<strong>Continue<\/strong>&#8216;.<\/p>\n<p>We can do the Email Notification configuration from the settings page.<\/p>\n<p><a class=\"fancybox\" id=\"img-9\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_zammad_ticketing_system_on_centos_7\/big\/9.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/02\/how-to-install-zammad-ticketing-system-on-centos-7-8.png\" alt=\"Email notifications\" width=\"500\" height=\"248\" title=\"\"><\/a><\/p>\n<p>For channel configuration, click &#8216;<strong>Skip<\/strong>&#8216;.<\/p>\n<p><a class=\"fancybox\" id=\"img-10\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_zammad_ticketing_system_on_centos_7\/big\/10.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/02\/how-to-install-zammad-ticketing-system-on-centos-7-9.png\" alt=\"Channel configuration\" width=\"500\" height=\"253\" title=\"\"><\/a><\/p>\n<p>And now you see the Zammad admin dashboard with beautiful UI.<\/p>\n<p><a class=\"fancybox\" id=\"img-11\" href=\"https:\/\/www.howtoforge.com\/images\/how_to_setup_zammad_ticketing_system_on_centos_7\/big\/11.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/afaghhosting.net\/blog\/wp-content\/uploads\/2018\/02\/how-to-install-zammad-ticketing-system-on-centos-7-10.png\" alt=\"Zammad UI\" width=\"500\" height=\"289\" title=\"\"><\/a><\/p>\n<p>Zammad has been installed with HTTPS enabled, and the configuration has been completed.<\/p>\n<h2 id=\"step-nbspenable-zammad-services\">Step 5 &#8211;\u00a0Enable Zammad Services<\/h2>\n<p>Zammad comes with three components &#8211; a web application server, Zammad worker process, and websocket server. We can manage all the services with the systemcl command below.<\/p>\n<p class=\"command\">systemctl start zammad<br \/>systemctl status zammad<br \/>systemctl restart zammad<\/p>\n<p>If you want to configure the services one by one, you can use specific components as shown below.<\/p>\n<p class=\"command\">systemctl status zammad-web<br \/>systemctl status zammad-worker<br \/>systemctl status zammad-websocket<\/p>\n<p>Zammad Ticketing System installation on CentOS 7 has been completed.<\/p>\n<h2 id=\"reference\">Reference<\/h2>\n<div>\n<p><b>Share this page:<\/b><\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Zammad is an open source helpdesk\/customer support system written in Ruby. It&#8217;s a web-based ticketing system with many features, including support to manage customer communication over several channels like Facebook, telegram, chat, and emails. Zammad is distributed under the GNU AFFERO General public License (AGPL) and can be installed on different platforms like Linux, AIX, &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[],"class_list":["post-2945","post","type-post","status-publish","format-standard","hentry","category-36"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/2945","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=2945"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/2945\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=2945"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=2945"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=2945"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}