所以我为在 Centos 6.6 上运行的本地 endeca 11.1 环境创建了一个启动 bash 脚本:
#!/bin/sh
ENDECA_USER=endeca
ENDECA_BASE=/usr/local/endeca
GREEN='\e[32m'
NC='\e[39m'
source /usr/local/endeca/MDEX/6.5.1/mdex_setup_sh.ini
source /usr/local/endeca/PlatformServices/workspace/setup/installer_sh.ini
echo ER = $ENDECA_ROOT
usage() {
echo "Usage: ${0} (start|stop)"
}
case "${1}" in
start)
echo "Starting Endeca ..."
echo -ne "\n\n${GREEN}Starting MDEX Engine ... ${NC} \n\n"
${ENDECA_ROOT}/tools/server/bin/startup.sh
sleep 5
echo -ne "\n\n${GREEN}Starting Platform Services ... ${NC} \n\n"
${ENDECA_BASE}/PlatformServices/11.1.0/tools/server/bin/startup.sh
sleep 5
echo -ne "\n\n${GREEN}Starting Tools & Frameworks ... ${NC} \n\n"
${ENDECA_BASE}/ToolsAndFrameworks/11.1.0/server/bin/startup.sh
sleep 5
${ENDECA_BASE}/CAS/11.1.0/bin/cas-service.sh &
;;
stop)
echo "Shutting down Endeca ..."
${ENDECA_ROOT}/tools/server/bin/shutdown.sh
sleep 5
${ENDECA_BASE}/PlatformServices/11.1.0/tools/server/bin/shutdown.sh
sleep 5
${ENDECA_BASE}/ToolsAndFrameworks/11.1.0/server/bin/shutdown.sh
sleep 5
${ENDECA_BASE}/CAS/11.1.0/bin/cas-service-shutdown.sh
wait
echo "Endeca shutdown complete!"
;;
*)
usage
exit 2
esac
exit $?
该脚本在大多数情况下都有效,但有时会失败,我想检查 endeca 的正确启动顺序是什么,以及我的脚本是否需要等待每个组件启动才能启动下一个组件?
在此先感谢您的帮助。