#!/bin/bash
#
# install 7.0 Client Service.
#
. ./func.sh
. ./os.sh
. ./multiusercmn.sh
SELF_IP=""
SERVER_IP=""
LANGUAGE=""
CDP_INSTALL=1
FORCEINSTALL="unforce"
OPER_NAME=""
SSL="y"
SERVICE_FILE_NAME=`ls *ClientService* | grep -Ev origin 2>/dev/null`
PRODUCT_TYPE=`cat $OEM_FILE 2>/dev/null | grep Name= | awk -F '=' '{print $2}'`
UpdateMode="No"
if [ $# -ge 7 ]
then
if [ "$7" == "update" ] || [ "$7" == "migrate" ]
then
UpdateMode="Yes"
fi
fi
Help ()
{
echo "Install Client Service maybe need parameters."
echo "param1: Local IP (necessary)"
echo "param2: Server IP (necessary)"
echo "param3: Language: Chinese/English (necessary)"
echo "param4: CDP-INSTALL: volume_cdp/no_volume_cdp (necessary)"
echo "param5: Force install: unforce/force (necessary)"
if [ "${PRODUCT_TYPE}" == "Cloud" ] && [ ${PRODUCT_NAME} != "CDM" ]; then
echo "param6: SSL-enable: y/n (necessary)"
echo "param7: Operator Username (necessary)"
echo "example: ./install.sh 1.1.1.1 2.2.2.2 Chinese volume_cdp force y zhangsan"
elif [ "${PRODUCT_TYPE}" != "Cloud" ] && [ ${PRODUCT_NAME} != "CDM" ];then
echo "param6: SSL-enable: y/n (necessary)"
echo "example: ./install.sh 1.1.1.1 2.2.2.2 Chinese volume_cdp force y"
elif [ "${PRODUCT_TYPE}" != "Cloud" ] && [ ${PRODUCT_NAME} == "CDM" ];then
echo "example: ./install.sh 1.1.1.1 2.2.2.2 Chinese volume_cdp force"
else
ShowError "Wrong PRODUCT"
exit 1
fi
}
CheckVipLang()
{
if [ "$1" == "nocheck" ];then
return 0
fi
export LD_LIBRARY_PATH=${APP_PATH}:${APP_PATH}/lib64:$LD_LIBRARY_PATH
SERVER_Lang=`./deployTool --ip ${SERVER_IP} --port 9614 --detectTime 60 --sourceIp ${SERVER_IP} | grep language | awk -F ':' '{print $2}'`
SERVER_Version=`./deployTool --ip ${SERVER_IP} --port 9614 --detectTime 60 --sourceIp ${SERVER_IP} | grep version | awk -F ':' '{print $2}'`
CLIENT_Version=`cat ../VersionDetails | grep Name | awk -F '-' '{print $3}'`
if [ "${SERVER_Lang}" == "zh-hans" ];then
SERVER_Lang=Chinese
else
SERVER_Lang=English
fi
if [ -z "${SERVER_Version}" ] || [ -z "${SERVER_Lang}" ];then
ShowInfo " Unable to get language or version information,do you want to install?y/n"
read Install_continue
if [[ "${Install_continue}" = "y" || "${Install_continue}" = "Y" || "${Install_continue}" = "yes" || "${Install_continue}" = "YES" ]]; then
return 0
elif [[ "${Install_continue}" = "n" || "${Install_continue}" = "N" || "${Install_continue}" = "no" || "${Install_continue}" = "NO" ]]; then
exit 1
else
ShowError "Invalid Input"
exit 1
fi
fi
if [ "${SERVER_Version%.*}" != "${CLIENT_Version}" ] || [ "${SERVER_Lang}" != "${LANGUAGE}" ];then
ShowInfo " The client is not the same as the console version or language.Continue with the installation? y/n:"
read Lang_Version
if [[ "${Lang_Version}" = "y" || "${Lang_Version}" = "Y" || "${Lang_Version}" = "yes" || "${Lang_Version}" = "YES" ]]; then
return 0
elif [[ "${Lang_Version}" = "n" || "${Lang_Version}" = "N" || "${Lang_Version}" = "no" || "${Lang_Version}" = "NO" ]]; then
exit 1
else
ShowError "Invalid Input"
exit 1
fi
fi
}
DeleteFailedComponents()
{
if [ -f /etc/issue ]
then
# suse linux 10 删除不兼容的组件
IS_RELEASE_VER=`cat /etc/issue | grep "SUSE Linux" | grep "10" 2>/dev/null`
if [ -n "$IS_RELEASE_VER" ]
then
rm -f components/libfusion*
rm -f components/libhadoop*
rm -f components/libhdfsmgm.so
rm -f components/libinspur*
rm -f components/libincloud*
rm -f components/libcas*
fi
IS_RELEASE_VER_BAK=`cat /etc/issue | grep "SUSE LINUX" | grep "10" 2>/dev/null`
if [ -n "$IS_RELEASE_VER_BAK" ]
then
rm -f components/libfusion*
rm -f components/libhadoop*
rm -f components/libhdfsmgm.so
rm -f components/libinspur*
rm -f components/libincloud*
rm -f components/libcas*
fi
fi
}
DetectClientInstalled ()
{
DetectServiceInstalled ${SERVICE_NAME}
if [ $? -eq 1 ]
then
if [ "$FORCEINSTALL" = "force" ]
then
isUninstall="y"
elif [ "$FORCEINSTALL" = "unforce" ]
then
ShowInfo "Installed ${PRODUCT_NAME} Client on the current system. "
exit 1
else
ShowInfo "The current system has installed ${PRODUCT_NAME} Client."
ShowInfo "Uninstall old ${PRODUCT_NAME} Client ? y(yes)/n(no):"
read isUninstall
fi
if [[ "${isUninstall}" = "y" || "${isUninstall}" = "yes" ]]; then
${APP_PATH}/uninstall.sh --force --overwrite
elif [[ "${isUninstall}" = "n" || "${isUninstall}" = "no" ]]; then
exit 1
else
ShowError "Invalid Input"
DetectClientInstalled
return
fi
fi
}
CheckDirectory ()
{
ShowInfo "Please create the following directory and chmod it to 0777 : "
ShowInfo " ${PRODUCT_LIB_PATH}"
while [ 1 ]
do
ShowInfo "continue? y(yes)/n(no):\n"
read sure
if [[ "${sure}" = "y" || "${sure}" = "yes" ]];
then
if [ ! -d "${PRODUCT_LIB_PATH}" ]
then
ShowError "Directory[${PRODUCT_LIB_PATH}] not exists"
fi
elif [[ "${sure}" = "n" || "${sure}" = "no" ]];
then
ShowInfo "Installation canceled"
exit 0
else
ShowError "Invalid Input"
fi
done
}
ChangeLogPath ()
{
if [ -f "$APP_PATH/cfl.config.origin" ]
then
rm -f $APP_PATH/cfl.config
cp $APP_PATH/cfl.config.origin $APP_PATH/cfl.config
else
cp $APP_PATH/cfl.config $APP_PATH/cfl.config.origin
fi
if [ ! -d "$APP_PATH/logs" ]
then
mkdir $APP_PATH/logs
fi
chmod 0777 $APP_PATH/logs
echo "LogDir=${APP_PATH}/logs" >> $APP_PATH/cfl.config
}
GdrpTitle ()
{
#cat $APP_PATH/Privacy_Statement.txt
ShowInfo "Do you agree that we will get privacy on the operating system?y(yes)/n(no): "
read isGdrp
if [[ "${isGdrp}" = "y" || "${isGdrp}" = "Y" || "${isGdrp}" = "yes" || "${isGdrp}" = "YES" ]]; then
return
elif [[ "${isGdrp}" = "n" || "${isGdrp}" = "N" || "${isGdrp}" = "no" || "${isGdrp}" = "NO" ]]; then
exit 1
else
ShowError "Invalid Input"
GdrpTitle
return
fi
}
ShowTitle ()
{
ShowInfo "********************************************************"
ShowInfo " Welcome to Install ${PRODUCT_NAME} Client "
ShowInfo "********************************************************"
echo
ShowInfo "Do you wish to continue?y(yes)/n(no): "
read isConti
if [[ "${isConti}" = "y" || "${isConti}" = "Y" || "${isConti}" = "yes" || "${isConti}" = "YES" ]]; then
return
elif [[ "${isConti}" = "n" || "${isConti}" = "N" || "${isConti}" = "no" || "${isConti}" = "NO" ]]; then
exit 1
else
ShowError "Invalid Input"
ShowTitle
return
fi
}
DetectSystemEnv ()
{
DetectRootPermission
CheckCommandExist sed
if [ "${UpdateMode}" == "No" ]
then
DetectClientInstalled
fi
}
ConfigIp ()
{
echo [ClientService]>${APP_PATH}/clientsetting.config
echo targetIpAddr=${SERVER_IP}>>${APP_PATH}/clientsetting.config
echo targetPort=9614>>${APP_PATH}/clientsetting.config
echo selfIpAddr=${SELF_IP}>>${APP_PATH}/clientsetting.config
echo offlineDetectTime=300>>${APP_PATH}/clientsetting.config
chmod 644 ${APP_PATH}/clientsetti
没有合适的资源?快使用搜索试试~ 我知道了~
资源详情
资源评论
资源推荐
收起资源包目录
Redhat_5_x64-latest.tar (672个子文件)
libgcc_s.so.1 531KB
libuuid.so.1 44KB
libprotobuf.so.13 24.07MB
412024829fb14eaf9bba7be14a923dfb 60B
libstdc++.so.6 6.33MB
6d533bc0af654a948486977c5167d2c9 60B
libgsasl.so.7 527KB
backint 78KB
c483e9f4e20f46419a98d3a2288bcf01 140B
ciphers 47B
ClientService 6KB
clientsvc.config 3KB
mysqlEnv.config 1KB
eoss_write_tool.config 1KB
dc_client_tool.config 637B
eoss_random_read_tool.config 505B
eoss_read_tool.config 505B
enfs_client_tool.config 481B
supdbtype.config 326B
enfs_mgm_tool.config 316B
dsware_agent.config 297B
en_cfl.config 263B
cfl.config 263B
clientsvclog.config 199B
clientsetting.config 194B
oem.config 194B
oem.config 193B
eefproclog.config 191B
eoss_query_tool.config 157B
fusioncloud.config 150B
dedupeclient.config 130B
netclient.config 100B
netserver.config 100B
proxy.config 93B
gaussdb.config 91B
dc_server_tool.config 87B
lvmbackup.config 36B
eossclient.config 29B
epms.config 28B
ssl.config 8B
ssl_dc.config 5B
datasourceproc 420KB
dc_client_tool 93KB
dc_server_tool 93KB
libAES.so.debug 55KB
deployTool 367KB
eefproc 56KB
encryptool 29KB
enfs_client_tool 943KB
enfs_mgm_tool 1.11MB
eoss_data_mgm_tool 448KB
eoss_meta_mgm_tool 957KB
eoss_query_tool 1.69MB
eoss_random_read_tool 50KB
eoss_read_tool 76KB
eoss_write_tool 110KB
esfdaemon 29KB
fusioncloudcleaner 141KB
fusioncomputecleantool 152KB
hdfsbrowser 320KB
db_config_ssl.ini 958B
db_config_nssl.ini 253B
client.key 2KB
backup_pub.key 271B
xor.key 104B
io_filter.ko 1.68MB
io_filter.ko 1.59MB
io_filter.ko 1.57MB
io_filter.ko 1.48MB
io_filter.ko 1.44MB
io_filter.ko 1.4MB
io_filter.ko 1.4MB
io_filter.ko 1.37MB
io_filter.ko 1.37MB
io_filter.ko 1.37MB
io_filter.ko 1.36MB
io_filter.ko 1.36MB
io_filter.ko 1.36MB
io_filter.ko 1.34MB
io_filter.ko 1.32MB
io_filter.ko 1.32MB
io_filter.ko 1.32MB
io_filter.ko 1.32MB
io_filter.ko 1.31MB
io_filter.ko 1.31MB
io_filter.ko 1.25MB
io_filter.ko 1013KB
io_filter.ko 990KB
io_filter.ko 969KB
io_filter.ko 941KB
mkf 84B
basecore.mo 23KB
basecore.mo 22KB
basecore.mo 22KB
acloudcommon.mo 19KB
acloudcommon.mo 17KB
acloudcommon.mo 17KB
fusioncommon.mo 17KB
fusioncommon.mo 17KB
fusioncommon.mo 17KB
共 672 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7
parkhaemyung
- 粉丝: 0
- 资源: 39
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0