Установка SuiteCRM · 8 min read · Oct 20, 2025

Как установить SuiteCRM на Ubuntu 20.04

SuiteCRM — это бесплатная, открытая и корпоративная CRM-система, разработанная SalesAgility. Это форк SugarCRM Community Edition. Она включает в себя все функции, необходимые для ведения любого бизнеса с потребностями в CRM и ERP. Она предлагает широкий спектр функций, включая: Email-маркетинг, интеграцию с социальными сетями, автоматизацию маркетинга, интеграцию внутреннего чата, хранение документов, напоминания, управление задачами и многое другое. В этом посте мы покажем вам, как установить SuiteCRM с Nginx и SSL Let’s Encrypt на Ubuntu 20.04.

Предварительные требования

  • Сервер с установленной Ubuntu 20.04.
  • Действительное доменное имя, указывающее на IP вашего сервера.
  • Настроенный root-пароль на сервере.

Начало работы

Перед началом вам необходимо обновить пакеты вашей системы до последней версии. Вы можете обновить их с помощью следующей команды:

apt-get update -y

После обновления сервера вы можете перейти к следующему шагу.

Установка Nginx, MariaDB и PHP

Сначала вам нужно установить веб-сервер Nginx, MariaDB, PHP и другие расширения PHP на ваш сервер. Вы можете установить все это с помощью следующей команды:

apt-get install nginx mariadb-server php7.4 php7.4-fpm php7.4-gd php7.4-opcache php7.4-mbstring php7.4-xml php7.4-json php7.4-zip php7.4-curl php7.4-imap php-mysql unzip -y

После установки всех пакетов отредактируйте файл php.ini и измените рекомендуемые настройки:

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

Измените следующие настройки:

post_max_size = 60M
upload_max_filesize = 60M
memory_limit = 256M
max_input_time = 60
max_execution_time = 5000
date.timezone = Asia/Kolkata

Сохраните и закройте файл, затем перезапустите службу PHP-FPM, чтобы применить изменения.

systemctl restart php7.4-fpm

На этом этапе сервер LEMP установлен на вашем сервере. Теперь вы можете перейти к следующему шагу.

Создание базы данных для SuiteCRM

SuiteCRM требует базу данных для хранения своего содержимого. Сначала войдите в оболочку MariaDB с помощью следующей команды:

mysql

После входа создайте базу данных и пользователя с помощью следующей команды:

MariaDB [(none)]> CREATE DATABASE suitecrm;  
MariaDB [(none)]> GRANT ALL PRIVILEGES ON suitecrm.* TO 'suitecrm'@'localhost' IDENTIFIED BY 'password';

Затем вам нужно сбросить привилегии, чтобы применить изменения.

MariaDB [(none)]> FLUSH PRIVILEGES;

Затем выйдите из консоли MariaDB с помощью следующей команды:

MariaDB [(none)]> EXIT;

Теперь у вас есть база данных и пользователи, готовые для SuiteCRM. Вы можете перейти к следующему шагу.

Установка SuiteCRM

Сначала перейдите на официальный сайт SuiteCRM и загрузите последнюю версию SuiteCRM с помощью следующей команды:

wget https://sourceforge.net/projects/suitecrm/files/SuiteCRM-7.11.19.zip

После завершения загрузки распакуйте загруженный файл с помощью следующей команды:

unzip SuiteCRM-7.11.19.zip

Затем переместите извлеченный каталог в корневой каталог Nginx с помощью следующей команды:

mv SuiteCRM-7.11.19 /var/www/html/suitecrm

Затем установите правильные разрешения и владельца для каталога suitecrm:

chown -R www-data:www-data /var/www/html/suitecrm/  
chmod 755 -R /var/www/html/suitecrm/

Когда вы закончите, вы можете перейти к настройке Nginx.

Настройка Nginx для хостинга SuiteCRM

Затем вам нужно создать файл конфигурации виртуального хоста Nginx для хостинга SuiteCRM в интернете. Вы можете создать его с помощью следующей команды:

nano /etc/nginx/conf.d/suitecrm.conf

Добавьте следующие строки:

server {
   listen 80;
   server_name suitecrm.example.com;

   root /var/www/html/suitecrm;
   error_log /var/log/nginx/suitecrm.error;
   access_log /var/log/nginx/suitecrm.access;
   client_max_body_size 20M;

   index index.php index.html index.htm index.nginx-debian.html;

   location / {
     # try to serve file directly, fallback to app.php
     try_files $uri /index.php$is_args$args;
   }

   location ~ \.php$ {
     include snippets/fastcgi-php.conf;
     fastcgi_pass unix:/run/php/php7.4-fpm.sock;
   }

   location ~* ^/index.php {
     # try_files $uri =404;
     fastcgi_split_path_info ^(.+\.php)(/.+)$;
     # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini

     fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
     fastcgi_index index.php;
     fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
     include fastcgi_params;

     fastcgi_buffer_size 128k;
     fastcgi_buffers 256 16k;
     fastcgi_busy_buffers_size 256k;
     fastcgi_temp_file_write_size 256k;
   }

    # Don't log favicon
    location = /favicon.ico {
        log_not_found off;
        access_log off;
    }

    # Don't log robots
    location = /robots.txt  {
        access_log off;
        log_not_found off;
    }

    # Deny all attempts to access hidden files/folders such as .htaccess, .htpasswd, .DS_Store (Mac), etc...
    location ~ \. {
        deny all;
        access_log off;
        log_not_found off;
    }

     # A long browser cache lifetime can speed up repeat visits to your page
  location ~* \.(jpg|jpeg|gif|png|webp|svg|woff|woff2|ttf|css|js|ico|xml)$ {
       access_log        off;
       log_not_found     off;
       expires           360d;
  }
}

