如何在 Debian 10 上安装 YetiForce CRM
在此页
- 先决条件
- 开始
- 安装 Apache、MariaDB 和 PHP
- 配置数据库
- 下载 YetiForce
- 为 YetiForce 配置 Apache
- 使用 Lets Encrypt 免费 SSL 保护 YetiForce
- 访问 YetiForce
- 结论
YetiForce 是一个免费的开源客户关系管理系统,有助于管理与客户、供应商、合作伙伴和员工的关系。 YetiForce 可以与 LDAP、PBX、DAV、地图、社交门户和其他网络服务集成。 YetiForce 使您能够远程控制您在世界任何地方的业务。它具有一组丰富的功能,包括 70 多个用户模块和配置面板、发票、电子邮件自动化和跟踪、电子邮件通知、大型活跃社区、GDPR 管理等等。
在本教程中,我们将向您展示如何使用 Lets Encrypt 免费 SSL 在 Debian 10 上安装 YetiForce。
先决条件
- 一台运行 Debian 10 且内存至少为 2 GB 的服务器。
- 用您的服务器 IP 指向的有效域名。我们将在本文中使用 example.com 域。
- 在您的服务器上配置了根密码。
入门
在开始之前,建议使用最新版本更新您的服务器。您可以使用以下命令更新它:
apt-get update -y
apt-get upgrade -y
服务器更新后,重新启动它以实施更改。
安装 Apache、MariaDB 和 PHP
首先,您需要在服务器上安装 Apache、MariaDB、PHP 和其他所需的库。您可以通过运行以下命令来安装它们:
apt-get install apache2 mariadb-server php libapache2-mod-php php-common php-mysql php-gmp php-curl php-intl php-mbstring php-xmlrpc php-gd php-bcmath php-soap php-ldap php-imap php-xml php-cli php-zip git unzip wget -y
安装完所有软件包后,打开 php.ini 文件并调整一些必需的设置:
nano /etc/php/7.3/apache2/php.ini
更改以下行:
display_errors = Off
html_errors = Off
display_startup_errors
memory_limit = 256M
post_max_size = 50M
upload_max_filesize = 100M
max_execution_time = 360
date.timezone = Asia/Kolkata
完成后保存并关闭文件。然后,启动 Apache 和 MariaDB 服务,并使用以下命令使它们能够在系统重启时启动:
systemctl start apache2
systemctl start mariadb
systemctl enable apache2
systemctl enable mariadb
完成后,您可以继续下一步。
配置数据库
默认情况下,MariaDB 不受保护,因此您需要对其进行保护。您可以通过运行以下命令来保护它:
mysql_secure_installation
如下图所示回答所有问题:
Enter current password for root (enter for none):
Set root password? [Y/n] Y
New password:
Re-enter new password:
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 shell:
mysql -u root -p
在出现提示时提供您的 root 密码,然后使用以下命令为 YetiForce 创建数据库和用户:
MariaDB [(none)]> CREATE DATABASE yetiforcedb;
MariaDB [(none)]> CREATE USER 'yetiforce'@'localhost' IDENTIFIED BY 'password';
接下来,使用以下命令授予 yetiforcedb 的所有权限:
MariaDB [(none)]> GRANT ALL ON yetiforcedb.* TO 'yetiforce'@'localhost' WITH GRANT OPTION;
接下来,使用以下命令刷新权限并退出 MariaDB shell:
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;
此时,您已经为 YetiForce 配置了 MariaDB 数据库。接下来,您可以继续下载 YetiForce。
下载 YetiForce
首先,您需要从 sourceforge 网站下载 YetiForce。您可以使用以下命令下载它:
wget https://excellmedia.dl.sourceforge.net/project/yetiforce/YetiForce%20CRM%205.x.x/5.1.0/YetiForceCRM-5.1.0-complete.zip
下载完成后,通过运行以下命令将下载的文件解压缩到 Apache Web 根目录:
mkdir /var/www/html/yetiforce
unzip YetiForceCRM-5.1.0-complete.zip -d /var/www/html/yetiforce
接下来,给 yetiforce 目录适当的权限,如下所示:
chown -R www-data:www-data /var/www/html/yetiforce
chmod -R 755 /var/www/html/yetiforce
完成后,您可以继续下一步。
为 YetiForce 配置 Apache
接下来,您需要为 YetiForce 创建一个 Apache 虚拟主机配置文件。您可以使用以下命令创建它:
nano /etc/apache2/sites-available/yetiforce.conf
添加以下行:
<VirtualHost *:80>
ServerAdmin
DocumentRoot /var/www/html/yetiforce
ServerName example.com
<Directory /var/www/html/yetiforce/>
Options FollowSymlinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
完成后保存并关闭文件。然后,使用以下命令启用虚拟主机和重写模块:
a2ensite yetiforce.conf
a2enmod rewrite
最后,重新启动 Apache Web 服务以实现更改:
systemctl restart apache2
完成后,您可以继续下一步。
使用 Lets Encrypt 免费 SSL 保护 YetiForce
YetiForce 现已安装和配置。接下来,最好使用 Lets Encrypt 免费 SSL 来保护它。为此,您需要在服务器上安装 Certbot 客户端。
默认情况下,Certbot 客户端包在 Debian 10 默认存储库中不可用。您可以使用以下命令添加它:
echo "deb http://ftp.debian.org/debian buster-backports main" >> /etc/apt/sources.list
接下来,更新存储库并使用以下命令安装 Certbot 客户端:
apt-get update -y
apt-get install python-certbot-apache -t buster-backports
安装后,运行以下命令为您的域获取并安装 SSL 证书:
certbot --apache -d example.com
您将被要求提供您的电子邮件地址并同意服务条款。
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel):
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v02.api.letsencrypt.org/directory
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(A)gree/(C)ancel: A
接下来,您需要选择是否将 HTTP 流量重定向到 HTTPS,删除 HTTP 访问,如下所示:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2
选择选项 2 为您的域下载并安装免费的 SSL 证书,然后按 Enter 键完成安装,如下所示:
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/example.com/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/example.com/privkey.pem
Your cert will expire on 2020-03-23. To obtain a new or tweaked
version of this certificate in the future, simply run certbot-auto
again with the "certonly" option. To non-interactively renew *all*
of your certificates, run "certbot-auto renew"
- If you like Certbot, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le
访问 YetiForce
现在,打开您的 Web 浏览器并输入 URL https://example.com。您将被重定向到 YetiForce 欢迎页面:

单击“安装”按钮。您应该会看到以下页面:

接下来,单击我同意按钮以接受许可协议。您应该会看到以下页面:

提供您的数据库名称、用户名、密码、管理员用户详细信息,然后单击“下一步”按钮。您应该会看到以下页面:

现在,单击下一步按钮以确认更改。您应该会看到以下页面:

现在,单击下一步按钮以验证服务器配置。您应该会看到以下页面:

现在,提供您公司的详细信息,然后单击“下一步”按钮。您将被重定向到以下页面中的 YetiForce 仪表板:

结论
在上面的文章中,您了解了如何在 Debian 10 服务器上使用 Lets Encrypt 免费 SSL 安装 YetiForce。您现在可以根据需要继续配置其他设置。如果您有任何问题,请随时问我。