发布时间:2025-12-15 22:38:48 浏览次数:1
Chatwoot是一款强大的开源客户沟通平台,本文将指导您在Ubuntu18.04系统上安装Chatwoot。
安装Chatwoot之前,请确保您的Ubuntu18.04系统已更新至最新版本。执行以下命令更新系统:
sudo apt update && sudo apt upgrade -yChatwoot需要以下依赖:Ruby、Node.js、PostgreSQL和Redis。使用以下命令安装这些依赖:
sudo apt install ruby-full nodejs postgresql postgresql-contrib redis-server -y下载Chatwoot源码并进入目录:
git clone https://github.com/chatwoot/chatwoot.gitcd chatwoot安装所需的Ruby gems:
bundle install设置数据库:
rake db:create db:migrate复制示例配置文件并根据需要进行修改:
cp .env.example .env编辑.env文件,设置必要的配置项,如数据库连接信息和邮件服务器设置。
使用以下命令启动Chatwoot服务:
bundle exec rails s -p 3000现在,您可以通过浏览器访问http://localhost:3000来使用Chatwoot了。
为确保Chatwoot在系统重启后自动运行,可以创建一个systemd服务。创建文件/etc/systemd/system/chatwoot.service,并添加以下内容:
[Unit]Description=ChatwootAfter=network.target[Service]Type=simpleUser=your_usernameWorkingDirectory=/path/to/chatwootExecStart=/usr/bin/bundle exec rails s -p 3000Restart=always[Install]WantedBy=multi-user.target启用并启动服务:
sudo systemctl enable chatwootsudo systemctl start chatwoot通过以上步骤,您已成功在Ubuntu18.04系统上安装并配置了Chatwoot。享受这个强大的客户沟通平台吧!