全部博文(36)
分类: LINUX
2010-04-08 16:59:55
Shop Operations Server Failure Recovery: In the event of a failure of the Shop Operations Server service, the service shall restart automatically on the same hardware. This shall be available for both Linux and Windows OS.
Steps on Linux OS:
1. Download the Shop Operations Server archive named ShopOperationsServerLinux.zip for Linux OS.
2. Extract the contents of ShopOperationsServerLinux.zip into the desired location with
3. Locate and run the configSosEnv.sh file in the
Run the configSosEnv.sh file,run the following command:
#cd
#chmod a+x configSosEnv.sh
# ./configSosEnv.sh
此步骤操作之后会在
4. Locate the wrapper.conf file in the conf subdirectory and open it using a text editor, update the java command property
------------------------------------------------------------------------------------------------------
wrapper.java.command=%JAVA_HOME%/bin/java
例如:
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
6. Locate the runSos.sh file in the bin subdirectory:
a. Copy the runSos.sh file to the /etc/init.d directory and rename it to runSos. Run the following commands:
# cd
# cp – a runSos.sh //etc/init.d /runSos
b. Update the following properties in /etc/init.d/runSos to fit your configuration.
APP_NAME=”runSos”
APP_LONG_NAME=”Rockwell Shop Operations Server”
APP_PATH=”
c. The Shop Operations Server can be started in background with the following command: (maybe you should use chkconfig to add it to service first, # chkconfig --add runSos)
# /etc/init.d/runSos start or # service runSos start
Or
# /etc/init.d/runSos start
7. Then you can open Services Configuration window in Linux by Main Menu -> System Settings -> Server Settings -> Service, and get the status of runSos service as the following Figure 1:
Or you can execute command:
# /etc/init.d/runSos status or # service runSos status
And get the status info as:
Rockwell Shop Operations Server is running (1774)
8. You can write some script which running under Linux system to check the runSos service is stopped.
a. The script is coding named autoRestart.sh as the attachment.
b. You can save the autoRestart.sh file to /bin of Linux PC.
c. Then you can use the following command to grant the execution privilege:
# chomod a+x /bin/autoRestart.sh
d. Add the script to the cron table service in the Linux system with the command:
# crontab –e
Edit and execute autoRestart.sh script every 10 minutes with:
0-59/10 * * * * /bin/autoRestart.sh
e. After you sace the crontab job,the script should work well. If your crontab worked abnomally, please restart the crontab service with the command:
# /etc/init.d/crond restart
8. After you finished configuring the above autoRestart.sh script to the Linux system, you can try to kill current runSos service process for pid=XXX with command:
# kill -9 XXX or # /etc/init.d/runSos stop
Or stop runSos service from Services Configuration window.
9. You can check the status of runSos service by command:
# /etc/init.d/runSos status or # service runSos status
And get the status info as:
Rockwell Shop Operations Server is not running
Or you can refresh the status from Services Configuration window as the following Figure 2:
10. After 10 minutes or so, you will check the status of runSos service by Service window as Figure 3
Or you can continue to check the status with command:
# /etc/init.d/runSos status or # service runSos status
And get the status info as:
Rockwell Shop Operations Server is running (3598)
That’s to say, runSos can be restart automatically after you configure the autoRestart.sh script to the Linux system.
Based on above steps, Shop Operations Server Failure Recovery works well for Linux OS after you configure the autoRestart.sh script to the PC.