如何在 Ubuntu 22.04 LTS 上安装 Cerb

Linux命令 Edge插件网 2年前 (2023-03-10) 412次浏览 已收录 0个评论

Cerb 是一个免费、开源、快速、灵活的业务协作和自动化平台。Cerb 提供一系列处理客户支持交互的功能,包括工单管理、电子邮件管理和实时聊天支持。它还提供强大的报告和分析功能,允许支持团队跟踪性能指标并确定需要改进的领域。如何在 Ubuntu 22.04 LTS 上安装 Cerb

在 Ubuntu 22.04 LTS Jammy Jellyfish 上安装 Cerb

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

<span class="pln">sudo apt update
sudo apt upgrade
sudo dnf install epel</span><span class="pun">-</span><span class="pln">release</span>

第 2 步。在 Ubuntu 22.04 上安装 LAMP 堆栈。

在开始本教程之前,必须在服务器上安装 LAMP 服务器。如果您没有安装 LAMP 堆栈,您可以按照我们的指南进行操作。

第 3 步。在 Ubuntu 22.04 LTS安装 Cerb

默认情况下,Cerb 在 Ubuntu 22.04 基础存储库中不可用。现在运行以下命令,使用以下命令从 GitHub 克隆 Cerb 安装程序:git

<span class="pln">cd </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
git clone https</span><span class="pun">:</span><span class="com">//github.com/cerb/cerb-release.git cerb</span>

下载完成后,将目录更改为 Cerb 并重命名文件:.htaccess-dist

<span class="pln">cd cerb
mv </span><span class="pun">.</span><span class="pln">htaccess</span><span class="pun">-</span><span class="pln">dist </span><span class="pun">.</span><span class="pln">htaccess</span>

我们需要更改一些文件夹权限:

<span class="pln">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">cerb</span><span class="pun">/</span><span class="pln">
chmod </span><span class="pun">-</span><span class="pln">R </span><span class="lit">755</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">cerb</span><span class="pun">/</span>

第 4 步。配置 MariaDB。

默认情况下,MariaDB 未强化。您可以使用脚本保护 MariaDB。您应该仔细阅读并在每个步骤下方仔细阅读,这将设置root密码,删除匿名用户,禁止远程root登录,并删除测试数据库和对安全MariaDB的访问权限:mysql_secure_installation

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

像这样配置它:

<span class="pun">-</span> <span class="typ">Set</span><span class="pln"> root password</span><span class="pun">?</span> <span class="pun">[</span><span class="pln">Y</span><span class="pun">/</span><span class="pln">n</span><span class="pun">]</span><span class="pln"> y
</span><span class="pun">-</span> <span class="typ">Remove</span><span class="pln"> anonymous users</span><span class="pun">?</span> <span class="pun">[</span><span class="pln">Y</span><span class="pun">/</span><span class="pln">n</span><span class="pun">]</span><span class="pln"> y
</span><span class="pun">-</span> <span class="typ">Disallow</span><span class="pln"> root login remotely</span><span class="pun">?</span> <span class="pun">[</span><span class="pln">Y</span><span class="pun">/</span><span class="pln">n</span><span class="pun">]</span><span class="pln"> y
</span><span class="pun">-</span> <span class="typ">Remove</span><span class="pln"> test database </span><span class="kwd">and</span><span class="pln"> access to it</span><span class="pun">?</span> <span class="pun">[</span><span class="pln">Y</span><span class="pun">/</span><span class="pln">n</span><span class="pun">]</span><span class="pln"> y
</span><span class="pun">-</span> <span class="typ">Reload</span><span class="pln"> privilege tables now</span><span class="pun">?</span> <span class="pun">[</span><span class="pln">Y</span><span class="pun">/</span><span class="pln">n</span><span class="pun">]</span><span class="pln"> y</span>

接下来,我们需要登录 MariaDB 控制台并为 Cerb 创建一个数据库。运行以下命令:

<span class="pln">mysql </span><span class="pun">-</span><span class="pln">u root </span><span class="pun">-</span><span class="pln">p</span>

这将提示您输入密码,因此请输入您的MariaDB root密码并按Enter键。登录到数据库服务器后,您需要为Cerb安装创建一个数据库:

<span class="typ">MariaDB</span> <span class="pun">[(</span><span class="pln">none</span><span class="pun">)]></span><span class="pln"> CREATE DATABASE cerbdb CHARACTER SET utf8</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 cerbuser@localhost 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 cerbdb</span><span class="pun">.*</span><span class="pln"> TO cerbuser@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><span class="pun">;</span>

有关安装和管理 MariaDB 的其他资源,请阅读下面的帖子:

  • 如何在 Ubuntu Linux √ 上安装 MariaDB

第5步。配置 Apache 虚拟主机。

现在为 Cerb 创建虚拟主机配置文件:

<span class="pln">sudo nano </span><span class="pun">/</span><span class="pln">etc</span><span class="pun">/</span><span class="pln">apache2</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">cerb</span><span class="pun">.</span><span class="pln">conf</span>

添加以下文件:

<span class="tag"><VirtualHost</span><span class="pln"> *:80</span><span class="tag">></span><span class="pln">
     ServerAdmin admin@your-domain.com
     DocumentRoot /var/www/html/cerb
     ServerName  your-domain.com

     </span><span class="tag"><Directory</span> <span class="pun">/</span><span class="atn">var</span><span class="pun">/</span><span class="atn">www</span><span class="pun">/</span><span class="atn">html</span><span class="pun">/</span><span class="atn">cerb</span><span class="tag">/></span><span class="pln">
          Options FollowSymlinks
          AllowOverride All
          Require all granted
     </span><span class="tag"></Directory></span><span class="pln">

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined
</span><span class="tag"></VirtualHost></span>

保存并关闭文件,然后重新启动 Apache Web 服务器,以便进行更改:

<span class="pln">sudo a2ensite cerb</span><span class="pun">.</span><span class="pln">conf
sudo a2enmod rewrite
sudo systemctl restart apache2</span>

有关安装 Apache 的其他资源,请阅读下面的帖子:

  • 如何在 Ubuntu Linux √ 上安装 Apache。

第 6 步。使用Let’s Encrypt SSL保护Cerb。

首先,使用以下命令安装 Certbot 客户端:

<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">apache2</span>

接下来,按照以下步骤使用Let’s Encrypt获取SSL证书:

<span class="pln">certbot </span><span class="pun">--</span><span class="pln">apache </span><span class="pun">-</span><span class="pln">d your</span><span class="pun">-</span><span class="pln">domain</span><span class="pun">.</span><span class="pln">com</span>

让我们加密证书的有效期为 90 天,强烈建议在证书过期之前续订证书。您可以通过运行以下命令来测试证书的自动续订:

<span class="pln">sudo certbot renew </span><span class="pun">--</span><span class="pln">dry</span><span class="pun">-</span><span class="pln">run</span>

步骤 7.配置防火墙。

Ubuntu 22.04 默认运行防火墙。启用通过端口 HTTP 和 HTTPS 的连接:ufw80443

<span class="pln">sudo ufw allow </span><span class="str">'Apache FULL'</span><span class="pln">
sudo ufw enable
sudo ufw status</span>

第8步。访问 Cerb 网页界面。

成功安装后,打开您的网络浏览器并使用 URL 访问 Cerb 网页用户界面。您将被重定向到以下页面:https://your-domain.com

如何在 Ubuntu 22.04 LTS 上安装 Cerb

感谢您使用本教程在 Ubuntu 22.04 Jammy Jellyfish 系统上安装 Cerb。如需更多帮助或有用信息,我们建议您查看 Cerb 官方网站


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

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

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