Cookie | Duration | Description |
---|---|---|
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |
Шаг 1. Обновить систему
Перед установкой рекомендуется обновить систему
# sudo dnf -y update
Шаг 2. Установка PHP
# sudo dnf -y install yum-utils
# sudo dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
# sudo dnf -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
# sudo dnf module reset php
# sudo dnf module install php:remi-7.3
# sudo yum -y install wget php php-{pear,cgi,common,curl,mbstring,gd,mysqlnd,gettext,bcmath,json,xml,fpm,intl,zip,imap}
Проверяем установленную версию
$ php -v
PHP 7.3.23 (cli) (built: Sep 29 2020 08:33:03) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.23, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.23, Copyright (c) 1999-2018, by Zend Technologies
Увеличим время таймаута и максимальный размер файла для загрузки
$ sudo nano /etc/php.ini
upload_max_filesize = 20M
max_execution_time = 120
Установим правильного пользователя для запуска php-fpm сервиса
$ sudo nano /etc/php-fpm.d/www.conf
user = nginx
group = nginx
listen.mode = 0660
Запустим сервис
$ sudo systemctl enable –now php-fpm
Проверим
$ sudo systemctl status php-fpm
● php-fpm.service – The PHP FastCGI Process Manager
Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled; vendor preset: disabled)
Active: active (running) since Sat 2020-10-10 21:46:54 MSK; 1min 57s ago
Main PID: 11359 (php-fpm)
Status: “Processes active: 0, idle: 5, Requests: 0, slow: 0, Traffic: 0req/sec”
Tasks: 6 (limit: 11477)
Memory: 25.7M
CGroup: /system.slice/php-fpm.service
├─11359 php-fpm: master process (/etc/php-fpm.conf)
├─11360 php-fpm: pool www
├─11361 php-fpm: pool www
├─11362 php-fpm: pool www
├─11363 php-fpm: pool www
└─11364 php-fpm: pool www
Oct 10 21:46:54 web.itcom.local systemd[1]: Starting The PHP FastCGI Process Manager…
Oct 10 21:46:54 web.itcom.local systemd[1]: Started The PHP FastCGI Process Manager.
Шаг 3. Установка MariaDB и Nginx Web Server
$ sudo dnf -y install nginx
Установка MariaDB
Инструкция: Установка MariaDB
Создаем базу данных для SuitCRM
[sysadm@web ~]$ mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 19
Server version: 10.4.15-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
MariaDB [(none)]> CREATE DATABASE suitcrm;
Query OK, 1 row affected (0.001 sec)
MariaDB [(none)]> GRANT ALL ON suitecrm.* TO suitecrm@localhost IDENTIFIED by “Strong_DB_Password”;
Query OK, 0 rows affected (0.003 sec)
MariaDB [(none)]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.001 sec)
MariaDB [(none)]> QUIT
Bye
Шаг 4. Установка SuitCRM на CentOS 8
Проверим на сайте SUitCRM какой текущий релиз
Текущий 7.11.15
$ export VER=”7.11.15″
$ wget https://github.com/salesagility/SuiteCRM/archive/v${VER}.tar.gz
$ tar xvf v${VER}.tar.gz
Устанавливаем composer
$ wget https://getcomposer.org/installer -O composer-installer.php
$ sudo php composer-installer.php –filename=composer –install-dir=/usr/local/bin
[sudo] password for sysadm:
All settings correct for using Composer
Downloading…
Composer (version 1.10.13) successfully installed to: /usr/local/bin/composer
Use it: php /usr/local/bin/composer
$composer –version
Composer version 1.10.13 2020-09-09 11:46:34
$ cd SuiteCRM-${VER}
$ composer install
Копируем данные в каталог с сайтом
cd ..
sudo mkdir /var/www/html/suitecrm
sudo rsync -avv SuiteCRM-${VER}/ /var/www/html/suitecrm
Меняем владельца директории
sudo chown -R nginx:nginx /var/www/html/suitecrm
sudo chmod -R 766 /var/www/html/suitecrm
sudo semanage fcontext -a -t httpd_sys_rw_content_t “/var/www/html/suitecrm(/.*)?”
sudo restorecon -Rv /var/www/html/suitecrm/
Изменяем конфигурацию Nginx
$ sudo nano /etc/nginx/conf.d/suitecrm.conf
server {
server_name crm.example.com;
client_max_body_size 20M;
root /var/www/html/suitecrm;
location / {
try_files $uri /index.php;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php-fpm/www.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
error_log /var/log/nginx/suitecrm_error.log;
access_log /var/log/nginx/suitecrm_access.log;
location ~ /\.ht {
deny all;
}
}