Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

apt install curl apt-transport-https gnupg -y

apt update

apt install curl

apt install nodejs -y

locale |grep "LANG="

apt install locales

locale-gen en_US.UTF-8

echo "LANG=en_US.UTF-8" > /etc/default/locale

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

Instalar ZAMMAD

apt update

apt install zammad -y

apt upgrade -y

Instalar Elasticsearch

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch --no-check-certificate | sudo apt-key add –

echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-


7.x.list

apt update

apt install elasticsearch=7.7.1


Instalar librería libssl1.1

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


security.list

sudo apt-get update

sudo apt-get install libssl1.1

Instalar Zammad sin errores =)

apt install zammad

apt upgrade

apt install policycoreutils -y

setsebool httpd_can_network_connect on -P

apt install policycoreutils-python-utils -y

semanage fcontext -a -t httpd_sys_content_t /opt/zammad/public/

restorecon -Rv /opt/zammad/public/

chmod -R a+r /opt/zammad/public/

ufw enable

ufw allow 80

ufw allow 443

ufw reload

systemctl status zammad

systemctl status zammad-web

systemctl status zammad-worker

systemctl status zammad-websocket

cd /opt

wget https://github.com/zammad/zammad/archive/stable.tar.gz

tar -xzf stable.tar.gz --strip-components 1 -C zammad

chown -R zammad:zammad zammad/


rm -f stable.tar.gz

Instalar Node.js

apt update

apt install curl -y

curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -

apt install nodejs -y

Instalar RVM

apt install curl git patch build-essential bison zlib1g-dev libssl-dev libxml2-dev libxml2-dev autotools-dev\

libxslt1-dev libyaml-0-2 autoconf automake libreadline-dev libyaml-dev libtool libgmp-dev libgdbm-dev


libncurses5-dev\

pkg-config libffi-dev libimlib2-dev gawk libsqlite3-dev sqlite3 software-properties-common -y

apt-add-repository -y ppa:rael-gc/rvm

apt update

apt install rvm -y

Establecer variables de entorno relevantes

echo "export RAILS_ENV=production" >> /opt/zammad/.bashrc

echo "export RAILS_SERVE_STATIC_FILES=true" >> /opt/zammad/.bashrc

echo "rvm --default use 3.0.4" >> /opt/zammad/.bashrc

echo "source /usr/share/rvm/scripts/rvm" >> /opt/zammad/.bashrc

Instalar Ruby Environment


# Add zammad user to RVM group
usermod -a -G rvm zammad
# Install Ruby 3.0.4
su – zammad

rvm install ruby-3.0.4


Install bundler, rake and rails

apt install ruby-rubygems

rvm use 3.0.4


PostgreSQL

apt install libpq-dev

chmod 600 /opt/zammad/config/database.yml

chown zammad:zammad /opt/zammad/config/database.yml

cp config/database/database.yml config/database.yml

vi config/database.yml

production:

adapter: postgresql

database: zammad

pool: 50

timeout: 5000

encoding: utf8

username: zammad

password: changeme

Initialize your database

su - zammad

rake db:create # SKIP IF you already created zammads database (see tip of step 3)

rake db:migrate

rake db:seed

sudo su

rails r "Locale.sync"

rails r "Translation.sync"

Pre compile all Zammad assets

rake assets:precompile

Start Zammad or install as service

cd /opt/zammad/script/systemd

./install-zammad-systemd-services.sh
Manage services of Zammad

systemctl status zammad

systemctl status zammad-web

systemctl status zammad-worker

systemctl status zammad-websocket

You might also like