Learn How To Install Zammad 2.0 on CentOS 7
Table of Contents
- Step 1: Setup the FQDN (fully qualified domain name)
- Step 2: Install OpenJDK 1.8 packages
- Step 3: Install Elasticsearch 5 and the mapper-attachments plugin
- Step 4: Install Zammad 2.0
- Step 5: Setup SELinux and firewall rules
- Step 6: Setup the new Zammad system from the Web interface
If you are using a different system, please check our other tutorials.
Zammad is an open source helpdesk/ticketing system designed for customer support teams. With Zammad, customer service representatives can easily deal with customer queries and complaints from various channels, including web, form, email, chat, Twitter, Facebook, and so on.
- A fresh IT Web Services CentOS 7 x64 server instance with at least 4GB of memory. Say its IP address is
203.0.113.1, and its hostname is
- A sudo user.
https://www.itweb.services/tutorials/linux-guides/introduction-to-itweb.services-dns”>IT Web Services tutorial.
https://www.itweb.services/tutorials/linux-guides/how-to-update-centos-7-ubuntu-16-04-and-debian-8″>updated to the latest stable status.
https://www.itweb.services/tutorials/linux-guides/setup-swap-file-on-linux”>swap file in order to optimize performance.
Step 1: Setup the FQDN (fully qualified domain name)
As required by Zammad, you need to properly setup the FQDN on your server instance before you can remotely access the Zammad site.
vi text editor to open the
sudo vi /etc/hosts
Insert the following line before any existing lines.
203.0.113.1 helpdesk.example.com helpdesk
Save and quit.
hostname -f command to confirm the result, which will look like this.
Step 2: Install OpenJDK 1.8 packages
As required by Zammad, you need to install Java on your server instance before you can install and run Zammad.
Install the latest stable release of OpenJDK 1.8.
sudo yum install -y java-1.8.0-openjdk-devel
Having OpenJDK 1.8 installed, you can verify the result.
The output will look like this.
openjdk version "1.8.0_144" OpenJDK Runtime Environment (build 1.8.0_144-b01) OpenJDK 64-Bit Server VM (build 25.144-b01, mixed mode)
Finally, setup the
JAVA_HOME environment variable.
echo "JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::")" | sudo tee -a /etc/profile source /etc/profile
Step 3: Install Elasticsearch 5 and the mapper-attachments plugin
Zammad uses Elasticsearch to provide its search function. On CentOS 7, you can install the latest stable release of Elasticsearch 5 using the official Elasticsearch YUM repo as below.
First, install the Elasticsearch 5 public signing key.
sudo rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
Then, setup the Elasticsearch YUM repo.
cat <<EOF | sudo tee -a /etc/yum.repos.d/elasticsearch.repo [elasticsearch-5.x] name=Elasticsearch repository for 5.x packages baseurl=https://artifacts.elastic.co/packages/5.x/yum gpgcheck=1 gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch enabled=1 autorefresh=1 type=rpm-md EOF
Next, install Elasticsearch using
sudo yum install -y elasticsearch
Finally, start the Elasticsearch service and make it automatically start on boot time.
sudo systemctl start elasticsearch.service sudo systemctl enable elasticsearch.service
In addition, in order to allow Elasticsearch to index file attachments, you need to install the Elasticsearch
sudo /usr/share/elasticsearch/bin/elasticsearch-plugin install mapper-attachments
When asked to approve additional permissions, type “
Y” and then press “
Enter” to finish the installation.
Restart the Elasticsearch service to load the new plugin.
sudo systemctl restart elasticsearch
Step 4: Install Zammad 2.0
In order to facilitate the installation process, you can use the official Zammad YUM repo to install Zammad along with various dependencies, including Nginx, PostgreSQL and more, at the same time.
Download the official Zammad YUM repo.
sudo wget -O /etc/yum.repos.d/zammad.repo https://dl.packager.io/srv/zammad/zammad/stable/installer/el/7.repo
Install Zammad and all of the required dependencies.
sudo yum install -y zammad
Having Zammad successfully installed, the Zammad service will automatically get started. You can use the following command to confirm the Zammad service’s status.
sudo systemctl status zammad.service
Zammad’s status will be
Next, use the following commands to make Zammad work with Elasticsearch and rebuild the index.
sudo zammad run rails r "Setting.set('es_url', 'http://localhost:9200')" sudo zammad run rake searchindex:rebuild
Add extra Elasticsearch index name space (optional).
sudo zammad run rails r "Setting.set('es_index', Socket.gethostname + '_zammad')"
Ignore common binary file types (optional).
sudo zammad run rails r "Setting.set('es_attachment_ignore', [ '.png', '.jpg', '.jpeg', '.mpeg', '.mpg', '.mov', '.bin', '.exe', '.box', '.mbox' ] )"
Set the max attachment size (optional).
sudo zammad run rails r "Setting.set('es_attachment_max_size_in_mb', 50)"
In order to allow users to remotely access Zammad, you need to modify the Zammad Nginx configuration file.
sudo vi /etc/nginx/conf.d/zammad.conf
Find this line.
localhost with the FQDN of your server instance.
Save and quit.
Finally, restart the Nginx service to apply your modifications.
sudo systemctl restart nginx.service
Step 5: Setup SELinux and firewall rules
Use the following commands to determine the status of SELinux on your server instance.
sudo yum install -y policycoreutils sestatus
If SELinux is enabled in the
enforcing mode on your machine, you need to modify an SELinux rule as follows.
sudo yum install -y policycoreutils policycoreutils-python selinux-policy-devel sudo setsebool httpd_can_network_connect on -P
If SELinux is disabled or enabled in the
permissive mode, ignore above modifications and move on.
You need to also modify the firewall rules as follows.
sudo firewall-cmd --zone=public --permanent --add-service=http sudo firewall-cmd --zone=public --permanent --add-service=https sudo firewall-cmd --reload
Step 6: Setup the new Zammad system from the Web interface
Point your favorite web browser to
http://helpdesk.example.com, and you will be brought into the
Zammad getting started page.
Setup new system button to move on.
Administrator Account window, input the administrator’s first name, last name, email, and password (twice), and then click the
Organization window, input the organization name and the system URL
http://helpdesk.example.com , upload your logo (if any), and then click the
Email Notification window, choose a proper email sending method, and then click the
Connect Channels window, click the
Skip button to finish the initial setup. All channels can be customized later.
That’s all for setting up an operational Zammad ticketing system. Feel free to explore the Zammad interface and invite customer service representatives. Thanks for reading.
Do you need help setting up this on your own service?
Please contact us and we’ll provide you the best possible quote!