如何在 Ubuntu 22.04 LTS 上安装 Vtiger CRM

Linux命令 Edge插件网 1年前 (2023-09-18) 328次浏览 已收录 0个评论

客户关系管理 (CRM) 系统是各种规模企业必不可少的工具。Vtiger CRM作为一种多功能的开源CRM解决方案脱颖而出,可以帮助您简化运营,增强沟通并最终提高利润。

如何在 Ubuntu 22.04 LTS 上安装 Vtiger CRM

在 Ubuntu 22.04 LTS Jammy Jellyfish 上安装 Vtiger CRM

第 1 步。首先,通过在终端中运行以下命令,确保所有系统软件包都是最新的。apt

<span class="pln">sudo apt update
sudo apt upgrade</span>

第 2 步。安装Nginx。

Nginx是一个高性能的Web服务器,将作为我们CRM安装的骨干。安装它:

<span class="pln">sudo apt install nginx</span>

第 3 步。安装 MariaDB。

MariaDB是Vtiger CRM将使用的数据库管理系统。安装它:

<span class="pln">sudo apt install mariadb</span><span class="pun">-</span><span class="pln">server</span>

在安装过程中,系统将提示您设置 root 密码。让它强大而令人难忘。

现在我们已经安装了MariaDB,让我们为Vtiger CRM配置它。运行以下命令以保护 MariaDB 安装:

<span class="pln">sudo mysql_secure_installation</span>

系统将提示您设置 root 密码、删除匿名用户、禁止远程 root 登录以及删除测试数据库。按照提示完成此过程。

接下来,我们需要创建一个Vtiger CRM将使用的数据库。替换为首选数据库名称:vtigerdb

<span class="typ">MariaDB</span> <span class="pun">[(</span><span class="pln">none</span><span class="pun">)]></span><span class="pln"> CREATE DATABASE vtigerdb</span><span class="pun">;</span>
<span class="typ">MariaDB</span> <span class="pun">[(</span><span class="pln">none</span><span class="pun">)]></span><span class="pln"> CREATE USER </span><span class="str">'vtigercrmusr'</span><span class="pun">@</span><span class="str">'localhost'</span><span class="pln"> IDENTIFIED BY </span><span class="str">'your-strong-password'</span><span class="pun">;</span>
<span class="typ">MariaDB</span> <span class="pun">[(</span><span class="pln">none</span><span class="pun">)]></span><span class="pln"> GRANT ALL PRIVILEGES ON vtigerdb</span><span class="pun">.*</span><span class="pln"> TO </span><span class="str">'vtigercrmusr'</span><span class="pun">@</span><span class="str">'localhost'</span><span class="pun">;</span> 
<span class="typ">MariaDB</span> <span class="pun">[(</span><span class="pln">none</span><span class="pun">)]></span><span class="pln"> FLUSH PRIVILEGES</span><span class="pun">;</span> <span class="typ">MariaDB</span> <span class="pun">[(</span><span class="pln">none</span><span class="pun">)]></span><span class="pln"> EXIT</span>

第 4 步。安装 PHP 和所需的扩展。

Vtiger CRM依赖于PHP,所以让我们安装PHP以及必要的扩展:

<span class="pln">sudo apt install php</span><span class="pun">-</span><span class="pln">fpm php</span><span class="pun">-</span><span class="pln">mysql php</span><span class="pun">-</span><span class="pln">json php</span><span class="pun">-</span><span class="pln">zip php</span><span class="pun">-</span><span class="pln">gd php</span><span class="pun">-</span><span class="pln">mbstring php</span><span class="pun">-</span><span class="pln">curl php</span><span class="pun">-</span><span class="pln">xml php</span><span class="pun">-</span><span class="pln">bcmath php</span><span class="pun">-</span><span class="pln">json php</span><span class="pun">-</span><span class="pln">zip php</span><span class="pun">-</span><span class="pln">intl php</span><span class="pun">-</span><span class="pln">xmlrpc php</span><span class="pun">-</span><span class="pln">gd</span>

第5步。在 Ubuntu 22.04 上安装 Vtiger CRM

完成先决条件和数据库配置后,是时候启动并运行Vtiger CRM。前往官方 Vtiger CRM网站 并下载最新版本。您可以使用以下命令直接在服务器上执行此操作:wget

<span class="pln">wget https</span><span class="pun">:</span><span class="com">//sourceforge.net/projects/vtigercrm/files/vtiger%20CRM%208.0.0/Core%20Product/vtigercrm8.0.0.tar.gz/download -O vtiger.tar.gz</span>

提取下载的存档:

<span class="pln">tar </span><span class="pun">-</span><span class="pln">zxvf vtiger</span><span class="pun">-</span><span class="pln">crm</span><span class="pun">-</span><span class="lit">8.0</span><span class="pun">.</span><span class="lit">0.tar</span><span class="pun">.</span><span class="pln">gz</span>

将解压缩的文件移动到 Nginx 文档根目录:

<span class="pln">sudo mv vtigercrm </span><span class="pun">/</span><span class="kwd">var</span><span class="pun">/</span><span class="pln">www</span><span class="pun">/</span><span class="pln">html</span><span class="pun">/</span>

调整权限以确保 Nginx 可以正确提供文件:

<span class="pln">sudo chown </span><span class="pun">-</span><span class="pln">R www</span><span class="pun">-</span><span class="pln">data</span><span class="pun">:</span><span class="pln">www</span><span class="pun">-</span><span class="pln">data </span><span class="pun">/</span><span class="kwd">var</span><span class="pun">/</span><span class="pln">www</span><span class="pun">/</span><span class="pln">html</span><span class="pun">/</span><span class="pln">vtigercrm</span>

第 6 步。为 nginx 创建虚拟主机配置。

