Установка и настройка сервер 1С:Предприятие сервер на Debian 10

aside

Инструкция по установки серверную часть 1С:Предприятие на GNU/Linux на примере дистрибутива Debian 10 GNU/Linux.

HASP License Manager установка и настройка

HASP LIcense Manager – Менеджер аппаратных лицензий 1C:Предприятие.

для начало нужно скачать deb-пакеты

# wget http://ftp.etersoft.ru/pub/Etersoft/HASP/stable/x86_64/Ubuntu/16.04/haspd-modules_7.90-eter2ubuntu_amd64.deb
# wget http://ftp.etersoft.ru/pub/Etersoft/HASP/stable/x86_64/Ubuntu/16.04/haspd_7.90-eter2ubuntu_amd64.deb

Далее устанавлеваем библиотеку C для 32-битоной системы

# apt update
# apt install make -y libc-i386
# apt install gdebi

Теперь устанавливаем сам HASP ML

# gdebi haspd-modules_7.90-eter2ubuntu_amd64.deb -n
# gdebi haspd_7.90-eter2ubuntu_amd64.deb

После настраиваем автозапуск демона на сервере.

# systemctl enable haspd

Теперь разрешаем доступ только к определенным IP в легальной сети добавляя строку в конфиг-файл /etc/haspd/hasplm.conf

NHS_IP_LIMIT 192.168.1.1 127.0.0.1 192.168.1.2-250

PostgreSQL Pro от 1С установка и настройка

Проверяем обновления и обновляем пакетов системы.

# apt update && apt upgrade

Настраиваем локаль системы

# dpkg-reconfigure locales

проверяем локаль

# locale -a
C
C.UTF-8
POSIX
ru_RU.utf8

Скачиваем скрипт для добавления репозитория PostgreSQL для 1С

$  wget https://repo.postgrespro.ru/pg1c-12/keys/apt-repo-add.sh

Запускаем скрипт и обновляем репозитории

# ./apt-repo-add.sh
# apt update

Устанавливаем PostgreSQL Pro

# apt install postgrespro-1c-12
# apt install postgrespro-1c-12-contrib
# apt install postgrespro-1c-12-client

# /opt/pgpro/1c-12/pg-setup initdb
# /opt/pgpro/1c-12/pg-setup service enable
# /opt/pgpro/1c-12/pg-setup service start

Установка и настройка 1С:Предприятие сервер

Для начало скачиваем с сайта https://releases.1c.ru/total архив deb64_8_3_19_1150.tar.gz

Распаковываем архив

$ tar xzf deb64_8_3_19_1150.tar.gz

И устанавливаем1

# gdebi 1c-enterprise83-common_xx.x.xx.xxxx.deb -n
# gdebi 1c-enterprise83-server_xx.x.xx.xxxx.deb -n
# gdebi 1c-enterprise83-ws_xx.x.xx.xxxx.deb -n
# gdebi 1c-enterprise83-common-nls_xx.x.xx.xxxx.deb -n
# gdebi 1c-enterprise83-server-nls_xx.x.xx.xxxx.deb -n
# gdebi 1c-enterprise83-ws-nls_xx.x.xx.xxxx.deb -n   

скичиваем deb-пакет с инсталлятором шрифтами с Microsoft

$ wget http://ftp.ru.debian.org/debian/pool/contrib/m/msttcorefonts/ttf-mscorefonts-installer_3.8_all.deb

И устанавливаем

# gdebi ttf-mscorefonts-installer_3.8_all.deb -n
# fc-cache-fv

Настраиваем 1С:Предприятие сервер автозапуск как сервис Linux

Создаем в папке /etc/systemd/system/ файл srv1cv83@.service

Открываем в редакторе например nano

# nano /etc/systemd/system/srv1cv83@.service

и вводим то что представлено ниже

[Unit]
Description=1C:Enterprise Server 8.3 (%I)
Requires=network.target

[Service]
Type=simple
User=usr1cv8
Group=grp1cv8

# Path to directory with claster data
Environment=SRV1CV8_DATA=/home/usr1cv8/.1cv8/1C/1cv8/

# Number of the cluster port created by default during first
# launch of ragent
Environment=SRV1CV8_PORT=1540

# Number of cluster agent main port. This port is used by the
# cluster console to address the central server. Cluster agent
# port is also specified as the IP port of the working server.
Environment=SRV1CV8_REGPORT=1541

# Port range for connection pool
Environment=SRV1CV8_RANGE=1560:1591

# Security level:
# 0 - unprotected connections
# 1 - protected connections only for the time of user
#    authentication
# 2 - permanently protected connections
Environment=SRV1CV8_SECLEV=0

# 1C:Enterprise server configuration debug mode
# blank - default - debug mode is off
# -debug - debug mode is on
#
Environment=SRV1CV8_DEBUG=

# Check period for connection loss detector, milliseconds
Environment=SRV1CV8_PING_PERIOD=1000

# Response timeout for connection loss detector, milliseconds
Environment=SRV1CV8_PING_TIMEOUT=5000

# 1C:Enterprise server keytab file.
# default - usr1cv83.keytab file in 1C:Enterprise server
#          installation directory
Environment=KRB5_KTNAME=/opt/1cv8/x86_64/%I/usr1cv8.keytab

ExecStart=/bin/sh -c "/opt/1cv8/x86_64/%I/ragent -d ${SRV1CV8_DATA} -port ${SRV1CV8_PORT} -regport ${SRV1CV8_REGPORT} -range ${SRV1CV8_RANGE} \
-seclev ${SRV1CV8_SECLEV} -pingPeriod ${SRV1CV8_PING_PERIOD} -pingTimeout ${SRV1CV8_PING_TIMEOUT} ${SRV1CV8_DEBUG}"
Restart=always
RestartSec=5

[Install]
DefaultInstance=current
WantedBy=multi-user.target

Теперь что бы запустить нужно будет вводить нужно вводить1

# systemctl enable srv1cv83@xx-x-xx-xxxx # добавляем сервис в автозапуск
# systemctl start srv1cv83@xx-x-xx-xxxx # запускаем сервес

  1. xx-x-xx-xxxx – версия пакетов

Поделиться ссылкой: