安装手册
下载 Zammad
请访问 软件下载 下载合适的版本.
root@shell> useradd zammad -m -d /opt/zammad -s /bin/bash
root@shell> cd /opt
root@shell> wget https://ftp.zammad.com/zammad-latest.tar.gz
root@shell> tar -xzf zammad-latest.tar.gz -C zammad
root@shell> su - zammad
安装所需要的依赖包
请留意, 当前 Zammad 需要 Ruby 环境是 2.4.4, 在安装 Zammad 之前请参考社区文档 Ruby 环境的搭建 来准备基础环境
zammad@shell> cd zammad
zammad@shell> gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/ # (for China user)
zammad@shell> cd zammad
zammad@shell> gem install bundler
根据数据库环境选择以下一种方式:
- 适用于 PostgreSQL
zammad@shell> bundle install --without test development mysql
- 适用于 MySQL
zammad@shell> bundle install --without test development postgres
配置数据库
zammad@shell> cp config/database.yml.pkgr config/database.yml
zammad@shell> vi config/database.yml
按照文件的例子配置好数据库的用户名,密码等
初始化数据库
zammad@shell> export RAILS_ENV=production
zammad@shell> export RAILS_SERVE_STATIC_FILES=true # 如果需要配置反向代理的时候用
zammad@shell> rake db:create
zammad@shell> rake db:migrate
zammad@shell> rake db:seed
启动 Zammad
zammad@shell> rake assets:precompile
zammad@shell> rails s -p 3000 # 应用服务器
zammad@shell> script/websocket-server.rb start # non blocking websocket server
zammad@shell> script/scheduler.rb start # generate overviews on demand, just send changed data to browser
大功告成
当以上一切都顺利完成之后, 在你的浏览器输入 http://localhost:3000 你将看到 Welcome to Zammad 的欢迎页, 创建完管理员密码, 或从其他系统导入数据. 然后就可以邀请你的同事加入了!