1с 8.3.18.1208/PostgreSQL 12.4-1.1C/Ubuntu Server 20.04

сервер 1с

sudo su
apt update && apt dist-upgrade -y
apt install ssh htop mc vim samba -y && timedatectl set-timezone Europe/Moscow && timedatectl set-ntp on && apt install chrony net-tools -y
apt remove -y libicu66 && wget http://archive.ubuntu.com/ubuntu/pool/main/i/icu/libicu60_60.2-3ubuntu3.1_amd64.deb && dpkg -i libicu60_60.2-3ubuntu3.1_amd64.deb && apt-mark hold libicu60
sh -c 'echo "deb http://ru.archive.ubuntu.com/ubuntu/ bionic main universe" >> /etc/apt/sources.list'
apt update && apt install -y libwebkitgtk-3.0-0 libjavascriptcoregtk-3.0-0 libmagickwand-6.q16-6 libgsf-1-114 libkrb5-3 libgssapi-krb5-2 ttf-mscorefonts-installer librust-glib-sys-dev && sudo fc-cache –fv
apt-mark hold libwebkitgtk-3.0-0 libjavascriptcoregtk-3.0-0 libmagickwand-6.q16-6 libgsf-1-114 libkrb5-3 libgssapi-krb5-2 ttf-mscorefonts-installer librust-glib-sys-dev

Удаляю последнюю строку в файле /etc/apt/sources.list:

sudo dd if=/dev/null of=/etc/apt/sources.list bs=1 seek=$(echo $(stat --format=%s /etc/apt/sources.list ) - $( tail -n1 /etc/apt/sources.list | wc -c) | bc )
apt update && apt install -y  libllvm6.0 libllvm9 libllvm10 libc6-i386 make

Переходим в папку с загруженным и распакованным 1с-сервером

dpkg -i 1c-e*.deb
cp /opt/1cv8/x86_64/8.3.18.1208/srv1cv83 /etc/init.d/
cp /opt/1cv8/x86_64/8.3.18.1208/srv1cv83.conf /etc/default/srv1cv83
mkdir -p /home/usr1cv8/.1cv83/1C/1Cv83
chown -R usr1cv8:grp1cv8 /home/usr1cv8
echo -n > /etc/default/srv1cv83
/bin/su -c "echo 'SRV1CV8_PORT=1540' > /etc/default/srv1cv83"
/bin/su -c "echo 'SRV1CV8_REGPORT=1541' >> /etc/default/srv1cv83"
/bin/su -c "echo 'SRV1CV8_RANGE=1560:1691' >> /etc/default/srv1cv83"
/bin/su -c "echo 'SRV1CV8_DEBUG=0' >> /etc/default/srv1cv83"
/bin/su -c "echo 'SRV1CV8_DATA=/home/usr1cv8/.1cv83/1C/1Cv83' >> /etc/default/srv1cv83"
/bin/su -c "echo 'SRV1CV8_SECLEV=0' >> /etc/default/srv1cv83"
/bin/su -c "echo 'SRV1CV8_PINGPERIOD=1000' >> /etc/default/srv1cv83"
/bin/su -c "echo 'SRV1CV8_PINGTIMEOUT=5000' >> /etc/default/srv1cv83"
sudo chown -R usr1cv8:grp1cv8 /opt/1cv8
sudo echo -e "pass\npass\n" | sudo passwd usr1cv8
sudo usermod -aG sudo usr1cv8

Ставим HASP

mkdir /tmp/hasp && cd /tmp/hasp
wget https://it-admins.ru/downloads/haspd-modules_7.90-eter1ubuntu_amd64.deb
wget https://it-admins.ru/downloads/haspd_7.90-eter1ubuntu_amd64.deb
dpkg -i hasp*.deb && service haspd start

сервер PostgreSQL

sudo su
apt update && apt dist-upgrade -y
apt install ssh htop mc vim samba -y && timedatectl set-timezone Europe/Moscow && timedatectl set-ntp on && apt install chrony net-tools -y
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main" >> /etc/apt/sources.list.d/postgresql.list'
apt update -y && apt dist-upgrade -y
apt install -y  libllvm6.0 libllvm9 libllvm10 postgresql-common 
wget http://archive.ubuntu.com/ubuntu/pool/main/i/icu/libicu55_55.1-7_amd64.deb && dpkg -i libicu55_55.1-7_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0.0_1.0.2n-1ubuntu5_amd64.deb && dpkg -i libssl1.0.0_1.0.2n-1ubuntu5_amd64.deb

В 1-ом диалоге проверяем, что RU выбран и выбираем RU во втором

locale-gen en_US.UTF-8 && locale-gen ru_RU.UTF-8 && update-locale LANG=ru_RU.UTF8 && dpkg-reconfigure locales

Переходим в папку со скаченным дистрибом PostgreSQL от 1с

dpkg -i libpq5_12.4-1.1C_amd64.deb && dpkg -i postgresql*.deb
dpkg --list | grep 1C
dpkg -l | grep 1C | awk -F' ' '{print $2}' | sudo xargs apt-mark hold
sudo -u postgres psql -U postgres -c "alter user postgres with password 'СЛОЖНЫЙ_ПАРОЛЬ_ПОЛЬЗОВАТЕЛЯ_postgres';"
sudo cp /etc/postgresql/12/main/postgresql.conf /etc/postgresql/12/main/postgresql.conf.bak
sudo vi /etc/postgresql/12/main/pg_hba.conf

меняем
local all postgres peer
на
local all postgres md5

sudo vi /etc/postgresql/12/main/postgresql.conf

подставляем в зависимости от уровня параноидальности разрешенные адреса / диапазоны
listen_addresses = '*'

reboot now

после перезагрузки проверяем, что порты слушают

netstat -tulpn | grep postgres
	tcp        0      0 0.0.0.0:5432            0.0.0.0:*               LISTEN      930/postgres
	tcp6       0      0 :::5432                 :::*                    LISTEN      930/postgres

и то, что сервер запущен

systemctl status postgresql
		● postgresql.service - PostgreSQL RDBMS
		Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled)
		Active: active (exited) since Thu 2020-12-17 10:20:41 MSK; 1min 32s ago
		Process: 1169 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
		Main PID: 1169 (code=exited, status=0/SUCCESS)

IT-admins

IT-admins

info@it-admins.ru


IT-admins © 2020