如何在 Debian 11 上安装 UVdesk

在本教程中,我们将向您展示如何在 Debian 11 上安装 UVdesk。对于那些不知道的人,UVdesk 是一个免费、开源和基于 SaaS 的帮助台解决方案,适用于任何业务流程,以提供最佳客户服务。 它是其他流行支持平台的简单、灵活、用户友好和替代品。 Uvdesk 支持企业服务台功能,如工作流、电子邮件管道、知识库、邮箱、电子商务和多渠道集成。

本文假设您至少具备 Linux 的基本知识,知道如何使用 shell,最重要的是,您将网站托管在自己的 VPS 上。 安装非常简单,假设您在 root 帐户下运行,如果不是,您可能需要添加 ‘sudo‘ 到命令以获取 root 权限。 我将向您展示在 Debian 11 (Bullseye) 上逐步安装 UVdesk 帮助台系统。

在 Debian 11 Bullseye 上安装 UVdesk

第 1 步。在我们安装任何软件之前,重要的是通过运行以下命令确保您的系统是最新的 apt 终端中的命令:

sudo apt update sudo apt upgrade

步骤 2. 安装 LAMP 堆栈。

需要 Debian 11 LAMP 服务器。 如果您没有安装 LAMP,请阅读我们之前的教程以在 Debian 11 上安装 LAMP 服务器。此外,我们使用以下命令在我们的系统上安装 PHP-FPM 和必要的依赖项:

sudo apt install php-fpm

现在我们已经安装了 PHP-FPM,验证它是否正在运行:

sudo systemctl status php*-fpm.service

接下来,编辑 php.ini 文件并更改一些默认设置:

nano /etc/php/7.4/fpm/php.ini

更改以下行:

memory_limit = 512M date.timezone = Asia/Jakarta

Save 和 close 该文件然后重新启动 PHP-FPM 服务以应用更改:

sudo systemctl restart php7.4-fpm

步骤 3. 安装 Composer。

PHP composer 是 UVdesk 的系统要求之一。 运行以下命令来安装它:

curl -sS https://getcomposer.org/installer -o composer-setup.php php composer-setup.php --install-dir=/usr/local/bin --filename=composer

验证 Composer 安装:

composer -V

步骤 4. 在 Debian 11 上安装 UVdesk。

默认情况下,UVdesk 在 Debian 11 基础存储库中不可用。 首先,将目录更改为 Apache Web 根目录并使用 Composer 下载 UVdesk:

cd /var/www/html composer create-project uvdesk/community-skeleton uvdesk

输出:

* Modify your GOOGLE_RECAPTCHA_SITE_KEY and GOOGLE_RECAPTCHA_SECRET config in .env    * Inject the ReCaptchaReCaptcha service when you need to verify a submitted captcha   symfony/phpunit-bridge  instructions:    * Write test cases in the tests/ folder   * Use MakerBundle's make:test command as a shortcut!   * Run the tests with php bin/phpunit  _   ___     ______            _       ____                                      _ _          | | |     / /  _   ___  ___| | __  / ___|___  _ __ ___  _ __ ___  _   _ _ __ (_) |_ _   _  | | | |  / /| | | |/ _ / __| |/ / | |   / _ | '_ ` _ | '_ ` _ | | | | '_ | | __| | | | | |_| |  V / | |_| |  __/__    <  | |__| (_) | | | | | | | | | | | |_| | | | | | |_| |_| |  ___/   _/  |____/ ___||___/_|_  _______/|_| |_| |_|_| |_| |_|__,_|_| |_|_|__|__, |                                                                                        |___/   Welcome to the UVDesk Community project! UVDesk Community is an open-source e-commerce helpdesk system which is built on top of reliable set of tools to provide you and your customers with the best support  solution possible.  To start things off, here are a few commands to help you setup:    * Configuring your project:      php bin/console uvdesk:configure-helpdesk    * Run your project through a local php web server:      php bin/console server:run  Made with ????  by the UVDesk Team. Happy helping :)

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

chown -R www-data:www-data /var/www/html/uvdesk chmod -R 775 /var/www/html/uvdesk

步骤 5. 为 UVdesk 配置 MariaDB。

默认情况下,MariaDB 未加固。 您可以使用 mysql_secure_installation 脚本。 您应该仔细阅读以下每个步骤,这些步骤将设置 root 密码、删除匿名用户、禁止远程 root 登录、删除测试数据库和访问安全 MariaDB:

mysql_secure_installation

像这样配置它:

- Set root password? [Y/n] y - Remove anonymous users? [Y/n] y - Disallow root login remotely? [Y/n] y - Remove test database and access to it? [Y/n] y - Reload privilege tables now? [Y/n] y

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

mysql -u root -p

这将提示您输入密码,因此输入您的 MariaDB 根密码并点击 Enter. 登录到数据库服务器后,您需要为 UVdesk 安装创建数据库:

MariaDB [(none)]> CREATE DATABASE uvdesk; MariaDB [(none)]> CREATE USER 'uvdesk'@'localhost' IDENTIFIED BY 'your-stong-password'; MariaDB [(none)]> GRANT ALL PRIVILEGES ON uvdesk.* TO 'uvdesk'@'localhost'; MariaDB [(none)]> FLUSH PRIVILEGES; MariaDB [(none)]> EXIT;

步骤 5. 配置 Apache.

现在我们创建一个 Apache UVdesk 的虚拟主机配置文件,使用以下命令:

nano /etc/apache2/sites-available/uvdesk.conf

添加以下行:

<VirtualHost *:80>     ServerName uvdesk.your-domain.com     DocumentRoot /var/www/html/uvdesk/public      <Directory /var/www/html/uvdesk/public>         Options -Indexes +FollowSymLinks +MultiViews         AllowOverride All         Require all granted     </Directory>      <FilesMatch .php$>         # 2.4.10+ can proxy to unix socket         SetHandler "proxy:unix:/var/run/php/php7.4-fpm.sock|fcgi://localhost"     </FilesMatch>      ErrorLog /var/log/apache2/uvdesk-error.log     CustomLog /var/log/apache2/uvdesk-access.log combined </VirtualHost>

Save 和 close,然后重新启动 Apache 网络服务器,以便进行更改:

sudo a2ensite uvdesk sudo a2enmod rewrite sudo systemctl restart apache2

步骤 6. 访问 UVdesk Web 界面。

成功安装后,打开您的网络浏览器并使用 URL 访问 UVdesk 网络界面 https://uvdesk.your-domian.com. 您应该看到以下页面:

恭喜! 您已成功安装 UVdesk。 感谢您使用本教程在 Debian 11 Bullseye 上安装最新版本的 UVdesk 帮助台。 如需更多帮助或有用信息,我们建议您查看 UVdesk 官方网站.