Environment Variable Check
When X-PUSH is run, set_xpush.bat is called from the startup.bat for Windows, and set_xpush.sh is called from startup.sh for Unix/Linux. set_xpush is a script that sets the environment variables JAVA_HOME and XPUSH_HOME before running X-PUSH. It applies changes to the environment variables (e.g. path) by modifying the script without having to change the system settings.
Windows: set_xpush.bat
The below image is an example of modifying the set_xpush.bat file in Windows.
"rem JAVA_HOME" was changed to "set JAVA_HOME," and the JDK installation path was set as JAVA_HOME. The XPUSH_HOME settings are the same, and the current path for X-PUSH is set. When using the Windows service, set the JSEXE environment variables depending on 32bit/64bit JDK.
Be sure to exclude the final backslash "\" when setting "C:\xpush-2.8.0" as the XPUSH_HOME environment variable value.
Unix/Linux: set_xpush.sh
The below image is an example of modifying the set_xpush.sh file in Unix/Linux.
"#JAVA_HOME" was changed to "export JAVA_HOME," and the JDK installation path was set as JAVA_HOME. The XPUSH_HOME settings are the same, and the current path for X-PUSH is set.
Service Registration/Termination
To register as a service in Windows operating systems, go to "XPUSH_HOME/bin" and run the "install_as_service.bat" file as shown in the figure below.
Be sure to run as an administrator.
The following image shows the confirmed service registration.
To terminate a registered service, go to "XPUSH_HOME/bin" and run the "uninstall_from_service.bat" file as shown in the figure below.
Startup
To start X-PUSH, execute the "startup.bat" or "startup.sh" script from "$XPUSH_HOME/bin"
Windows: startup.bat
Unix/Linux: startup.sh
DB/SSL Encryption startup
A command with the additional key value is run to operate X-PUSH with encrypted DB/SSL information.
The key value must be set to 7 characters or less.
If both DB and SSL certificate are encrypted, the key value must be set the same.
shutdown
To shut down X-PUSH, execute the "shutdown.bat" or "shutdown.sh" script from "$XPUSH_HOME/bin"
Windows: shutdown.bat
The "shutdown.bat" script is run with the following parameters:
Parameter | Description |
---|---|
host | X-PUSH server IP address |
port | X-PUSH admin port. (Default value: 50003) |
id | Admin ID |
password | Admin password |
shutdown.bat localhost 50003 id pw
Unix/Linux: shutdown.sh
Log in with the account used to install the X-PUSH Server, and then go to the "$XPUSH_HOME/bin" directory.
The "shutdown.sh" script is run with the following parameters:
Parameter | Description |
---|---|
host | X-PUSH server IP address |
port | X-PUSH admin port. (Default value: 50003) |
id | Admin ID |
password | Admin password |
./shutdown.sh localhost 50003 id pw
Post-Installation Operational Check
You can check the installation and normal operation of an X-PUSH Server using the sample included with the deployment copy.
X-PUSH Server Run
Start X-PUSH by executing "startup.bat" in Windows or "startup.sh" in Unix/Linux.
Port Check
Use the "netstat" command to verify ports used by X-PUSH.
Port | Service | Remarks |
---|---|---|
50000 | WebPublisher Service | Required |
50001 | Publisher Service | Required |
50002 | Provider Service | Required |
50003 | Monitor Service | Required |
50005 | JMX Service | Elective |
50006 | JMX Service | Elective |
50007 | Node Service | Required |
Running Message Client Script
Move to $XPUSH_HOME\bin and run it.
I:xpush-2.8.0\bin> run_client_demo_version_3_push.bat localhost 50001 PRO#1 id pw
Message Type | Script Name |
---|---|
Generic/reliable client | run_client_demo_version_3_push.bat/sh |
are to receive messages by running the script.
Running Message Supply Script
Move to $XPUSH_HOME\bin and run it.
Message Type | Script Name |
---|---|
Generic message | run_provider_demo_2_Push.bat/sh |
Reliable message | run_provider_demo_2_Reli.bat/sh |
Move to $XPUSH_HOME\bin and run the generic message provider.
C:\xpush-2.5.1\bin>run_provider_demo_2_Push.bat localhost 50002 PRO#1 tobesoft xpush C:\xpush-2.5.1\bin>run_provider_demo_2_Push.sh localhost 50002 PRO#1 tobesoft xpush
Receiving Message
When the message is provided, the message is pushed to the client by the X-PUSH server. You can see that the message has been received as shown in the following figure.