<< Click to Display Table of Contents >> Navigation: Multi-Protocol MasterOPC Server > The Linux runtime system > Install > Running |
The OPC server can be run as an application and as a service. We recommend first running it as an application, making sure that the OPC is functional and the data is visible, and then registering it as a service.
To run OPC as an application, run the file startmpsrt.sh with the command:
./startmpsrt.sh
If the run is successful, the terminal screen will display a success message once per second. You can terminate the run with Ctrl + C in English.
Let's check the connection to our server with UA Expert. Run UA Expert and click on the button with a plus sign.
In the window that appears in Custom Discovery double click on the field < Double click to Add Server >, and in the window that appears, enter the IP address and port. In the demolinux.mbp configuration the port is 55000.
Click on OK, and expand the server group that appears. Select the connection type None and click OK.
Click Connect.
This will display a window with a message that the certificate is untrusted - click Trust Server Certificate and then Continue.
The server tag tree will load. Drag out the tags you want (group selection and drag-and-drop are supported):
If the values are displayed, then you have configured everything correctly and the server is functioning. Now you should register this OPC as a service.
Disconnect from the OPC server from UA Expert (context menu - Disconnect) and stop the server in the terminal using the Ctrl+C command.
First, you must copy the file mpsrt.service from the folder mpsrtfolder to the folder /lib/systemd/system. Since placing the files in the lib folder requires superuser privileges, you can not do this through WinSCP - you must do it with the terminal command cp
sudo cp /home/igor/progs/mpsrtfolder/mpsrt.service /lib/systemd/system
where /home/igor/progs/mpsrtfolder/mpsrt.service is the copied file and /lib/systemd/system is the destination folder, the sudo operator says that the command must be executed as root.
After entering the password, the file will be copied.
Now you need to run the command:
sudo systemctl daemon-reload
This command causes the service system to restart.
The service is now configured and can be operated. The commands are for this purpose:
•Run service:
sudo systemctl start mpsrt
•Check service status:
sudo systemctl status mpsrt
•Stop service:
sudo systemctl stop mpsrt
•Restart service:
sudo systemctl restart mpsrt
•Set the service to autostart:
sudo systemctl enable mpsrt
•Remove the service from the autostart:
sudo systemctl disable mpsrt
We recommend that you start the service and then place it in the autostart. After that the service will function all the time.
If you want to register OPC as an application again, stop the service and then run the application with the command ./startmpsrt.sh.
Now that the OPC server is installed and running, you can download to it the working configuration. This will be described in the next section.