billing:external:backend_cabinet

Кабинет на отдельном сервере

  • 1 CPU
  • 2 ядра
  • 2 ГБ ОЗУ
  • OS: Centos 8 / Debian 10

Для установки понадобится Ansible версии 2.7 или 2.8 или 2.9
Установим Ansible:

dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf install --enablerepo epel-playground ansible wget tar
apt-get install wget gnupg2 ansible python curl

Скачаем и распакуем установщик mikbill:

wget http://setup.2x.mikbill.pro/setup.tar.gz
tar zxf setup.tar.gz

Перейдем в директорию установки и запустим процесс установки:

cd setup
ansible-playbook cabinet.yml

Для соединения с основной базой, нужно создать внешнего пользователя в mysql:
В консоли базы данных выполнить

CREATE USER remote_stat@REMOTE_IP IDENTIFIED WITH mysql_native_password BY 'PASSWORD';
GRANT SELECT, EXECUTE ON mikbill.* TO remote_stat@REMOTE_IP;
GRANT SELECT, INSERT ON mikbill.logs_auth_cabinet TO remote_stat@REMOTE_IP;
GRANT SELECT ON mikbill.cabinet_news TO remote_stat@REMOTE_IP;
GRANT SELECT ON mikbill.bonus_shop TO remote_stat@REMOTE_IP;
GRANT SELECT, INSERT, UPDATE ON mikbill.bonus_users TO remote_stat@REMOTE_IP;
GRANT SELECT, INSERT, UPDATE ON mikbill.bonus_history TO remote_stat@REMOTE_IP;
GRANT SELECT, INSERT ON mikbill.cabinet_config TO remote_stat@REMOTE_IP;
GRANT SELECT, INSERT, UPDATE, DELETE ON mikbill.users TO remote_stat@REMOTE_IP;
GRANT SELECT, INSERT, UPDATE, DELETE ON mikbill.usersfreeze TO remote_stat@REMOTE_IP;
GRANT SELECT, INSERT, DELETE ON mikbill.ip_pools_pool_use TO remote_stat@REMOTE_IP;
GRANT SELECT, DELETE ON mikbill.usersblok TO remote_stat@REMOTE_IP;
GRANT SELECT, DELETE ON mikbill.usersdel TO remote_stat@REMOTE_IP;
GRANT SELECT, INSERT, UPDATE ON mikbill.tickets_tickets TO remote_stat@REMOTE_IP;
GRANT SELECT, INSERT, UPDATE ON mikbill.tickets_messages TO remote_stat@REMOTE_IP;
GRANT SELECT, INSERT, UPDATE ON mikbill.tickets_notes TO remote_stat@REMOTE_IP;
GRANT SELECT, INSERT ON mikbill.tickets_logs TO remote_stat@REMOTE_IP;
GRANT SELECT (`stuffid`, `login`) ON `mikbill`.`stuff_personal` TO remote_stat@REMOTE_IP;
GRANT SELECT, INSERT, UPDATE ON mikbill.bugh_uslugi_stat TO remote_stat@REMOTE_IP;
GRANT SELECT, INSERT ON mikbill.bugh_plategi_stat TO remote_stat@REMOTE_IP;
GRANT SELECT, INSERT ON mikbill.bugh_plategi_info TO remote_stat@REMOTE_IP;
GRANT SELECT, INSERT ON mikbill.bugh_perevod_stat TO remote_stat@REMOTE_IP;
GRANT SELECT, INSERT, UPDATE ON mikbill.bugh_cards_log TO remote_stat@REMOTE_IP;
GRANT SELECT, INSERT ON mikbill.mod_cards_errors TO remote_stat@REMOTE_IP;
GRANT SELECT, INSERT, UPDATE ON mikbill.mod_cards_cards TO remote_stat@REMOTE_IP;
GRANT SELECT, INSERT ON mikbill.sms_logs TO remote_stat@REMOTE_IP;
GRANT SELECT, INSERT ON mikbill.queue_messages TO remote_stat@REMOTE_IP;
GRANT SELECT, INSERT ON mikbill.queue_types TO remote_stat@REMOTE_IP;
GRANT SELECT, INSERT ON mikbill.logs TO remote_stat@REMOTE_IP;
GRANT SELECT, INSERT, UPDATE ON mikbill.dev_fields TO remote_stat@REMOTE_IP;
GRANT SELECT, INSERT, UPDATE, DELETE ON mikbill.services_users_pairs TO remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.event_system TO remote_stat@REMOTE_IP;
GRANT SELECT, UPDATE ON mikbill.radacctbras TO remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_liqpay TO remote_stat@REMOTE_IP;
GRANT SELECT, INSERT, DELETE ON mikbill.dev_user TO remote_stat@REMOTE_IP;
GRANT SELECT, INSERT, DELETE ON mikbill.ip_real TO remote_stat@REMOTE_IP;
GRANT SELECT, INSERT, UPDATE, DELETE ON mikbill.userscontacts TO remote_stat@REMOTE_IP;
GRANT SELECT, INSERT, UPDATE, DELETE ON mikbill.userscontacts_labels_data TO remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_liqpay to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_onpay to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_pscb to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_paymaster to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_robokassa to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_stripe to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_wqiwiru to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_paypal to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_paykeeper to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_ukrpays to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_yandex to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_yandex_money to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_uniteller to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_portmone to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_ipay to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_sberbankru_mrch to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_fondy to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_simplepay to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_cloudpayments to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_isbank to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_tinkoff to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_alfabankru to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_privat to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_privat24 to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_paysoft to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_ckassa to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_paymo to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_easypay to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_click to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_paysera to remote_stat@REMOTE_IP;
GRANT SELECT, INSERT, UPDATE ON mikbill.services_inclusions TO remote_stat@REMOTE_IP;
GRANT SELECT, INSERT, UPDATE ON mikbill.services_exclusions TO remote_stat@REMOTE_IP;
FLUSH PRIVILEGES;

