Installing 1C:Enterprise 8 platform on Linux
Before the installation, download the distribution packages that you will need later. In this example, we will install:
- Server 1C:Enterprise 64-bit version 8.3.13.1644.
The installation packages are available here:
- Debian: https://releases.1c.ru/version_file?nick=Platform83&ver=8.3.13.1644&path=Platform\8_3_13_1644 \deb64_8_3_13_1644.tar.gz
- RPM: https://releases.1c.ru/version_file?nick=Platform83&ver=8.3.13.1644&path=Platform\8_3_13_1644 \rpm64_8_3_13_1644.tar.gz
If HASP dongles are used for the server, the HASP protection driver must be installed on the server. You can download the latest versions for various operating systems here:
http://ftp.etersoft.ru/pub/Etersoft/HASP/last/
If you plan to use and manage 1C:Enterprise server on other computers running Linux, make sure that the IP address of the computer on which the server is located will be correctly resolved in its hostname. Open the server console as root and get the computer address:
ifconfig
You can get the computer name as follows:
hostname -f
Now put the data on the correspondence between the IP address and the name in the hosts files of the computers from which connections to the server cluster will be established:
IP-address hostname.local hostname
On Windows, it is usually located here:
%windir%\system32\drivers\etc\hosts
On Linux:
/etc/hosts
- Otherwise, an error will occur when establishing a client connection to the cluster workflow.
Installing the platform on Debian systems using Ubuntu Server 16.04 as an example
- Open the server console as root.
- Create a directory where you will place (in any convenient way) the downloaded archive with Deb packages for.
mkdir -p /1c/soft/1c
- Go to the /1c/soft/1с directory:
cd /1c/soft/1c
Unpack the archive using the tar xzf command:
tar xzf deb64_8_3_13_1644.tar.gz
- To install the packages, it is best to use the gdebi utility. If it is not installed, you can install it using the following command:
apt-get –y install gdebi
Install 1C:Enterprise server:
gdebi 1c-enterprise83-common_8.3.13-1644_amd64.deb gdebi 1c-enterprise83-server_8.3.13-1644_amd64.deb gdebi 1c-enterprise83-ws_8.3.13-1644_amd64.deb gdebi 1c-enterprise83-common-nls_8.3.13-1644_amd64.deb gdebi 1c-enterprise83-server-nls_8.3.13-1644_amd64.deb gdebi 1c-enterprise83-ws-nls_8.3.13-1644_amd64.deb
The last three nls packages contain language files and must be installed only if languages other than Russian and English are used.
They will be installed to the /opt/1C/v8.3/x86_64 directory.
- For applications to work correctly, install fonts from
Microsoft Core Fonts:
apt-get -y install ttf-mscorefonts-installer
For the system to see the installed fonts, run the following command:
fc-cache –fv
- Install the additional external libraries:
apt-get install libfreetype6 libgsf-1-common unixodbc glib2.0
- Start the service:
- Open the console as root.
- Create a directory where you will place (in any convenient way) the downloaded archive with RPM packages for installing 1C:Enterprise server.
mkdir -p /1c/soft/1c
- Go to the /1c/soft/1с directory.
cd /1c/soft/1c
Unpack the archive:
tar xzf rpm64_8_3_13_1644.tar.gz
- Install the packages extracted from the archive:
yum install *
- In this example, all packages will be installed, but if you do not plan to use languages other than Russian and English in your system, you do not need to install nls packages since they contain only language files.
The x86_64 packages will be installed to the /opt/1C/v8.3/x86_64 directory.
- For applications to work correctly, install fonts from
Microsoft Core Fonts
Download the package files from the SourceForge server in any convenient way
(for example, using wget):
http://sourceforge.net/projects/corefonts/files/the%20fonts/final/
Download all .exe files except wd97vwr32.exe.
Rename all downloaded .exe files by assigning them the .zip extension. Then unpack them and delete everything except the files with the .ttf extension. These are font files.
Copy the font files (.ttf files) to the /usr/share/fonts/truetype/ directory.
For the system to see the installed fonts, run the following command:
fc-cache –fv
- Install the additional external libraries:
yum install fontconfig freetype libgsf unixODBC
- Start the service:
systemctl start srv1cv83
You can check the progress using the following command:
systemctl status srv1cv83
It will be checked if the service is running (Starting 1C:Enterprise 8.3 server: OK), and the detailed status of the service will be displayed.
To check whether the cluster processes are running, use the following command:
ps ax | grep "1C/v8.3"
Let's move on to installing the HASP driver. For this example, download the driver at:
http://ftp.etersoft.ru/pub/Etersoft/HASP/last/x86_64/CentOS/7/haspd-7.60-eter1centos.x86_64.rpm
To install the driver, do the following:
- Create the /1c/soft/hasp directory:
mkdir -p /1c/soft/hasp
- In this directory, place the downloaded driver installation package in any convenient way and go to it:
cd /1c/soft/hasp
- Since the driver uses 32-bit libraries, install them:
yum install glibc.i686
- Install the driver:
yum install *
- Start the HASP protection driver:
systemctl start haspd
You can check the status as follows:
systemctl status haspd
Installation FAQs
1C:Enterprise 8 platform on Linux
"Library not found…" errors occur
- Depending on your Linux distribution package and system functionality, for the correct operation of 1C:Enterprise, you may need to additionally install external libraries yourself.
Note that the documentation specifies the library name, not the package name. The name of the package that it is included in may differ in different distribution packages. As a rule, you can find which packages include the library in the repository for your OS.
How do I start the server in debug mode?
To make debugging available on the server, start it with the –debug key. To do this, first stop 1C:Enterprise server:
systemctl stop srv1cv83
IMPORTANT! Do not edit the server startup parameters while it is running. This may cause errors when restarting it.
Now you need to edit its startup parameters in the srv1cv83 configuration file (in this example, using the vim editor):
vim /etc/sysconfig/srv1cv83
Find the SRV1CV8_DEBUG= string in the file being edited, remove the comment character # at the beginning of this string, and set the value of the SRV1CV8_DEBUG variable to 1:
SRV1CV8_DEBUG=1
Save the changes and exit the file.
Restart 1C:Enterprise 8 server:
systemctl restart srv1cv83
Where is the server cluster data directory and how do I change it?
By default, the cluster directory is located in the directory of the user on whose behalf 1C:Enterprise server is started – $HOMEDIR/.1cv83/1C/1Cv83. For example:
/home/usr1cv8/.1cv8/1C/1cv8
To change the location, change the SRV1CV8_DATA startup parameter in the /etc/sysconfig/srv1cv83 configuration file.
IMPORTANT! Make sure that the user on whose behalf the server is running has rights to the cluster data directory. You can see the rights using the following command:
ls -la /cluster_data
You can grant the rights as follows:
chown -R usr1cv8 /cluster_data
- The /etc/sysconfig/srv1cv83 configuration file also specifies the ports on which cluster processes will run and other startup parameters.
How do I set up the server technological log on Linux?
On the server, create directories where log files will be placed:
mkdir -p /var/log/1c/logs
Create the /opt/1C/v8.3/x86_64/conf directory for log settings:
mkdir -p /opt/1C/v8.3/x86_64/conf
Put the logcfg.xml file in this directory with the following content as an example:
<?xml version="1.0" encoding="UTF-8"?> <config xmlns="http://v8.1c.ru/v8/tech-log"> <log history="24" location="/var/log/1c/logs"> <event> <ne property="name" value=""/> </event> <property name="all"/> </log> </config>
- In this case, a complete technological log is collected (do not do this on an ongoing basis in production). The log files are stored for 24 hours. They will be located in the /var/log /1c/logs directory.
IMPORTANT! Grant the user on whose behalf 1C:Enterprise server is running the rights to write to the log directory. See an example in the figure below.
Create the grp1clogs user group that will be given the rights to the log:
groupadd grp1clogs usermod -a -G grp1clogs www-data usermod -a -G grp1clogs usr1cv8
Give this group the rights to the log directories:
chown -R usr1cv8:grp1clogs /var/log/1c chmod g+rw /var/log/1c
Why are dumps not generated if their collection is configured in logcfg.xml?
By default, dump generation is disabled on Linux. To configure dump collection, logcfg.xml is NOT used. It is carried out in the OS.