Ubuntu18.04系統(tǒng)如何安裝Chatwoot
Chatwoot是一款強(qiáng)大的開源客戶溝通平臺,本文將指導(dǎo)您在Ubuntu18.04系統(tǒng)上安裝Chatwoot。
環(huán)境準(zhǔn)備
安裝Chatwoot之前,請確保您的Ubuntu18.04系統(tǒng)已更新至最新版本。執(zhí)行以下命令更新系統(tǒng):
sudo apt update && sudo apt upgrade -y
安裝依賴
Chatwoot需要以下依賴:Ruby、Node.js、PostgreSQL和Redis。使用以下命令安裝這些依賴:
sudo apt install ruby-full nodejs postgresql postgresql-contrib redis-server -y
安裝Chatwoot
下載Chatwoot源碼并進(jìn)入目錄:
git clone https://github.com/chatwoot/chatwoot.git
cd chatwoot
安裝所需的Ruby gems:
bundle install
設(shè)置數(shù)據(jù)庫:
rake db:create db:migrate
配置Chatwoot
復(fù)制示例配置文件并根據(jù)需要進(jìn)行修改:
cp .env.example .env
編輯.env文件,設(shè)置必要的配置項,如數(shù)據(jù)庫連接信息和郵件服務(wù)器設(shè)置。
啟動Chatwoot服務(wù)
使用以下命令啟動Chatwoot服務(wù):
bundle exec rails s -p 3000
現(xiàn)在,您可以通過瀏覽器訪問http://localhost:3000來使用Chatwoot了。
設(shè)置開機(jī)自啟
為確保Chatwoot在系統(tǒng)重啟后自動運(yùn)行,可以創(chuàng)建一個systemd服務(wù)。創(chuàng)建文件/etc/systemd/system/chatwoot.service,并添加以下內(nèi)容:
[Unit]
Description=Chatwoot
After=network.target
[Service]
Type=simple
User=your_username
WorkingDirectory=/path/to/chatwoot
ExecStart=/usr/bin/bundle exec rails s -p 3000
Restart=always
[Install]
WantedBy=multi-user.target
啟用并啟動服務(wù):
sudo systemctl enable chatwoot
sudo systemctl start chatwoot
通過以上步驟,您已成功在Ubuntu18.04系統(tǒng)上安裝并配置了Chatwoot。享受這個強(qiáng)大的客戶溝通平臺吧!