Данные нужно указать в /var/mikbill/prod/config/stat.xml

Скрипт обновления находится по пути /var/mikbill/updates/stat/stat_update.sh

Создать директорию /var/mikbill/license и поместить туда файлы лицензии биллинга (serv.crt и client.key)

mkdir -p /var/mikbill/license

После чего запустить обновление повторно с ключем принудительного (force) обновления

bash /var/mikbill/updates/stat/stat_update.sh -f

2022-02-13: добавлены права:

GRANT SELECT, INSERT, UPDATE ON mikbill.bonus_users TO remote_stat@REMOTE_IP;
GRANT SELECT, INSERT, UPDATE ON mikbill.bonus_history TO remote_stat@REMOTE_IP;

2022-01-25: добавлены права:

GRANT SELECT, INSERT ON mikbill.queue_types TO remote_stat@REMOTE_IP;

2022-01-14: добавлены права:

GRANT SELECT, INSERT ON mikbill.cabinet_config TO remote_stat@REMOTE_IP;

2021-10-13: добавлены права:

GRANT SELECT, INSERT, UPDATE, DELETE ON mikbill.userscontacts TO remote_stat@REMOTE_IP;
GRANT SELECT, INSERT, UPDATE, DELETE ON mikbill.userscontacts_labels_data TO remote_stat@REMOTE_IP;

2021-09-14: добавлены права:

GRANT SELECT, INSERT, UPDATE, DELETE ON mikbill.ip_pools_packets_real TO remote_stat@REMOTE_IP;

2021-08-20: Обновление апдейтера.

2021-08-01: добавлены права:

GRANT SELECT, INSERT, DELETE ON mikbill.dev_user TO remote_stat@REMOTE_IP;

2021-07-12: добавлены права:

GRANT SELECT ON mikbill.cabinet_news TO remote_stat@REMOTE_IP;

2021-06-04: добавлены права:

GRANT SELECT, INSERT ON mikbill.bugh_plategi_info TO remote_stat@REMOTE_IP;

2021-04-15: добавлены права:

GRANT SELECT, INSERT ON mikbill.logs_auth_cabinet TO remote_stat@REMOTE_IP;

2021-02-15: добавлены права:

GRANT SELECT, INSERT, DELETE ON mikbill.ip_pools_pool_use TO remote_stat@REMOTE_IP;

2021-01-25: добавлены права:

GRANT SELECT, INSERT, DELETE ON mikbill.ip_real TO remote_stat@REMOTE_IP;

2020-12-30: добавлен UPDATE для прав:

GRANT SELECT, INSERT, UPDATE ON mikbill.bugh_cards_log TO remote_stat@REMOTE_IP;

2020-12-28: добавлены права

GRANT SELECT (`stuffid`, `login`) ON `mikbill`.`stuff_personal` TO remote_stat@REMOTE_IP;

2020-12-17: добавлены права

GRANT INSERT ON mikbill.addons_liqpay to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_onpay to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_pscb to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_paymaster to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_robokassa to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_stripe to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_wqiwiru to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_paypal to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_paykeeper to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_ukrpays to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_yandex to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_yandex_money to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_uniteller to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_portmone to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_ipay to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_sberbankru_mrch to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_fondy to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_simplepay to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_cloudpayments to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_isbank to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_tinkoff to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_alfabankru to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_privat to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_privat24 to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_paysoft to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_ckassa to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_payme to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_paymo to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_easypay to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_click to remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_paysera to remote_stat@REMOTE_IP;

2020-09-16: добавлены права

GRANT SELECT, INSERT ON mikbill.dev_user TO remote_stat@REMOTE_IP;
GRANT SELECT, INSERT, UPDATE ON mikbill.tickets_notes TO remote_stat@REMOTE_IP;
GRANT SELECT, INSERT ON mikbill.bugh_perevod_stat TO remote_stat@REMOTE_IP;

2020-09-10: добавлены права

GRANT INSERT ON mikbill.event_system TO remote_stat@REMOTE_IP;
GRANT SELECT, UPDATE ON mikbill.radacctbras TO remote_stat@REMOTE_IP;
GRANT INSERT ON mikbill.addons_liqpay TO remote_stat@REMOTE_IP;

2020-08-26: добавлены права

GRANT SELECT, INSERT, UPDATE, DELETE ON mikbill.services_users_pairs TO remote_stat@REMOTE_IP;

2020-08-20: добавлены права

GRANT SELECT, DELETE ON mikbill.usersblok TO remote_stat@REMOTE_IP;
GRANT SELECT, DELETE ON mikbill.usersdel TO remote_stat@REMOTE_IP;

2020-09-11: добавлены права

GRANT SELECT, INSERT, UPDATE, DELETE ON mikbill.tickets_notes TO remote_stat@REMOTE_IP;
GRANT SELECT, INSERT, UPDATE, DELETE ON mikbill.addons_pscb TO remote_stat@REMOTE_IP; (если используется платежная система на протоколе ПСКБ)
  • billing/external/backend_cabinet.txt
  • Последнее изменение: 7 нед. назад
  • Александр Дудяк