All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opencms.rmi.package.html Maven / Gradle / Ivy

Go to download

OpenCms is an enterprise-ready, easy to use website content management system based on Java and XML technology. Offering a complete set of features, OpenCms helps content managers worldwide to create and maintain beautiful websites fast and efficiently.

There is a newer version: 17.0
Show newest version







The CmsRemoteShell allows to manipulate a running server using OpenCms shell commands.

Traditionally the CmsShell had to be run in a separate process. In case you have an OpenCms server running, this means that the server and the CmsShell would be 2 different processes with no shared runtime settings. So with the traditional CmsShell it is not possible to manipulate a running server.

Enter the CmsRemoteShell. This is an RMI based version of the CmsShell that is optionally started by the OpenCms server. If the CmsRemoteShell has been activated, it is possible to connect to the server and run a set of shell command in the server process.

The CmsRemoteShell can be accessed only from the server where the OpenCms instance is running. This is a security feature. The reasoning is that in case you do remote server management, you should already have an environment that allows you to trigger scripts on your OpenCms server in a secure way.

The CmsRemoteShell can be enabled in the opencms-system.xml configuration file. Insert this XML at the last position before the closing </system> tag:

    <shell-server enabled="true" port="1101" />
To call the CmsRemoteShell, use the following command:
    java -cp $OPENCMS_WEBAPP_DIR/WEB-INF/lib/opencms.jar org.opencms.rmi.CmsRemoteShellClient [options]
Description of options with examples:
-script=filename.txt
Runs the commands from filename.txt instead of reading commands interactively. Important: In case you run a script, make sure the last command in the script is exit, otherwise the shell will not terminate.
-registryPort=1101
The port to use for the RMI connection.
-additional=org.opencms.ocee.cluster.CmsClusterShellCommands
A class that provides additional shell commands.
Please note: All RFS paths in the scripts are resolved relative to the Tomcat working directory. Best use absolute root paths in your shell scripts. @since 11.0 @see org.opencms.rmi.CmsRemoteShell @see org.opencms.main.CmsShell




© 2015 - 2024 Weber Informatics LLC | Privacy Policy