Successful attempt to install PostgresPro-Std-16 on Raspberry PI 5 for 1C

Greetings, colleagues!

I am engaged in 1C development, therefore, regularly, on weekends, I research various options for deploying 1C servers for development (various versions or combinations)

This time I decided to conduct an experiment with Raspberry PI 5. By this time I had deployed a data storage server for several versions of 1C on it, published via apache2, and a file development base, published via apache2.

I decided to add a client-server architecture for access from the workplace to import a project into EDT. To do this, deploy the 1C 8.3.24.1548 server and the PostgresPro-std-16 server.

The process is described below.

Installing Postgres* on ubuntu 22.04 ARM64

Platform configuration: ARM64 architecture, BCM2712Cortex-A76, 2.4 GHz * 4 cores, LPDDR4X-4267 SDRAM 8GB, VideoCore VII graphics, 800 MHz OpenGL ES 3.1, Vulkan 1; installed SSD Class 10 64Gb + USB3 SSD Netac 256 (560 reading, 530 writing).

For installation in a test environment based on Proxmox 8 for Raspberry Pi created an Ubuntu 22.04 container, place the virtual disk on a USB-SSD disk (in my Proxmox system it is mounted /opt and configured as a storage for virtual machine disks and container disks). Since the container does not have an OpenSSH server installed, I additionally install everything necessary using the browser console to the Proxmox container.

apt update && apt upgrade -y
apt install -y wget curl mc openssh-server
systemctl enable --now sshd
reboot

I copy the instructions for installing PostgresPro-Std-16 from the manufacturer's website for the aarch64(arm64) architecture, having previously logged into my account. I will not provide them here, but I will mention that before starting the installation, you must specify the ru_RU.UTF8 locale, otherwise 1C will not be able to create a database in postgres:

dpkg-reconfigure locales

In the wizard, select the necessary locales using the checkbox, usually these are en_EN.UTF8 and ru_RU.UTF8, other locales can be disabled. I always set ru_RU.UTF8 as the default.

Creating a PostgresPro database for 1C

After installation and autorun configuration, I recommend creating a database not on the default path in /var/lib/pgpro, but on a separate virtual disk, which will be convenient for backup, for example. I make /opt an additional mount point, then I edit the file /etc/defaults/postgrespro-std-16 with the only line “PGDATA=/opt/pgdata-16”. Attention, the directory “/opt/pgdata-16” should not exist at the time of creation, it will be created and will have the rights postgres:postgres to write, read, run. I create the database with the command below:

/opt/pgpro/std-16/bin/pg-setup initdb --tune=1c

Usually everything goes without errors. If there are errors, I read them carefully and correct them.

Since there is no postgres user in the ubuntu 22.04 container, but only root, I set the password for the postgres user as follows:

  1. I go to the database directory, in my example it is “/opt/pgdata-16”

  2. I edit the file “/opt/pgdata-16/pg_hba.conf” like this:

Замена: 
local   all             all                                     peer
# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
# IPv6 local connections:
host    all             all             ::1/128                 md5
#
На 
local   all             all                                     trust
# IPv4 local connections:
host    all             all             127.0.0.1/32            trust
# IPv6 local connections:
host    all             all             ::1/128                 trust
#
systemctl restart postgrespro-std-16
  1. I log in as postgres

psql -U postgres -w -h 127.0.0.1

After which I can set the password for the postgres user with the command:

ALTER USER 'postgres' WITH PASSWORD 'StrongPass123-$';

I always put a semicolon, otherwise the interpreter will consider that the command is not completed and wait for it to continue.

  1. Returning “/opt/pgdata-16/pg_hba.conf” to its original state

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     peer
# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
# IPv6 local connections:
host    all             all             ::1/128                 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
local   replication     all                                     peer
host    replication     all             127.0.0.1/32            md5
host    replication     all             ::1/128                 md5
host            all             all             0.0.0.0/0       md5

Done, ready to use

The idea was the following – take a couple of such Raspberries and deploy a Postgres Server on one, a 1C server with web publications on the other and test such a configuration on a combat UT11.5 base, load it with tasks. According to my estimates, it should work for 35 people.

Hidden text

Installing 1C server step by step:

  1. Download and place in another container similar to the one described above, with updated repo and installed ssh – server 1C distribution of the required release of ARM64 architecture for DEB-based (ubuntu, debian) operating systems. If web publication is planned, then it is necessary to install the 1C client (not thin, but regular)

  2. Select all *.deb distributions from the archive that do not have nsl in the name and copy them to a separate directory, mine is /opt/dst/8.3.24.1548.installdir

Если в каталоге есть файл: "v8-install-deps.sh" запускаем его на выполнение:
/bin/bash /opt/dst/8.3.24.1548.installdir/v8-install-deps.sh
apt install /opt/dst/8.3.24.1548.installdir/*.deb
  1. We delete the file “libstdc++.so.6” in the directory of the installed 1C, then we add a link to the system file there:

rm /opt/1cv8/arm64/8.3.24.1548/libstdc++.so.6
mklink /usr/lib/aarch64-linux-gnu/libstdc++.so.6.0.30 
может быть изменена версия в следующих релизах ОС, поэтому ищем файл "libstdc++.so.6" в каталоге "/usr/lib/aarch64-linux-gnu" и смотрим на что ссылается
  1. Link 1C services in systemctl and enable autostart

systemctl link /opt/1cv8/arm64/8.3.24.1548/srv1cv8-8.3.24.1548@.service
systemctl link /opt/1cv8/arm64/8.3.24.1548/ras-8.3.24.1548.service
ВИМАНИЕ, тут запускается дефолтный сервер 1С а не @.service. Будьте внимательны
systemctl enable --now srv1cv8-8.3.24.1548@default ras-8.3.24.1548.service
reboot
  1. If you plan to publish databases, install apache2 + xrdp (for ease of publication)

apt install -y xrdp xfce4 apache2
systemctl enable --now xrdp 
(возможно,если при подключеии RDP выдает черный экран, придется добавить пользователя xrdp в группу ssl-cert)
adduser xrdp ssl-cert

In this case, database publication will occur from the RDP session of the 1C server from the root user using the 1C client and restarting apache2 after publication. Publication directories must have access rights www-data:www-data 0766

As a result, after loading, the 1C server works and it is possible to manage it.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *