Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
c0e71c28
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
c0e71c28
编写于
12月 31, 2021
作者:
Z
zyyang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
change
上级
0be244b5
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
86 addition
and
34 deletion
+86
-34
packaging/cfg/prodb.service
packaging/cfg/prodb.service
+21
-0
packaging/sed_pro.sh
packaging/sed_pro.sh
+27
-14
packaging/tools/makepkg.sh
packaging/tools/makepkg.sh
+38
-20
未找到文件。
packaging/cfg/prodb.service
0 → 100644
浏览文件 @
c0e71c28
[Unit]
Description
=
ProDB server service
After
=
network-online.target taosadapter.service
Wants
=
network-online.target taosadapter.service
[Service]
Type
=
simple
ExecStart
=
/usr/bin/prodbs
ExecStartPre
=
/usr/local/ProDB/bin/startPre.sh
TimeoutStopSec
=
1000000s
LimitNOFILE
=
infinity
LimitNPROC
=
infinity
LimitCORE
=
infinity
TimeoutStartSec
=
0
StandardOutput
=
null
Restart
=
always
StartLimitBurst
=
3
StartLimitInterval
=
60s
[Install]
WantedBy
=
multi-user.target
packaging/sed_pro.sh
浏览文件 @
c0e71c28
#!/bin/bash
function
replace_community_pro
(){
function
replace_community_pro
()
{
# cmake/install.inc
sed
-i
"s/C:
\/
TDengine/C:
\/
ProDB/g"
${
top_dir
}
/cmake/install.inc
sed
-i
"s/taos
\.
cfg/prodb
\.
cfg/g"
${
top_dir
}
/cmake/install.inc
...
...
@@ -12,21 +12,21 @@ function replace_community_pro(){
# src/inc/taosdef.h
sed
-i
"s/
\"
taosdata
\"
/
\"
prodb
\"
/g"
${
top_dir
}
/src/inc/taosdef.h
# src/util/src/tconfig.c
sed
-i
"s/taos
\.
cfg/prodb
\.
cfg/g"
${
top_dir
}
/src/util/src/tconfig.c
sed
-i
"s/etc
\/
taos/etc
\/
ProDB/g"
${
top_dir
}
/src/util/src/tconfig.c
sed
-i
"s/taos
\.
cfg/prodb
\.
cfg/g"
${
top_dir
}
/src/util/src/tconfig.c
sed
-i
"s/etc
\/
taos/etc
\/
ProDB/g"
${
top_dir
}
/src/util/src/tconfig.c
# src/util/src/tlog.c
sed
-i
"s/log
\/
taos/log
\/
ProDB/g"
${
top_dir
}
/src/util/src/tlog.c
sed
-i
"s/log
\/
taos/log
\/
ProDB/g"
${
top_dir
}
/src/util/src/tlog.c
# src/dnode/src/dnodeSystem.c
sed
-i
"s/TDengine/ProDB/g"
${
top_dir
}
/src/dnode/src/dnodeSystem.c
sed
-i
"s/TDengine/ProDB/g"
${
top_dir
}
/src/dnode/src/dnodeMain.c
sed
-i
"s/taosdlog/prodlog/g"
${
top_dir
}
/src/dnode/src/dnodeMain.c
sed
-i
"s/TDengine/ProDB/g"
${
top_dir
}
/src/dnode/src/dnodeMain.c
sed
-i
"s/taosdlog/prodlog/g"
${
top_dir
}
/src/dnode/src/dnodeMain.c
# src/client/src/tscSystem.c
sed
-i
"s/taoslog/prolog/g"
${
top_dir
}
/src/client/src/tscSystem.c
sed
-i
"s/taoslog/prolog/g"
${
top_dir
}
/src/client/src/tscSystem.c
# src/util/src/tnote.c
sed
-i
"s/taosinfo/proinfo/g"
${
top_dir
}
/src/util/src/tnote.c
sed
-i
"s/taosinfo/proinfo/g"
${
top_dir
}
/src/util/src/tnote.c
# src/dnode/CMakeLists.txt
sed
-i
"s/taos
\.
cfg/prodb
\.
cfg/g"
${
top_dir
}
/src/dnode/CMakeLists.txt
echo
"SET_TARGET_PROPERTIES(taosd PROPERTIES OUTPUT_NAME prodbs)"
>>
${
top_dir
}
/src/dnode/CMakeLists.txt
sed
-i
"s/taos
\.
cfg/prodb
\.
cfg/g"
${
top_dir
}
/src/dnode/CMakeLists.txt
echo
"SET_TARGET_PROPERTIES(taosd PROPERTIES OUTPUT_NAME prodbs)"
>>
${
top_dir
}
/src/dnode/CMakeLists.txt
# src/os/src/linux/linuxEnv.c
sed
-i
"s/etc
\/
taos/etc
\/
ProDB/g"
${
top_dir
}
/src/os/src/linux/linuxEnv.c
sed
-i
"s/lib
\/
taos/lib
\/
ProDB/g"
${
top_dir
}
/src/os/src/linux/linuxEnv.c
...
...
@@ -53,14 +53,27 @@ function replace_community_pro(){
sed
-i
"s/taosd is quiting/prodbs is quiting/g"
${
top_dir
}
/src/plugins/monitor/src/monMain.c
}
function
replace_enterprise_pro
(){
function
replace_enterprise_pro
()
{
# enterprise/src/kit/perfMonitor/perfMonitor.c
sed
-i
"s/
\"
taosdata
\"
/
\"
prodb
\"
/g"
${
top_dir
}
/../enterprise/src/kit/perfMonitor/perfMonitor.c
sed
-i
"s/TDengine/ProDB/g"
${
top_dir
}
/../enterprise/src/kit/perfMonitor/perfMonitor.c
# enterprise/src/plugins/admin/src/httpAdminHandle.c
sed
-i
"s/taos
\.
cfg/prodb
\.
cfg/g"
${
top_dir
}
/../enterprise/src/plugins/admin/src/httpAdminHandle.c
sed
-i
"s/taos
\.
cfg/prodb
\.
cfg/g"
${
top_dir
}
/../enterprise/src/plugins/admin/src/httpAdminHandle.c
# enterprise/src/plugins/grant/src/grantMain.c
sed
-i
"s/taos
\.
cfg/prodb
\.
cfg/g"
${
top_dir
}
/../enterprise/src/plugins/grant/src/grantMain.c
sed
-i
"s/taos
\.
cfg/prodb
\.
cfg/g"
${
top_dir
}
/../enterprise/src/plugins/grant/src/grantMain.c
# enterprise/src/plugins/module/src/moduleMain.c
sed
-i
"s/taos
\.
cfg/prodb
\.
cfg/g"
${
top_dir
}
/../enterprise/src/plugins/module/src/moduleMain.c
sed
-i
"s/taos
\.
cfg/prodb
\.
cfg/g"
${
top_dir
}
/../enterprise/src/plugins/module/src/moduleMain.c
# enterprise/src/plugins/web
sed
-i
-e
's/www.taosdata.com/www.hanatech.com.cn/g'
$(
grep
-r
'www.taosdata.com'
${
top_dir
}
/../enterprise/src/plugins/web |
sed
-r
"s/(.*
\.
html):
\s
*(.*)/
\1
/g"
)
sed
-i
-e
's/TAOS Data/Hanatech/g'
$(
grep
-r
'TAOS Data'
${
top_dir
}
/../enterprise/src/plugins/web |
sed
-r
"s/(.*
\.
html):
\s
*(.*)/
\1
/g"
)
sed
-i
-e
's/taosd/prodbs/g'
$(
grep
-r
'taosd'
${
top_dir
}
/../enterprise/src/plugins/web |
grep
-E
'*\.js\s*.*'
|
sed
-r
-e
's/(.*\.js):\s*(.*)/\1/g'
|
sort
|
uniq
)
# enterprise/src/plugins/web/admin/monitor.html
sed
-i
-e
's/<th style="font-weight: normal">taosd<\/th>/<th style="font-weight: normal">prodbs<\/th>/g'
${
top_dir
}
/../enterprise/src/plugins/web/admin/monitor.html
sed
-i
-e
"s/data:
\[
'taosd', 'system'
\]
,/data:
\[
'prodbs', 'system'
\]
,/g"
${
top_dir
}
/../enterprise/src/plugins/web/admin/monitor.html
sed
-i
-e
"s/name: 'taosd',/name: 'prodbs',/g"
${
top_dir
}
/../enterprise/src/plugins/web/admin/monitor.html
# enterprise/src/plugins/web/admin/*.html
sed
-i
"s/TDengine/ProDB/g"
${
top_dir
}
/../enterprise/src/plugins/web/admin/
*
.html
# enterprise/src/plugins/web/admin/js/*.js
sed
-i
"s/TDengine/ProDB/g"
${
top_dir
}
/../enterprise/src/plugins/web/admin/js/
*
.js
}
packaging/tools/makepkg.sh
浏览文件 @
c0e71c28
#!/bin/bash
#
# Generate tar.gz package for all os system
source
./sed_replace.sh
set
-e
#set -x
...
...
@@ -27,16 +28,40 @@ release_dir="${top_dir}/release"
if
[
$dbName
==
"power"
]
;
then
productName
=
"PowerDB"
serverName
=
"powerd"
clientName
=
"power"
cfgDirName
=
"power.cfg"
tarName
=
"power.tar.gz"
elif
[
$dbName
==
"tq"
]
;
then
productName
=
"TQ"
serverName
=
"tqd"
clientName
=
"tq"
cfgDirName
=
"tq.cfg"
tarName
=
"tq.tar.gz"
elif
[
$dbName
==
"pro"
]
;
then
productName
=
"ProDB"
serverName
=
"prodbs"
clientName
=
"prodbc"
cfgDirName
=
"prodb.cfg"
tarName
=
"prodb.tar.gz"
elif
[
$dbName
==
"kh"
]
;
then
productName
=
"KingHistorian"
serverName
=
"khserver"
clientName
=
"khclient"
cfgDirName
=
"kinghistorian.cfg"
tarName
=
"kinghistorian.tar.gz"
elif
[
$dbName
==
"jh"
]
;
then
productName
=
"jh_iot"
serverName
=
"jh_taosd"
clientName
=
"jh_taos"
cfgDirName
=
"jh_taos.cfg"
tarName
=
"jh_taos.tar.gz"
else
productName
=
"TDengine"
serverName
=
"taosd"
clientName
=
"taos"
cfgDirName
=
"taos.cfg"
tarName
=
"taos.tar.gz"
fi
#package_name='linux'
...
...
@@ -60,14 +85,14 @@ fi
# Directories and files
if
[
"
$pagMode
"
==
"lite"
]
;
then
strip
${
build_dir
}
/bin/
taosd
strip
${
build_dir
}
/bin/
${
serverName
}
strip
${
build_dir
}
/bin/taos
# lite version doesn't include taosadapter, which will lead to no restful interface
bin_files
=
"
${
build_dir
}
/bin/
taosd
${
build_dir
}
/bin/taos
${
script_dir
}
/remove.sh
${
script_dir
}
/startPre.sh"
bin_files
=
"
${
build_dir
}
/bin/
${
serverName
}
${
build_dir
}
/bin/
${
clientName
}
${
script_dir
}
/remove.sh
${
script_dir
}
/startPre.sh"
taostools_bin_files
=
""
else
bin_files
=
"
${
build_dir
}
/bin/
taosd
\
${
build_dir
}
/bin/
taos
\
bin_files
=
"
${
build_dir
}
/bin/
${
serverName
}
\
${
build_dir
}
/bin/
${
clientName
}
\
${
build_dir
}
/bin/taosadapter
\
${
build_dir
}
/bin/tarbitrator
\
${
script_dir
}
/remove.sh
\
...
...
@@ -91,22 +116,15 @@ fi
install_files
=
"
${
script_dir
}
/install.sh"
nginx_dir
=
"
${
code_dir
}
/../../enterprise/src/plugins/web"
# Init file
#init_dir=${script_dir}/deb
#if [ $package_type = "centos" ]; then
# init_dir=${script_dir}/rpm
#fi
#init_files=${init_dir}/taosd
# temp use rpm's taosd. TODO: later modify according to os type
init_file_deb
=
${
script_dir
}
/../deb/taosd
init_file_rpm
=
${
script_dir
}
/../rpm/taosd
init_file_deb
=
${
script_dir
}
/../deb/
${
serverName
}
init_file_rpm
=
${
script_dir
}
/../rpm/
${
serverName
}
init_file_tarbitrator_deb
=
${
script_dir
}
/../deb/tarbitratord
init_file_tarbitrator_rpm
=
${
script_dir
}
/../rpm/tarbitratord
# make directories.
mkdir
-p
${
install_dir
}
mkdir
-p
${
install_dir
}
/inc
&&
cp
${
header_files
}
${
install_dir
}
/inc
mkdir
-p
${
install_dir
}
/cfg
&&
cp
${
cfg_dir
}
/
taos.cfg
${
install_dir
}
/cfg/taos.cfg
mkdir
-p
${
install_dir
}
/cfg
&&
cp
${
cfg_dir
}
/
${
cfgDirName
}
${
install_dir
}
/cfg/
${
cfgDirName
}
if
[
-f
"
${
compile_dir
}
/test/cfg/taosadapter.toml"
]
;
then
cp
${
compile_dir
}
/test/cfg/taosadapter.toml
${
install_dir
}
/cfg
||
:
...
...
@@ -116,8 +134,8 @@ if [ -f "${compile_dir}/test/cfg/taosadapter.service" ]; then
cp
${
compile_dir
}
/test/cfg/taosadapter.service
${
install_dir
}
/cfg
||
:
fi
if
[
-f
"
${
cfg_dir
}
/
taosd
.service"
]
;
then
cp
${
cfg_dir
}
/
taosd
.service
${
install_dir
}
/cfg
||
:
if
[
-f
"
${
cfg_dir
}
/
${
serverName
}
.service"
]
;
then
cp
${
cfg_dir
}
/
${
serverName
}
.service
${
install_dir
}
/cfg
||
:
fi
if
[
-f
"
${
cfg_dir
}
/tarbitratord.service"
]
;
then
...
...
@@ -129,8 +147,8 @@ if [ -f "${cfg_dir}/nginxd.service" ]; then
fi
mkdir
-p
${
install_dir
}
/bin
&&
cp
${
bin_files
}
${
install_dir
}
/bin
&&
chmod
a+x
${
install_dir
}
/bin/
*
||
:
mkdir
-p
${
install_dir
}
/init.d
&&
cp
${
init_file_deb
}
${
install_dir
}
/init.d/
taosd
.deb
mkdir
-p
${
install_dir
}
/init.d
&&
cp
${
init_file_rpm
}
${
install_dir
}
/init.d/
taosd
.rpm
mkdir
-p
${
install_dir
}
/init.d
&&
cp
${
init_file_deb
}
${
install_dir
}
/init.d/
${
serverName
}
.deb
mkdir
-p
${
install_dir
}
/init.d
&&
cp
${
init_file_rpm
}
${
install_dir
}
/init.d/
${
serverName
}
.rpm
mkdir
-p
${
install_dir
}
/init.d
&&
cp
${
init_file_tarbitrator_deb
}
${
install_dir
}
/init.d/tarbitratord.deb
||
:
mkdir
-p
${
install_dir
}
/init.d
&&
cp
${
init_file_tarbitrator_rpm
}
${
install_dir
}
/init.d/tarbitratord.rpm
||
:
...
...
@@ -209,10 +227,10 @@ if [ "$verMode" == "cluster" ]; then
fi
cd
${
install_dir
}
tar
-zcv
-f
taos.tar.gz
*
--remove-files
||
:
tar
-zcv
-f
${
tarName
}
*
--remove-files
||
:
exitcode
=
$?
if
[
"
$exitcode
"
!=
"0"
]
;
then
echo
"tar
taos.tar.gz
error !!!"
echo
"tar
${
tarName
}
error !!!"
exit
$exitcode
fi
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录