现在,让我们为Vtiger CRM创建一个新的Nginx服务器块(虚拟主机)。创建一个新的配置文件:

<span class="pln">sudo nano </span><span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="pln">nginx</span><span class="pun">/</span><span class="pln">sites</span><span class="pun">-</span><span class="pln">available</span><span class="pun">/</span><span class="pln">vtiger</span>

并添加以下配置(替换为您的实际域):your_domain

<span class="pln">server </span><span class="pun">{</span><span class="pln">
    listen </span><span class="lit">80</span><span class="pun">;</span><span class="pln">
    server_name your_domain</span><span class="pun">.</span><span class="pln">com www</span><span class="pun">.</span><span class="pln">your_domain</span><span class="pun">.</span><span class="pln">com</span><span class="pun">;</span><span class="pln">

    root </span><span class="pun">/</span><span class="kwd">var</span><span class="pun">/</span><span class="pln">www</span><span class="pun">/</span><span class="pln">html</span><span class="pun">/</span><span class="pln">vtigercrm</span><span class="pun">;</span><span class="pln">
    index index</span><span class="pun">.</span><span class="pln">php index</span><span class="pun">.</span><span class="pln">html index</span><span class="pun">.</span><span class="pln">htm</span><span class="pun">;</span><span class="pln">

    location </span><span class="pun">/</span> <span class="pun">{</span><span class="pln">
        try_files $uri $uri</span><span class="pun">/</span> <span class="pun">/</span><span class="pln">index</span><span class="pun">.</span><span class="pln">php</span><span class="pun">?</span><span class="pln">$args</span><span class="pun">;</span>
    <span class="pun">}</span><span class="pln">

    location </span><span class="pun">~</span><span class="pln"> \.php$ </span><span class="pun">{</span><span class="pln">
        include snippets</span><span class="pun">/</span><span class="pln">fastcgi</span><span class="pun">-</span><span class="pln">php</span><span class="pun">.</span><span class="pln">conf</span><span class="pun">;</span><span class="pln">
        fastcgi_pass unix</span><span class="pun">:</span><span class="str">/var/</span><span class="pln">run</span><span class="pun">/</span><span class="pln">php</span><span class="pun">/</span><span class="pln">php7</span><span class="pun">.</span><span class="lit">4</span><span class="pun">-</span><span class="pln">fpm</span><span class="pun">.</span><span class="pln">sock</span><span class="pun">;</span>
    <span class="pun">}</span><span class="pln">

    location </span><span class="pun">~</span> <span class="pun">/</span><span class="pln">\.ht </span><span class="pun">{</span><span class="pln">
        deny all</span><span class="pun">;</span>
    <span class="pun">}</span>
<span class="pun">}</span>

保存文件,然后启用新创建的站点:

<span class="pln">sudo ln </span><span class="pun">-</span><span class="pln">s </span><span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="pln">nginx</span><span class="pun">/</span><span class="pln">sites</span><span class="pun">-</span><span class="pln">available</span><span class="pun">/</span><span class="pln">vtiger </span><span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="pln">nginx</span><span class="pun">/</span><span class="pln">sites</span><span class="pun">-</span><span class="pln">enabled</span><span class="pun">/</span>

测试 Nginx 配置:

<span class="pln">sudo nginx </span><span class="pun">-</span><span class="pln">t</span>

如果测试成功,请重新启动 Nginx:

<span class="pln">sudo systemctl restart nginx</span>

步骤 7.使用 Let’s Encrypt 设置 SSL。

在处理CRM系统时,安全性至关重要。让我们使用SSL加密您的Vtiger CRM安装。

<span class="pln">sudo apt install certbot python3</span><span class="pun">-</span><span class="pln">certbot</span><span class="pun">-</span><span class="pln">nginx</span>

运行 Certbot 为您的域请求 SSL 证书:

<span class="pln">sudo certbot </span><span class="pun">--</span><span class="pln">nginx </span><span class="pun">-</span><span class="pln">d your_domain</span><span class="pun">.</span><span class="pln">com </span><span class="pun">-</span><span class="pln">d www</span><span class="pun">.</span><span class="pln">your_domain</span><span class="pun">.</span><span class="pln">com</span>

要确保您的 SSL 证书保持最新,请设置一个 cron 作业以进行自动续订。Certbot 已经为您配置了此功能,但您可以通过运行以下命令进行验证:

<span class="pln">sudo crontab </span><span class="pun">-</span><span class="pln">e</span>

您应该看到类似于以下内容的行:

<span class="lit">0</span> <span class="pun">*</span><span class="str">/12 * * * root test -x /</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">bin</span><span class="pun">/</span><span class="pln">certbot </span><span class="pun">-</span><span class="pln">a \! </span><span class="pun">-</span><span class="pln">d </span><span class="pun">/</span><span class="pln">run</span><span class="pun">/</span><span class="pln">systemd</span><span class="pun">/</span><span class="pln">system </span><span class="pun">&&</span><span class="pln"> perl </span><span class="pun">-</span><span class="pln">e </span><span class="str">'sleep int(rand(3600))'</span> <span class="pun">&&</span><span class="pln"> certbot </span><span class="pun">-</span><span class="pln">q renew</span>

第8步。步骤 7.访问 CRM 网页界面。

打开 Web 浏览器并导航到 。您应该看到以下页面:http://your_domain

如何在 Ubuntu 22.04 LTS 上安装 Vtiger CRM

感谢您使用本教程在 Ubuntu 系统上安装 Vtiger CRM。有关其他帮助或有用信息,我们建议您查看Vtiger官方网站


Edge插件网 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:如何在 Ubuntu 22.04 LTS 上安装 Vtiger CRM
喜欢 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址