Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
57ec3859
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
57ec3859
编写于
8月 29, 2020
作者:
H
Hui Li
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-1228]
上级
29532fff
变更
15
显示空白变更内容
内联
并排
Showing
15 changed file
with
118 addition
and
38 deletion
+118
-38
CMakeLists.txt
CMakeLists.txt
+1
-0
cmake/define.inc
cmake/define.inc
+4
-0
cmake/input.inc
cmake/input.inc
+5
-0
cmake/install.inc
cmake/install.inc
+6
-1
packaging/release.sh
packaging/release.sh
+22
-9
packaging/tools/install_client.sh
packaging/tools/install_client.sh
+2
-2
packaging/tools/makeclient.sh
packaging/tools/makeclient.sh
+1
-1
packaging/tools/remove.sh
packaging/tools/remove.sh
+18
-22
packaging/tools/remove_client.sh
packaging/tools/remove_client.sh
+2
-0
src/inc/taosdef.h
src/inc/taosdef.h
+4
-0
src/kit/shell/src/shellEngine.c
src/kit/shell/src/shellEngine.c
+11
-0
src/kit/taosdemo/taosdemo.c
src/kit/taosdemo/taosdemo.c
+20
-0
src/os/src/linux/linuxEnv.c
src/os/src/linux/linuxEnv.c
+13
-3
src/util/src/tconfig.c
src/util/src/tconfig.c
+5
-0
src/util/src/tlog.c
src/util/src/tlog.c
+4
-0
未找到文件。
CMakeLists.txt
浏览文件 @
57ec3859
...
@@ -19,6 +19,7 @@ SET(TD_MEM_CHECK FALSE)
...
@@ -19,6 +19,7 @@ SET(TD_MEM_CHECK FALSE)
SET
(
TD_PAGMODE_LITE FALSE
)
SET
(
TD_PAGMODE_LITE FALSE
)
SET
(
TD_SOMODE_STATIC FALSE
)
SET
(
TD_SOMODE_STATIC FALSE
)
SET
(
TD_OEM_POWER FALSE
)
SET
(
TD_GODLL FALSE
)
SET
(
TD_GODLL FALSE
)
SET
(
TD_COMMUNITY_DIR
${
PROJECT_SOURCE_DIR
}
)
SET
(
TD_COMMUNITY_DIR
${
PROJECT_SOURCE_DIR
}
)
...
...
cmake/define.inc
浏览文件 @
57ec3859
...
@@ -17,6 +17,10 @@ IF (TD_GODLL)
...
@@ -17,6 +17,10 @@ IF (TD_GODLL)
ADD_DEFINITIONS
(
-
D_TD_GO_DLL_
)
ADD_DEFINITIONS
(
-
D_TD_GO_DLL_
)
ENDIF
()
ENDIF
()
IF
(
TD_OEM_POWER
)
ADD_DEFINITIONS
(
-
D_TD_OEM_POWER_
)
ENDIF
()
IF
(
TD_MEM_CHECK
)
IF
(
TD_MEM_CHECK
)
ADD_DEFINITIONS
(
-
DTAOS_MEM_CHECK
)
ADD_DEFINITIONS
(
-
DTAOS_MEM_CHECK
)
ENDIF
()
ENDIF
()
...
...
cmake/input.inc
浏览文件 @
57ec3859
...
@@ -27,6 +27,11 @@ IF (${SOMODE} MATCHES "static")
...
@@ -27,6 +27,11 @@ IF (${SOMODE} MATCHES "static")
MESSAGE
(
STATUS
"Link so using static mode"
)
MESSAGE
(
STATUS
"Link so using static mode"
)
ENDIF
()
ENDIF
()
IF
(
$
{
DBNAME
}
MATCHES
"power"
)
SET
(
TD_OEM_POWER
TRUE
)
MESSAGE
(
STATUS
"OEM power is true"
)
ENDIF
()
IF
(
$
{
DLLTYPE
}
MATCHES
"go"
)
IF
(
$
{
DLLTYPE
}
MATCHES
"go"
)
SET
(
TD_GODLL
TRUE
)
SET
(
TD_GODLL
TRUE
)
MESSAGE
(
STATUS
"input dll type: "
$
{
DLLTYPE
})
MESSAGE
(
STATUS
"input dll type: "
$
{
DLLTYPE
})
...
...
cmake/install.inc
浏览文件 @
57ec3859
...
@@ -4,7 +4,12 @@ IF (TD_LINUX)
...
@@ -4,7 +4,12 @@ IF (TD_LINUX)
INSTALL
(
CODE
"execute_process(COMMAND chmod 777 ${TD_MAKE_INSTALL_SH})"
)
INSTALL
(
CODE
"execute_process(COMMAND chmod 777 ${TD_MAKE_INSTALL_SH})"
)
INSTALL
(
CODE
"execute_process(COMMAND ${TD_MAKE_INSTALL_SH} ${TD_COMMUNITY_DIR} ${PROJECT_BINARY_DIR})"
)
INSTALL
(
CODE
"execute_process(COMMAND ${TD_MAKE_INSTALL_SH} ${TD_COMMUNITY_DIR} ${PROJECT_BINARY_DIR})"
)
ELSEIF
(
TD_WINDOWS
)
ELSEIF
(
TD_WINDOWS
)
IF
(
TD_OEM_POWER
)
SET
(
CMAKE_INSTALL_PREFIX
C
:/
PowerDB
)
ELSE
()
SET
(
CMAKE_INSTALL_PREFIX
C
:/
TDengine
)
SET
(
CMAKE_INSTALL_PREFIX
C
:/
TDengine
)
ENDIF
()
IF
(
NOT
TD_GODLL
)
IF
(
NOT
TD_GODLL
)
#INSTALL(DIRECTORY ${TD_COMMUNITY_DIR}/src/connector/go DESTINATION connector)
#INSTALL(DIRECTORY ${TD_COMMUNITY_DIR}/src/connector/go DESTINATION connector)
#INSTALL(DIRECTORY ${TD_COMMUNITY_DIR}/src/connector/grafana DESTINATION connector)
#INSTALL(DIRECTORY ${TD_COMMUNITY_DIR}/src/connector/grafana DESTINATION connector)
...
...
packaging/release.sh
浏览文件 @
57ec3859
...
@@ -11,6 +11,7 @@ set -e
...
@@ -11,6 +11,7 @@ set -e
# -V [stable | beta]
# -V [stable | beta]
# -l [full | lite]
# -l [full | lite]
# -s [static | dynamic]
# -s [static | dynamic]
# -d [taos | power]
# -n [2.0.0.3]
# -n [2.0.0.3]
# -m [2.0.0.0]
# -m [2.0.0.0]
...
@@ -21,10 +22,11 @@ cpuType=x64 # [aarch32 | aarch64 | x64 | x86 | mips64 ...]
...
@@ -21,10 +22,11 @@ cpuType=x64 # [aarch32 | aarch64 | x64 | x86 | mips64 ...]
osType
=
Linux
# [Linux | Kylin | Alpine | Raspberrypi | Darwin | Windows | Ningsi60 | Ningsi80 |...]
osType
=
Linux
# [Linux | Kylin | Alpine | Raspberrypi | Darwin | Windows | Ningsi60 | Ningsi80 |...]
pagMode
=
full
# [full | lite]
pagMode
=
full
# [full | lite]
soMode
=
dynamic
# [static | dynamic]
soMode
=
dynamic
# [static | dynamic]
dbName
=
taos
# [taos | power]
verNumber
=
""
verNumber
=
""
verNumberComp
=
"2.0.0.0"
verNumberComp
=
"2.0.0.0"
while
getopts
"hv:V:c:o:l:s:n:m:"
arg
while
getopts
"hv:V:c:o:l:s:
d:
n:m:"
arg
do
do
case
$arg
in
case
$arg
in
v
)
v
)
...
@@ -47,6 +49,10 @@ do
...
@@ -47,6 +49,10 @@ do
#echo "soMode=$OPTARG"
#echo "soMode=$OPTARG"
soMode
=
$(
echo
$OPTARG
)
soMode
=
$(
echo
$OPTARG
)
;;
;;
d
)
#echo "dbName=$OPTARG"
dbName
=
$(
echo
$OPTARG
)
;;
n
)
n
)
#echo "verNumber=$OPTARG"
#echo "verNumber=$OPTARG"
verNumber
=
$(
echo
$OPTARG
)
verNumber
=
$(
echo
$OPTARG
)
...
@@ -66,6 +72,7 @@ do
...
@@ -66,6 +72,7 @@ do
echo
" -V [stable | beta] "
echo
" -V [stable | beta] "
echo
" -l [full | lite] "
echo
" -l [full | lite] "
echo
" -s [static | dynamic] "
echo
" -s [static | dynamic] "
echo
" -d [taos | power] "
echo
" -n [version number] "
echo
" -n [version number] "
echo
" -m [compatible version number] "
echo
" -m [compatible version number] "
exit
0
exit
0
...
@@ -77,7 +84,7 @@ do
...
@@ -77,7 +84,7 @@ do
esac
esac
done
done
echo
"verMode=
${
verMode
}
verType=
${
verType
}
cpuType=
${
cpuType
}
osType=
${
osType
}
pagMode=
${
pagMode
}
soMode=
${
soMode
}
verNumber=
${
verNumber
}
verNumberComp=
${
verNumberComp
}
"
echo
"verMode=
${
verMode
}
verType=
${
verType
}
cpuType=
${
cpuType
}
osType=
${
osType
}
pagMode=
${
pagMode
}
soMode=
${
soMode
}
dbName=
${
dbName
}
verNumber=
${
verNumber
}
verNumberComp=
${
verNumberComp
}
"
curr_dir
=
$(
pwd
)
curr_dir
=
$(
pwd
)
...
@@ -170,9 +177,9 @@ cd ${compile_dir}
...
@@ -170,9 +177,9 @@ cd ${compile_dir}
# check support cpu type
# check support cpu type
if
[[
"
$cpuType
"
==
"x64"
]]
||
[[
"
$cpuType
"
==
"aarch64"
]]
||
[[
"
$cpuType
"
==
"aarch32"
]]
||
[[
"
$cpuType
"
==
"mips64"
]]
;
then
if
[[
"
$cpuType
"
==
"x64"
]]
||
[[
"
$cpuType
"
==
"aarch64"
]]
||
[[
"
$cpuType
"
==
"aarch32"
]]
||
[[
"
$cpuType
"
==
"mips64"
]]
;
then
if
[
"
$verMode
"
!=
"cluster"
]
;
then
if
[
"
$verMode
"
!=
"cluster"
]
;
then
cmake ../
-DCPUTYPE
=
${
cpuType
}
-DOSTYPE
=
${
osType
}
-DSOMODE
=
${
soMode
}
-DVERTYPE
=
${
verType
}
-DVERDATE
=
"
${
build_time
}
"
-DGITINFO
=
${
gitinfo
}
-DGITINFOI
=
${
gitinfoOfInternal
}
-DVERNUMBER
=
${
verNumber
}
-DVERCOMPATIBLE
=
${
verNumberComp
}
-DPAGMODE
=
${
pagMode
}
cmake ../
-DCPUTYPE
=
${
cpuType
}
-DOSTYPE
=
${
osType
}
-DSOMODE
=
${
soMode
}
-D
DBNAME
=
${
dbName
}
-D
VERTYPE
=
${
verType
}
-DVERDATE
=
"
${
build_time
}
"
-DGITINFO
=
${
gitinfo
}
-DGITINFOI
=
${
gitinfoOfInternal
}
-DVERNUMBER
=
${
verNumber
}
-DVERCOMPATIBLE
=
${
verNumberComp
}
-DPAGMODE
=
${
pagMode
}
else
else
cmake ../../
-DCPUTYPE
=
${
cpuType
}
-DOSTYPE
=
${
osType
}
-DSOMODE
=
${
soMode
}
-DVERTYPE
=
${
verType
}
-DVERDATE
=
"
${
build_time
}
"
-DGITINFO
=
${
gitinfo
}
-DGITINFOI
=
${
gitinfoOfInternal
}
-DVERNUMBER
=
${
verNumber
}
-DVERCOMPATIBLE
=
${
verNumberComp
}
cmake ../../
-DCPUTYPE
=
${
cpuType
}
-DOSTYPE
=
${
osType
}
-DSOMODE
=
${
soMode
}
-D
DBNAME
=
${
dbName
}
-D
VERTYPE
=
${
verType
}
-DVERDATE
=
"
${
build_time
}
"
-DGITINFO
=
${
gitinfo
}
-DGITINFOI
=
${
gitinfoOfInternal
}
-DVERNUMBER
=
${
verNumber
}
-DVERCOMPATIBLE
=
${
verNumberComp
}
fi
fi
else
else
echo
"input cpuType=
${
cpuType
}
error!!!"
echo
"input cpuType=
${
cpuType
}
error!!!"
...
@@ -185,7 +192,7 @@ cd ${curr_dir}
...
@@ -185,7 +192,7 @@ cd ${curr_dir}
# 3. Call the corresponding script for packaging
# 3. Call the corresponding script for packaging
if
[
"
$osType
"
!=
"Darwin"
]
;
then
if
[
"
$osType
"
!=
"Darwin"
]
;
then
if
[[
"
$verMode
"
!=
"cluster"
]]
&&
[[
"
$cpuType
"
==
"x64"
]]
;
then
if
[[
"
$verMode
"
!=
"cluster"
]]
&&
[[
"
$cpuType
"
==
"x64"
]]
&&
[[
"
$dbName
"
==
"taos"
]]
;
then
echo
"====do deb package for the ubuntu system===="
echo
"====do deb package for the ubuntu system===="
output_dir
=
"
${
top_dir
}
/debs"
output_dir
=
"
${
top_dir
}
/debs"
if
[
-d
${
output_dir
}
]
;
then
if
[
-d
${
output_dir
}
]
;
then
...
@@ -208,11 +215,17 @@ if [ "$osType" != "Darwin" ]; then
...
@@ -208,11 +215,17 @@ if [ "$osType" != "Darwin" ]; then
echo
"====do tar.gz package for all systems===="
echo
"====do tar.gz package for all systems===="
cd
${
script_dir
}
/tools
cd
${
script_dir
}
/tools
if
[[
"
$dbName
"
==
"taos"
]]
;
then
${
csudo
}
./makepkg.sh
${
compile_dir
}
${
verNumber
}
"
${
build_time
}
"
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
${
pagMode
}
${
csudo
}
./makepkg.sh
${
compile_dir
}
${
verNumber
}
"
${
build_time
}
"
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
${
pagMode
}
${
csudo
}
./makeclient.sh
${
compile_dir
}
${
verNumber
}
"
${
build_time
}
"
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
${
pagMode
}
${
csudo
}
./makeclient.sh
${
compile_dir
}
${
verNumber
}
"
${
build_time
}
"
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
${
pagMode
}
${
csudo
}
./makearbi.sh
${
compile_dir
}
${
verNumber
}
"
${
build_time
}
"
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
${
pagMode
}
${
csudo
}
./makearbi.sh
${
compile_dir
}
${
verNumber
}
"
${
build_time
}
"
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
${
pagMode
}
else
${
csudo
}
./makepkg_power.sh
${
compile_dir
}
${
verNumber
}
"
${
build_time
}
"
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
${
pagMode
}
${
dbName
}
${
csudo
}
./makeclient_power.sh
${
compile_dir
}
${
verNumber
}
"
${
build_time
}
"
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
${
pagMode
}
${
dbName
}
${
csudo
}
./makearbi_power.sh
${
compile_dir
}
${
verNumber
}
"
${
build_time
}
"
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
${
pagMode
}
fi
else
else
cd
${
script_dir
}
/tools
cd
${
script_dir
}
/tools
./makeclient.sh
${
compile_dir
}
${
verNumber
}
"
${
build_time
}
"
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
./makeclient.sh
${
compile_dir
}
${
verNumber
}
"
${
build_time
}
"
${
cpuType
}
${
osType
}
${
verMode
}
${
verType
}
${
dbName
}
fi
fi
packaging/tools/install_client.sh
浏览文件 @
57ec3859
...
@@ -85,7 +85,7 @@ function install_bin() {
...
@@ -85,7 +85,7 @@ function install_bin() {
# Remove links
# Remove links
${
csudo
}
rm
-f
${
bin_link_dir
}
/taos
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/taos
||
:
if
[
"
$osType
"
==
"Darwin"
]
;
then
if
[
"
$osType
"
==
"Darwin"
]
;
then
${
csudo
}
rm
-f
${
bin_link_dir
}
/taosd
ump
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/taosd
emo
||
:
fi
fi
${
csudo
}
rm
-f
${
bin_link_dir
}
/rmtaos
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/rmtaos
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/set_core
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/set_core
||
:
...
@@ -95,7 +95,7 @@ function install_bin() {
...
@@ -95,7 +95,7 @@ function install_bin() {
#Make link
#Make link
[
-x
${
install_main_dir
}
/bin/taos
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/taos
${
bin_link_dir
}
/taos
||
:
[
-x
${
install_main_dir
}
/bin/taos
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/taos
${
bin_link_dir
}
/taos
||
:
if
[
"
$osType
"
==
"Darwin"
]
;
then
if
[
"
$osType
"
==
"Darwin"
]
;
then
[
-x
${
install_main_dir
}
/bin/taosd
ump
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/taosdump
${
bin_link_dir
}
/taosdump
||
:
[
-x
${
install_main_dir
}
/bin/taosd
emo
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/taosdemo
${
bin_link_dir
}
/taosdemo
||
:
fi
fi
[
-x
${
install_main_dir
}
/bin/remove_client.sh
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/remove_client.sh
${
bin_link_dir
}
/rmtaos
||
:
[
-x
${
install_main_dir
}
/bin/remove_client.sh
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/remove_client.sh
${
bin_link_dir
}
/rmtaos
||
:
[
-x
${
install_main_dir
}
/bin/set_core.sh
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/set_core.sh
${
bin_link_dir
}
/set_core
||
:
[
-x
${
install_main_dir
}
/bin/set_core.sh
]
&&
${
csudo
}
ln
-s
${
install_main_dir
}
/bin/set_core.sh
${
bin_link_dir
}
/set_core
||
:
...
...
packaging/tools/makeclient.sh
浏览文件 @
57ec3859
...
@@ -41,7 +41,7 @@ fi
...
@@ -41,7 +41,7 @@ fi
if
[
"
$osType
"
!=
"Darwin"
]
;
then
if
[
"
$osType
"
!=
"Darwin"
]
;
then
if
[
"
$pagMode
"
==
"lite"
]
;
then
if
[
"
$pagMode
"
==
"lite"
]
;
then
strip
${
build_dir
}
/bin/taosd
#
strip ${build_dir}/bin/taosd
strip
${
build_dir
}
/bin/taos
strip
${
build_dir
}
/bin/taos
bin_files
=
"
${
build_dir
}
/bin/taos
${
script_dir
}
/remove_client.sh"
bin_files
=
"
${
build_dir
}
/bin/taos
${
script_dir
}
/remove_client.sh"
else
else
...
...
packaging/tools/remove.sh
浏览文件 @
57ec3859
...
@@ -102,26 +102,22 @@ function clean_log() {
...
@@ -102,26 +102,22 @@ function clean_log() {
function
clean_service_on_systemd
()
{
function
clean_service_on_systemd
()
{
taosd_service_config
=
"
${
service_config_dir
}
/
${
taos_service_name
}
.service"
taosd_service_config
=
"
${
service_config_dir
}
/
${
taos_service_name
}
.service"
if
systemctl is-active
--quiet
${
taos_service_name
}
;
then
if
systemctl is-active
--quiet
${
taos_service_name
}
;
then
echo
"TDengine taosd is running, stopping it..."
echo
"TDengine taosd is running, stopping it..."
${
csudo
}
systemctl stop
${
taos_service_name
}
&> /dev/null
||
echo
&> /dev/null
${
csudo
}
systemctl stop
${
taos_service_name
}
&> /dev/null
||
echo
&> /dev/null
fi
fi
${
csudo
}
systemctl disable
${
taos_service_name
}
&> /dev/null
||
echo
&> /dev/null
${
csudo
}
systemctl disable
${
taos_service_name
}
&> /dev/null
||
echo
&> /dev/null
${
csudo
}
rm
-f
${
taosd_service_config
}
${
csudo
}
rm
-f
${
taosd_service_config
}
if
[
"
$verMode
"
==
"cluster"
]
;
then
tarbitratord_service_config
=
"
${
service_config_dir
}
/
${
tarbitrator_service_name
}
.service"
tarbitratord_service_config
=
"
${
service_config_dir
}
/
${
tarbitrator_service_name
}
.service"
if
systemctl is-active
--quiet
${
tarbitrator_service_name
}
;
then
if
systemctl is-active
--quiet
${
tarbitrator_service_name
}
;
then
echo
"TDengine tarbitrator is running, stopping it..."
echo
"TDengine tarbitrator is running, stopping it..."
${
csudo
}
systemctl stop
${
tarbitrator_service_name
}
&> /dev/null
||
echo
&> /dev/null
${
csudo
}
systemctl stop
${
tarbitrator_service_name
}
&> /dev/null
||
echo
&> /dev/null
fi
fi
${
csudo
}
systemctl disable
${
tarbitrator_service_name
}
&> /dev/null
||
echo
&> /dev/null
${
csudo
}
systemctl disable
${
tarbitrator_service_name
}
&> /dev/null
||
echo
&> /dev/null
${
csudo
}
rm
-f
${
tarbitratord_service_config
}
${
csudo
}
rm
-f
${
tarbitratord_service_config
}
if
[
"
$verMode
"
==
"cluster"
]
;
then
nginx_service_config
=
"
${
service_config_dir
}
/
${
nginx_service_name
}
.service"
nginx_service_config
=
"
${
service_config_dir
}
/
${
nginx_service_name
}
.service"
if
[
-d
${
bin_dir
}
/web
]
;
then
if
[
-d
${
bin_dir
}
/web
]
;
then
if
systemctl is-active
--quiet
${
nginx_service_name
}
;
then
if
systemctl is-active
--quiet
${
nginx_service_name
}
;
then
...
@@ -129,7 +125,6 @@ function clean_service_on_systemd() {
...
@@ -129,7 +125,6 @@ function clean_service_on_systemd() {
${
csudo
}
systemctl stop
${
nginx_service_name
}
&> /dev/null
||
echo
&> /dev/null
${
csudo
}
systemctl stop
${
nginx_service_name
}
&> /dev/null
||
echo
&> /dev/null
fi
fi
${
csudo
}
systemctl disable
${
nginx_service_name
}
&> /dev/null
||
echo
&> /dev/null
${
csudo
}
systemctl disable
${
nginx_service_name
}
&> /dev/null
||
echo
&> /dev/null
${
csudo
}
rm
-f
${
nginx_service_config
}
${
csudo
}
rm
-f
${
nginx_service_config
}
fi
fi
fi
fi
...
@@ -227,3 +222,4 @@ elif echo $osinfo | grep -qwi "centos" ; then
...
@@ -227,3 +222,4 @@ elif echo $osinfo | grep -qwi "centos" ; then
fi
fi
echo
-e
"
${
GREEN
}
TDengine is removed successfully!
${
NC
}
"
echo
-e
"
${
GREEN
}
TDengine is removed successfully!
${
NC
}
"
echo
\ No newline at end of file
packaging/tools/remove_client.sh
浏览文件 @
57ec3859
...
@@ -39,6 +39,7 @@ function clean_bin() {
...
@@ -39,6 +39,7 @@ function clean_bin() {
${
csudo
}
rm
-f
${
bin_link_dir
}
/taos
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/taos
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/taosdemo
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/taosdemo
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/rmtaos
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/rmtaos
||
:
${
csudo
}
rm
-f
${
bin_link_dir
}
/set_core
||
:
}
}
function
clean_lib
()
{
function
clean_lib
()
{
...
@@ -80,3 +81,4 @@ clean_config
...
@@ -80,3 +81,4 @@ clean_config
${
csudo
}
rm
-rf
${
install_main_dir
}
${
csudo
}
rm
-rf
${
install_main_dir
}
echo
-e
"
${
GREEN
}
TDengine client is removed successfully!
${
NC
}
"
echo
-e
"
${
GREEN
}
TDengine client is removed successfully!
${
NC
}
"
echo
src/inc/taosdef.h
浏览文件 @
57ec3859
...
@@ -85,7 +85,11 @@ extern const int32_t TYPE_BYTES[11];
...
@@ -85,7 +85,11 @@ extern const int32_t TYPE_BYTES[11];
#define TSDB_DATA_NULL_STR_L "null"
#define TSDB_DATA_NULL_STR_L "null"
#define TSDB_DEFAULT_USER "root"
#define TSDB_DEFAULT_USER "root"
#ifdef _TD_OEM_POWER_
#define TSDB_DEFAULT_PASS "powerdb"
#else
#define TSDB_DEFAULT_PASS "taosdata"
#define TSDB_DEFAULT_PASS "taosdata"
#endif
#define TSDB_TRUE 1
#define TSDB_TRUE 1
#define TSDB_FALSE 0
#define TSDB_FALSE 0
...
...
src/kit/shell/src/shellEngine.c
浏览文件 @
57ec3859
...
@@ -30,11 +30,22 @@
...
@@ -30,11 +30,22 @@
#include <regex.h>
#include <regex.h>
/**************** Global variables ****************/
/**************** Global variables ****************/
#ifdef _TD_OEM_POWER_
char
CLIENT_VERSION
[]
=
"Welcome to the PowerDB shell from %s, Client Version:%s
\n
"
"Copyright (c) 2017 by PowerDB, Inc. All rights reserved.
\n\n
"
;
char
PROMPT_HEADER
[]
=
"power> "
;
char
CONTINUE_PROMPT
[]
=
" -> "
;
int
prompt_size
=
7
;
#else
char
CLIENT_VERSION
[]
=
"Welcome to the TDengine shell from %s, Client Version:%s
\n
"
char
CLIENT_VERSION
[]
=
"Welcome to the TDengine shell from %s, Client Version:%s
\n
"
"Copyright (c) 2017 by TAOS Data, Inc. All rights reserved.
\n\n
"
;
"Copyright (c) 2017 by TAOS Data, Inc. All rights reserved.
\n\n
"
;
char
PROMPT_HEADER
[]
=
"taos> "
;
char
PROMPT_HEADER
[]
=
"taos> "
;
char
CONTINUE_PROMPT
[]
=
" -> "
;
char
CONTINUE_PROMPT
[]
=
" -> "
;
int
prompt_size
=
6
;
int
prompt_size
=
6
;
#endif
TAOS_RES
*
result
=
NULL
;
TAOS_RES
*
result
=
NULL
;
SShellHistory
history
;
SShellHistory
history
;
...
...
src/kit/taosdemo/taosdemo.c
浏览文件 @
57ec3859
...
@@ -89,7 +89,11 @@ typedef struct DemoArguments {
...
@@ -89,7 +89,11 @@ typedef struct DemoArguments {
{
0
,
'h'
,
"host"
,
0
,
"The host to connect to TDengine. Default is localhost."
,
0
},
{
0
,
'h'
,
"host"
,
0
,
"The host to connect to TDengine. Default is localhost."
,
0
},
{
0
,
'p'
,
"port"
,
0
,
"The TCP/IP port number to use for the connection. Default is 0."
,
1
},
{
0
,
'p'
,
"port"
,
0
,
"The TCP/IP port number to use for the connection. Default is 0."
,
1
},
{
0
,
'u'
,
"user"
,
0
,
"The TDengine user name to use when connecting to the server. Default is 'root'."
,
2
},
{
0
,
'u'
,
"user"
,
0
,
"The TDengine user name to use when connecting to the server. Default is 'root'."
,
2
},
#ifdef _TD_OEM_POWER_
{
0
,
'P'
,
"password"
,
0
,
"The password to use when connecting to the server. Default is 'powerdb'."
,
3
},
#else
{
0
,
'P'
,
"password"
,
0
,
"The password to use when connecting to the server. Default is 'taosdata'."
,
3
},
{
0
,
'P'
,
"password"
,
0
,
"The password to use when connecting to the server. Default is 'taosdata'."
,
3
},
#endif
{
0
,
'd'
,
"database"
,
0
,
"Destination database. Default is 'test'."
,
3
},
{
0
,
'd'
,
"database"
,
0
,
"Destination database. Default is 'test'."
,
3
},
{
0
,
'a'
,
"replica"
,
0
,
"Set the replica parameters of the database, Default 1, min: 1, max: 3."
,
3
},
{
0
,
'a'
,
"replica"
,
0
,
"Set the replica parameters of the database, Default 1, min: 1, max: 3."
,
3
},
{
0
,
'm'
,
"table_prefix"
,
0
,
"Table prefix name. Default is 't'."
,
3
},
{
0
,
'm'
,
"table_prefix"
,
0
,
"Table prefix name. Default is 't'."
,
3
},
...
@@ -104,7 +108,11 @@ typedef struct DemoArguments {
...
@@ -104,7 +108,11 @@ typedef struct DemoArguments {
{
0
,
'r'
,
"num_of_records_per_req"
,
0
,
"The number of records per request. Default is 1000."
,
10
},
{
0
,
'r'
,
"num_of_records_per_req"
,
0
,
"The number of records per request. Default is 1000."
,
10
},
{
0
,
't'
,
"num_of_tables"
,
0
,
"The number of tables. Default is 10000."
,
11
},
{
0
,
't'
,
"num_of_tables"
,
0
,
"The number of tables. Default is 10000."
,
11
},
{
0
,
'n'
,
"num_of_records_per_table"
,
0
,
"The number of records per table. Default is 100000."
,
12
},
{
0
,
'n'
,
"num_of_records_per_table"
,
0
,
"The number of records per table. Default is 100000."
,
12
},
#ifdef _TD_OEM_POWER_
{
0
,
'c'
,
"config_directory"
,
0
,
"Configuration directory. Default is '/etc/power/'."
,
14
},
#else
{
0
,
'c'
,
"config_directory"
,
0
,
"Configuration directory. Default is '/etc/taos/'."
,
14
},
{
0
,
'c'
,
"config_directory"
,
0
,
"Configuration directory. Default is '/etc/taos/'."
,
14
},
#endif
{
0
,
'x'
,
0
,
0
,
"Insert only flag."
,
13
},
{
0
,
'x'
,
0
,
0
,
"Insert only flag."
,
13
},
{
0
,
'O'
,
"order"
,
0
,
"Insert mode--0: In order, 1: Out of order. Default is in order."
,
14
},
{
0
,
'O'
,
"order"
,
0
,
"Insert mode--0: In order, 1: Out of order. Default is in order."
,
14
},
{
0
,
'R'
,
"rate"
,
0
,
"Out of order data's rate--if order=1 Default 10, min: 0, max: 50."
,
14
},
{
0
,
'R'
,
"rate"
,
0
,
"Out of order data's rate--if order=1 Default 10, min: 0, max: 50."
,
14
},
...
@@ -279,7 +287,11 @@ typedef struct DemoArguments {
...
@@ -279,7 +287,11 @@ typedef struct DemoArguments {
printf
(
"%s%s
\n
"
,
indent
,
"-u"
);
printf
(
"%s%s
\n
"
,
indent
,
"-u"
);
printf
(
"%s%s%s
\n
"
,
indent
,
indent
,
"user, The user name to use when connecting to the server. Default is 'root'."
);
printf
(
"%s%s%s
\n
"
,
indent
,
indent
,
"user, The user name to use when connecting to the server. Default is 'root'."
);
printf
(
"%s%s
\n
"
,
indent
,
"-p"
);
printf
(
"%s%s
\n
"
,
indent
,
"-p"
);
#ifdef _TD_OEM_POWER_
printf
(
"%s%s%s
\n
"
,
indent
,
indent
,
"password, The password to use when connecting to the server. Default is 'powerdb'."
);
#else
printf
(
"%s%s%s
\n
"
,
indent
,
indent
,
"password, The password to use when connecting to the server. Default is 'taosdata'."
);
printf
(
"%s%s%s
\n
"
,
indent
,
indent
,
"password, The password to use when connecting to the server. Default is 'taosdata'."
);
#endif
printf
(
"%s%s
\n
"
,
indent
,
"-d"
);
printf
(
"%s%s
\n
"
,
indent
,
"-d"
);
printf
(
"%s%s%s
\n
"
,
indent
,
indent
,
"database, Destination database. Default is 'test'."
);
printf
(
"%s%s%s
\n
"
,
indent
,
indent
,
"database, Destination database. Default is 'test'."
);
printf
(
"%s%s
\n
"
,
indent
,
"-a"
);
printf
(
"%s%s
\n
"
,
indent
,
"-a"
);
...
@@ -309,7 +321,11 @@ typedef struct DemoArguments {
...
@@ -309,7 +321,11 @@ typedef struct DemoArguments {
printf
(
"%s%s
\n
"
,
indent
,
"-n"
);
printf
(
"%s%s
\n
"
,
indent
,
"-n"
);
printf
(
"%s%s%s
\n
"
,
indent
,
indent
,
"num_of_records_per_table, The number of records per table. Default is 100000."
);
printf
(
"%s%s%s
\n
"
,
indent
,
indent
,
"num_of_records_per_table, The number of records per table. Default is 100000."
);
printf
(
"%s%s
\n
"
,
indent
,
"-c"
);
printf
(
"%s%s
\n
"
,
indent
,
"-c"
);
#ifdef _TD_OEM_POWER_
printf
(
"%s%s%s
\n
"
,
indent
,
indent
,
"config_directory, Configuration directory. Default is '/etc/power/'."
);
#else
printf
(
"%s%s%s
\n
"
,
indent
,
indent
,
"config_directory, Configuration directory. Default is '/etc/taos/'."
);
printf
(
"%s%s%s
\n
"
,
indent
,
indent
,
"config_directory, Configuration directory. Default is '/etc/taos/'."
);
#endif
printf
(
"%s%s
\n
"
,
indent
,
"-x"
);
printf
(
"%s%s
\n
"
,
indent
,
"-x"
);
printf
(
"%s%s%s
\n
"
,
indent
,
indent
,
"flag, Insert only flag."
);
printf
(
"%s%s%s
\n
"
,
indent
,
indent
,
"flag, Insert only flag."
);
printf
(
"%s%s
\n
"
,
indent
,
"-O"
);
printf
(
"%s%s
\n
"
,
indent
,
"-O"
);
...
@@ -513,7 +529,11 @@ int main(int argc, char *argv[]) {
...
@@ -513,7 +529,11 @@ int main(int argc, char *argv[]) {
SDemoArguments
arguments
=
{
NULL
,
// host
SDemoArguments
arguments
=
{
NULL
,
// host
0
,
// port
0
,
// port
"root"
,
// user
"root"
,
// user
#ifdef _TD_OEM_POWER_
"powerdb"
,
// password
#else
"taosdata"
,
// password
"taosdata"
,
// password
#endif
"test"
,
// database
"test"
,
// database
1
,
// replica
1
,
// replica
"t"
,
// tb_prefix
"t"
,
// tb_prefix
...
...
src/os/src/linux/linuxEnv.c
浏览文件 @
57ec3859
...
@@ -18,15 +18,25 @@
...
@@ -18,15 +18,25 @@
#include "tglobal.h"
#include "tglobal.h"
void
osInit
()
{
void
osInit
()
{
#ifdef _TD_OEM_POWER_
if
(
configDir
[
0
]
==
0
)
{
strcpy
(
configDir
,
"/etc/power"
);
}
strcpy
(
tsDataDir
,
"/var/lib/power"
);
strcpy
(
tsLogDir
,
"/var/log/power"
);
strcpy
(
tsScriptDir
,
"/etc/power"
);
#else
if
(
configDir
[
0
]
==
0
)
{
if
(
configDir
[
0
]
==
0
)
{
strcpy
(
configDir
,
"/etc/taos"
);
strcpy
(
configDir
,
"/etc/taos"
);
}
}
strcpy
(
tsDataDir
,
"/var/lib/taos"
);
strcpy
(
tsLogDir
,
"/var/log/taos"
);
strcpy
(
tsScriptDir
,
"/etc/taos"
);
#endif
strcpy
(
tsVnodeDir
,
""
);
strcpy
(
tsVnodeDir
,
""
);
strcpy
(
tsDnodeDir
,
""
);
strcpy
(
tsDnodeDir
,
""
);
strcpy
(
tsMnodeDir
,
""
);
strcpy
(
tsMnodeDir
,
""
);
strcpy
(
tsDataDir
,
"/var/lib/taos"
);
strcpy
(
tsLogDir
,
"/var/log/taos"
);
strcpy
(
tsScriptDir
,
"/etc/taos"
);
strcpy
(
tsOsName
,
"Linux"
);
strcpy
(
tsOsName
,
"Linux"
);
}
}
\ No newline at end of file
src/util/src/tconfig.c
浏览文件 @
57ec3859
...
@@ -260,8 +260,13 @@ void taosReadGlobalLogCfg() {
...
@@ -260,8 +260,13 @@ void taosReadGlobalLogCfg() {
}
}
strcpy
(
configDir
,
full_path
.
we_wordv
[
0
]);
strcpy
(
configDir
,
full_path
.
we_wordv
[
0
]);
}
else
{
}
else
{
#ifdef _TD_OEM_POWER_
printf
(
"configDir:%s not there, use default value: /etc/power"
,
configDir
);
strcpy
(
configDir
,
"/etc/power"
);
#else
printf
(
"configDir:%s not there, use default value: /etc/taos"
,
configDir
);
printf
(
"configDir:%s not there, use default value: /etc/taos"
,
configDir
);
strcpy
(
configDir
,
"/etc/taos"
);
strcpy
(
configDir
,
"/etc/taos"
);
#endif
}
}
wordfree
(
&
full_path
);
wordfree
(
&
full_path
);
...
...
src/util/src/tlog.c
浏览文件 @
57ec3859
...
@@ -66,7 +66,11 @@ int32_t tsAsyncLog = 1;
...
@@ -66,7 +66,11 @@ int32_t tsAsyncLog = 1;
float
tsTotalLogDirGB
=
0
;
float
tsTotalLogDirGB
=
0
;
float
tsAvailLogDirGB
=
0
;
float
tsAvailLogDirGB
=
0
;
float
tsMinimalLogDirGB
=
0
.
1
f
;
float
tsMinimalLogDirGB
=
0
.
1
f
;
#ifdef _TD_OEM_POWER_
char
tsLogDir
[
TSDB_FILENAME_LEN
]
=
"/var/log/power"
;
#else
char
tsLogDir
[
TSDB_FILENAME_LEN
]
=
"/var/log/taos"
;
char
tsLogDir
[
TSDB_FILENAME_LEN
]
=
"/var/log/taos"
;
#endif
static
SLogObj
tsLogObj
=
{
.
fileNum
=
1
};
static
SLogObj
tsLogObj
=
{
.
fileNum
=
1
};
static
void
*
taosAsyncOutputLog
(
void
*
param
);
static
void
*
taosAsyncOutputLog
(
void
*
param
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录