Сохраните и закройте файл, когда закончите, затем проверьте Nginx на наличие синтаксических ошибок с помощью следующей команды:

nginx -t

Вы должны получить следующий вывод:

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

Затем перезапустите службу Nginx, чтобы применить изменения:

systemctl restart nginx

Чтобы проверить статус службы Nginx, выполните следующую команду:

systemctl status nginx

Вы должны получить следующий вывод:

? nginx.service - A high performance web server and a reverse proxy server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2021-05-22 10:16:45 UTC; 4s ago
       Docs: man:nginx(8)
    Process: 18988 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
    Process: 19000 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
   Main PID: 19001 (nginx)
      Tasks: 2 (limit: 2353)
     Memory: 2.7M
     CGroup: /system.slice/nginx.service
             ??19001 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
             ??19002 nginx: worker process

May 22 10:16:45 ubuntu2004 systemd[1]: Starting A high performance web server and a reverse proxy server...
May 22 10:16:45 ubuntu2004 systemd[1]: Started A high performance web server and a reverse proxy server.

На этом этапе Nginx настроен для обслуживания SuiteCRM. Теперь вы можете перейти к доступу к SuiteCRM.

Доступ к SuiteCRM

Теперь откройте ваш веб-браузер и получите доступ к SuiteCRM по URL http://suitecrm.example.com. Вы должны увидеть следующую страницу:

Примите лицензионное соглашение и нажмите кнопку Далее. Вы должны увидеть следующую страницу:

Убедитесь, что все предварительные требования установлены, затем нажмите кнопку Далее. Вы должны увидеть следующую страницу:

Укажите имя вашей базы данных, пользователя, пароль, имя администратора, пароль, URL SuiteCRM, адрес электронной почты, затем нажмите кнопку Далее. После завершения установки вы должны увидеть следующую страницу:

Теперь нажмите кнопку Далее. Вы должны увидеть страницу входа в SuiteCRM:

Укажите ваше имя администратора, пароль и нажмите кнопку Войти. Вы должны увидеть панель управления SuiteCRM на следующей странице:

Защита SuiteCRM с помощью Let’s Encrypt

Затем вам нужно установить пакет клиента Certbot для установки и управления SSL Let’s Encrypt.

Сначала установите Certbot с помощью следующей команды:

apt-get install certbot python3-certbot-nginx -y

После завершения установки выполните следующую команду, чтобы установить SSL Let’s Encrypt на ваш сайт:

certbot --nginx -d suitecrm.example.com

Вам будет предложено указать действительный адрес электронной почты и принять условия обслуживания, как показано ниже:

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): [email protected]

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about our work
encrypting the web, EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for suitecrm.example.com
Waiting for verification...
Cleaning up challenges
Deploying Certificate to VirtualHost /etc/nginx/conf.d/suitecrm.conf

Затем выберите, хотите ли вы перенаправить HTTP-трафик на HTTPS, как показано ниже:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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 и нажмите Enter, чтобы завершить установку. Вы должны увидеть следующий вывод:

Redirecting all traffic on port 80 to ssl in /etc/nginx/conf.d/suitecrm.conf

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://suitecrm.example.com

You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=suitecrm.example.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/suitecrm.example.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/suitecrm.example.com/privkey.pem
   Your cert will expire on 2021-10-30. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot again
   with the "certonly" option. To non-interactively renew *all* of
   your certificates, run "certbot renew"
 - Your account credentials have been saved in your Certbot
   configuration directory at /etc/letsencrypt. You should make a
   secure backup of this folder now. This configuration directory will
   also contain certificates and private keys obtained by Certbot so
   making regular backups of this folder is ideal.
 - 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

 - We were unable to subscribe you the EFF mailing list because your
   e-mail address appears to be invalid. You can try again later by
   visiting https://act.eff.org.

Теперь ваш SuiteCRM защищен с помощью SSL Let’s Encrypt. Вы можете получить к нему безопасный доступ по URL https://suitecrm.example.com.

Заключение

На этом все. Вы успешно установили SuiteCRM с Nginx и SSL Let’s Encrypt на Ubuntu 20.04. Теперь вы можете внедрить SuiteCRM в вашу организацию. Для получения дополнительной информации посетите руководство пользователя SuiteCRM.

Share: X/Twitter LinkedIn

Get new posts in your inbox

No spam. Unsubscribe anytime.