WinCC OA as Linux Service

You can configure WinCC OA as service and start a project also when a user is not logged in (see also WinCC OA as service) under Linux just as under Windows. The PMON with the defined project will be started when the system is started.

If WinCC OA is used as service and SNMP is used, the user account that is used has to possess write rights to the directories <proj_path>/log and <proj_path>/db.

Under Linux, there are multiple possibilities to configure WinCC OA as service. We recommended to use the systemd service file.

systemd Service File

During the rpm installation of WinCC OA the file /etc/systemd/system/winccoa@.service is created. This file is only used by the following systemctl commands (and systemd). The projectName to be used is simply given as an "instance" name to it.

There is usually no need for a system integrator to change the file.

Activate Service

When a system integrator now wants to define a specific (already registered) WinCC OA project to be automatically started on system boot, he simply issues the following command:

systemctl enable winccoa@projectName

Deactivate Service

To disable such a configuration again, one issues:

systemctl disable winccoa@projectName

Manually Start Project

To start such a project manually:

systemctl start winccoa@projectName

Manually Stop Project

To stop such a project manually:

systemctl stop winccoa@projectName

Request Status

To request current status:

systemctl status winccoa@projectName

System Log

To view the systems log (journal):

journalctl

As seen above, the winccoa@.service file is not manually changed, but systemd manages to create symbolic links to that file which include the projectName.

Run Project for Specific User

It is often desired to execute a project with the authorizations of a specific operating system user. To do this, the system integrator needs to modify the service file manually and comment out the line

#User=

to set the desired user, to e.g.

User=winccoa
Note: If you do not have a default home directory, add an additional option to the service file under the [Service] section Environment="HOME=/path/to/desired/home/directory".

Project as a service with RDB

Note: Set the required environment variables with ldconfig, see chapter Set necessary environment variables for the libraries with ldconfig.

To run a WinCC OA Project as a service with RDB under Linux you have to define the following variables in the file /etc/systemd/system/winccoa@service

[Unit]
Description=WinCC OA project '%i'

[Service]
ExecStart=/opt/WinCC_OA/3.20/bin/WCCILpmon -proj %i
ExecStop=/opt/WinCC_OA/3.20/bin/WCCILpmon -proj %i -stopWait
Environment="ORACLE_HOME=/disc/oracle/product/19.3.0.0/Db_1"

[Install]
WantedBy=multi-user.target