How to Install Zammad Ticketing System on Ubuntu 22.04

Zammad is a free, open-source, and web-based support/ticketing solution used for managing customer communication. You can connect it via various channels like email, chat, telephone, Twitter, or Facebook. It is written in JavaScript and Ruby programming language. It supports REST API that helps you to link other programs easily and get real-time information on all your channels and operations. Zammad offers very useful features, including LDAP integration, time recording, Slack integration, SSO, Multilingualism, and more.

In this post, we will show you how to install the Zammad Ticketing system on Ubuntu 22.04 server.

Requirements

  • A server running Ubuntu 22.04.
  • A root password is configured on your server.

Update the System

First, you will need to update and upgrade all your system packages to the latest version. You can update all of them by running the following command.

apt update -y 
apt upgrade -y

Once all the system packages are up-to-date, you can proceed to the next step.

Install Java JDK

First, you will need to install Java OpenJDK on your server. You can install it with the following command.

apt install openjdk-17-jdk -y

Once Java is installed, you can verify the Java version using the following command.

java -version

You should see the Java version in the following output.

openjdk version "17.0.5" 2022-10-18
OpenJDK Runtime Environment (build 17.0.5+8-Ubuntu-2ubuntu122.04)
OpenJDK 64-Bit Server VM (build 17.0.5+8-Ubuntu-2ubuntu122.04, mixed mode, sharing)

Once Java is installed, you can proceed to install the ElasticSearch.

Install ElasticSearch

Zammad uses ElasticSearch to provide search functionality. So you will need to install ElasticSearch on your server. By default, the ElasticSearch package is not included in the Ubuntu default repository. So you will need to add the ElasticSearch repository to your server.

First, install the required dependencies using the following command.

apt install gnupg2 curl -y

Next, add the ElasticSearch GPG key and repository to APT with the following command.

curl -fsSL https://artifacts.elastic.co/GPG-KEY-elasticsearch | gpg --dearmor -o /usr/share/keyrings/elastic.gpg
echo "deb [signed-by=/usr/share/keyrings/elastic.gpg] https://artifacts.elastic.co/packages/7.x/apt stable main" | tee -a /etc/apt/sources.list.d/elastic-7.x.list

Next, update the repository cache with the following command.

apt update -y

Finally, install the ElasticSearch package using the following command.

apt install elasticsearch -y

Once the ElasticSearch is installed, start and enable the ElasticSearch service with the following command.

systemctl enable elasticsearch.service
systemctl start elasticsearch.service

You can now verify the ElasticSearch with the following command.

curl -X GET 'http://localhost:9200'

If everything is fine, you will get the following output.

{
  "name" : "ubuntu2204",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "V4bBWciDSSWmI-QcwvJdGA",
  "version" : {
    "number" : "7.17.8",
    "build_flavor" : "default",
    "build_type" : "deb",
    "build_hash" : "120eabe1c8a0cb2ae87cffc109a5b65d213e9df1",
    "build_date" : "2022-12-02T17:33:09.727072865Z",
    "build_snapshot" : false,
    "lucene_version" : "8.11.1",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

You will also need to install the ingest-attachment plugin. You can install it with the following command.

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

You will get the following output.

-> Installing ingest-attachment
-> Downloading ingest-attachment from elastic
[=================================================] 100%   
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@     WARNING: plugin requires additional permissions     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
* java.lang.RuntimePermission accessClassInPackage.sun.java2d.cmm.kcms
* java.lang.RuntimePermission accessDeclaredMembers
* java.lang.RuntimePermission getClassLoader
* java.lang.reflect.ReflectPermission suppressAccessChecks
* java.security.SecurityPermission createAccessControlContext
See https://docs.oracle.com/javase/8/docs/technotes/guides/security/permissions.html
for descriptions of what these permissions allow and the associated risks.

Continue with installation? [y/N]y
-> Installed ingest-attachment
-> Please restart Elasticsearch

Next, restart the ElasticSearch service to apply the changes.

systemctl restart elasticsearch

Once you are done, you can proceed to install the Apache and other dependencies.

Install Apache and Other Dependency

First, install the Apache web server package using the following command.

apt install apache2 -y

Next, you will also need to install libssl on your server. First, add the Focal security repository with the following command.

echo "deb http://security.ubuntu.com/ubuntu focal-security main" | tee /etc/apt/sources.list.d/focal-security.list

Next, update the repository and install the libssl package with the following command.

apt update -y
apt install libssl1.1

Once you are finished, you can proceed to install the Zammad in the step.

Install Zammad Ticketing System

By default, the Zammad package is not included in the Ubuntu repository. So you will need to add the Zammad repository to your server.

First, add the Zammad GPG key with the following command.

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

Next, add the Zammad repository to APT with the following command.

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

Next, update the repository cache using the following command.

apt update -y

Now, install the Zammad package with the following command.

apt install zammad -y

Once Zammad is installed, you can proceed to the next step.

Configure Apache for Zammad

Zammad creates an Apache configuration file automatically in the Apache configuration directory. However, you will need to edit the Zammad configuration file and modify it as per your requirement.

nano /etc/apache2/sites-available/zammad.conf

Change the following lines.

#ServerTokens Prod
    ServerName your-server-ip
    #RequestHeader unset X-Forwarded-User

Save and close the file then disable the default Apache configuration file.

a2dissite 000-default.conf

Next, restart the Apache service to apply the changes.

systemctl restart apache2

You can now check the status of the Apache with the following command.

systemctl status apache2

You should get the following output.

? apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2022-12-30 02:49:21 UTC; 8s ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 13887 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
   Main PID: 13891 (apache2)
      Tasks: 55 (limit: 4579)
     Memory: 5.1M
        CPU: 53ms
     CGroup: /system.slice/apache2.service
             ??13891 /usr/sbin/apache2 -k start
             ??13892 /usr/sbin/apache2 -k start
             ??13893 /usr/sbin/apache2 -k start

Dec 30 02:49:21 ubuntu2204 systemd[1]: Starting The Apache HTTP Server...

Once you are finished, you can proceed to access the Zammad web interface.

Access Zammad Ticketing System

At this point, Zammad is installed and configured on your server. You can now access it using the URL http://your-server-ip. You should see the following page.

Click on the Set up a new system. You should see the administrator account setting page.

Provide your name, email, password, and click on the Create button. You should see the following page.

Define your company name, site URL and click on the Next button. You should see the Email Notification page.

Select your Email provider and click on the Continue button. You should see the communication channel page.

Click on the Skip button. You should see the Zammad dashboard on the following page.

Conclusion

Congratulations! you have successfully installed and configured the Zammad ticketing system on Ubuntu 22.04 server. You can now implement Zammad in your organization and connect it to third-party channels like Facebook and telephone. Feel free to ask me if you have any questions.

Share this page:

1 Comment(s)