El software swhosting-rpc
The swhosting-rpc software package is the API that is responsible for communicating and synchronizing the actions performed in SWPanel with your Cloud server.
The moment you perform any action in SWPanel, it will make a remote procedure call (RPC) to your Cloud requesting the swhosting-rpc program to execute the action.
Installation
To proceed with the installation of swhosting-rpc, we will first add the repository by executing the following commands:
cat >> /etc/apt/sources.list <<EOF
# SWHosting XML RPC
deb http://packages.swhosting.com/serveisweb stable non-free
EOF
Download the public key:
wget -O - http://packages.swhosting.com/serveisweb/swhosting.gpg.key|apt-key add -
Finally, we install:
apt-get install swhosting-rpc
It will show the list of packages to install, press the letter "y" and "Enter".
All SWPanel licensed servers deployed by SWHosting already have this package installed by default.
Upgrade
If at any time we need to upgrade this package, we will execute the following commands:
apt-get update
apt-get install swhosting-rpc
Or if you prefer, you can upgrade all packages:
apt-get update
apt-get upgrade
Be careful, this operation will update all the packages of your system. Proceed only if you know what you're doing...
Structure
The package generates two directories:
- Executables: /usr/local/SWHostingRPC/
- Logs and RPC configuration: /etc/swhosting-rpc/
Configuration and testing
We have the following configuration files:
-
RPC service: /etc/swhosting-rpc/swhosting-rpc/swhostingrpc.yml
- In this same directory you will find a sample configuration file: swhostingrpc.yml.sample
-
Log configuration: /etc/swhosting-rpc/log4perl.conf
-
You can check that everything is OK by running the script
/usr/local/SWHostingRPC/sbin/test.pl
If there are any errors, it will appear.
IMPORTANT: To edit the configuration files, use spaces and not tabs.
Troubleshooting
/etc/init.d/mysql status
- It is possible that you have modified at some point the password of the user "root" or "debian-sys-maint" and this change has not been reflected in the configuration file "swhostingrpc.yml".
> Remember that you can request the intervention of the Systems Engineering Area by opening a ticket for technical action.