By Sajid Qureshi, Alibaba Cloud Community Blog author.
Zammad is a free and open source helpdesk/ticketing system written in Ruby. It provides you with many features including customer communication over several channels and is available on GitHub. Customer service representatives can easily deal with customer complaints using Zammad.
In this tutorial, we will be showing you how to install Zammad on an Alibaba Cloud Elastic Compute Service (ECS) instance with CentOS 7.
In this tutorial, we are using root user privileges for the entire installation process. You can switch from non root user to root user using this below given command.
sudo -i
You are recommended to upgrade the available repositories and packages before installing Zammad. You can do so using the following command.
yum -y update
Zammad doesn't require any special hardware requirements to install, it will automatically download and install all the dependencies. You will need to install the EPEL repository before installing Zammad, you can add EPEL repository using the following command.
yum -y install epel-release
Next, you will need to import Zammad key using the following command.
rpm --import https://rpm.packager.io/key
Now, add the zammad repository in 'yum.repos.d' directory using the nano text editor.
nano /etc/yum.repos.d/zammad.repo
Add the following content into the file.
[zammad]
name=Repository for zammad/zammad application.
baseurl=https://rpm.packager.io/gh/zammad/zammad/centos7/stable
enabled=1
Save the file and exit from the text editor.
The below command will automatically install all the other required packages like Nginx web server and PostgreSQL for the database purpose. Now let's install Zammad using the following command.
yum -y install zammad
It will take some moments so hold on a bit.
Now we will need to generate SSL certificates from Let's Encrypt client. If you wish to use commercial SSL certificates instead, you can purchase SSL Certificate from Alibaba Cloud. Here we will install Certbot tool, a let's encrypt client using the following command.
yum -y install certbot
Next, change your current directory to the Nginx configuration directory and open the configuration file. Execute the following commands and they will do the job for you.
cd /etc/nginx/
nano nginx.conf
Add the following content under the 'server {}' block.
location ~ /.well-known {
allow all;
}
Save the file and exit from the text editor.
Next, you can test the configuration using the following command.
nginx -t
If nothing goes wrong then you should see Successful as the result in your terminal.
Next, you will need to restart the Nginx server to apply changes.
systemctl restart nginx
Now, you will need to modify firewall rules to make sure that your system port for HTTP and HTTPS is not blocked. Execute the following commands and they will do the job for you.
firewall-cmd --permanent --add-service=https
firewall-cmd --reload
Finally, generate SSL certificate files using certbot as shown below:
certbot certonly --standalone -d YourDomain.com
(NOTE:- Replace YourDomain with your actual domain name registered with Alibaba Cloud.)
You will be asked for an email so type your email address and hit ENTER button to continue. Accept the terms and conditions by typing A.
Once the installation is complete, you can find all your certificates in the '/etc/letsencryp/live/' directory.
We will configure a virtual host file for Zammad. You don't have to create a new virtual host file for Zammad, It's automatically created during the Zammad installation.
Change your current directory to /etc/nginx/conf.d/
and edit the zammad.conf
file using nano text editor.
cd /etc/nginx/conf.d/
nano zammad.conf
Add the following content into the file and change the configuration.
upstream zammad {
server localhost:3000;
}
upstream zammad-websocket {
server localhost:6042;
}
server {
listen 80;
server_name YourDomain.com;
return 301 https://$host$request_uri;
}
server {
listen 443 http2 ssl;
ssl_certificate /etc/letsencrypt/live/YourDomain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/YourDomain.com/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
ssl_ecdh_curve secp384r1;
ssl_session_cache shared:SSL:10m;
ssl_session_tickets off;
ssl_stapling on;
ssl_stapling_verify on;
resolver 8.8.8.8 8.8.4.4 valid=300s;
resolver_timeout 5s;
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains";
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
server_name zammad.irsyadf.me;
root /opt/zammad/public;
access_log /var/log/nginx/zammad.access.log;
error_log /var/log/nginx/zammad.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_read_timeout 86400;
proxy_pass http://zammad-websocket;
}
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_read_timeout 180;
proxy_pass http://zammad;
gzip on;
gzip_types text/plain text/xml text/css image/svg+xml application/javascript application/x-javascript application/json application/xml;
gzip_proxied any;
}
}
Save the configuration file and exit. Please don't forget to replace YourDomain with your actual domain name.
Finally, test this configuration file using the following command and make sure there is no error.
nginx -t
Next, restart the web server using the following command.
systemctl restart nginx
Zammad ticketing system has been installed on your CentOS 7 server and it's running under HTTPS secure connection. You will need to configure the installation wizard so open up your favorite web browser and visit http://YourDomain.com
You will see a zammad webpage like below. Click the Setup new system button to continue.
On the next interface, you will be asked to create an administrative account. Simply, enter the basic admin details like username, email, and password, and then finally click on Create button to proceed further.
Next, you will have to provide your organization/company name and then click on Next button.
Next, click Continue button for email notification and proceed further.
Next, click Skip for channel configuration and then you will see the Zammad admin dashboard like this:
In this guide, you learned how to install Zammad ticketing system on your CentOS 7 server. Now you can manage your customer support system through various channels. We hope now you have enough knowledge to work with Zammad Ticketing System.
Introduction to a Java Fault Tolerance Library: Resilience4j
2,599 posts | 762 followers
FollowAlibaba Clouder - April 1, 2019
Hiteshjethva - January 8, 2020
Alibaba Clouder - April 12, 2019
Alibaba Clouder - May 15, 2019
Alibaba Clouder - May 13, 2019
Alibaba Clouder - April 12, 2019
2,599 posts | 762 followers
FollowElastic and secure virtual cloud servers to cater all your cloud hosting needs.
Learn MoreLearn More
Learn More
More Posts by Alibaba Clouder