Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
a8b53c24
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看板
未验证
提交
a8b53c24
编写于
11月 05, 2021
作者:
sangshuduo
提交者:
GitHub
11月 05, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-10863]<fix>: blm3 service on centos7 (#8565)
上级
4b8fffcf
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
57 addition
and
10 deletion
+57
-10
packaging/check_package.sh
packaging/check_package.sh
+2
-1
packaging/deb/DEBIAN/preinst
packaging/deb/DEBIAN/preinst
+4
-0
packaging/deb/makedeb.sh
packaging/deb/makedeb.sh
+3
-0
packaging/rpm/tdengine.spec
packaging/rpm/tdengine.spec
+10
-2
packaging/tools/install.sh
packaging/tools/install.sh
+9
-2
packaging/tools/make_install.sh
packaging/tools/make_install.sh
+9
-2
packaging/tools/post.sh
packaging/tools/post.sh
+8
-2
packaging/tools/preun.sh
packaging/tools/preun.sh
+9
-0
packaging/tools/remove.sh
packaging/tools/remove.sh
+2
-0
packaging/tools/startPre.sh
packaging/tools/startPre.sh
+0
-1
src/plugins/CMakeLists.txt
src/plugins/CMakeLists.txt
+1
-0
未找到文件。
packaging/check_package.sh
浏览文件 @
a8b53c24
...
...
@@ -179,7 +179,8 @@ function check_header_path() {
function
check_blm3_config_dir
()
{
# check all config
check_file
${
cfg_install_dir
}
blm3.toml
check_file
${
cfg_install_dir
}
blm.toml
check_file
${
cfg_install_dir
}
blm3.service
check_file
${
install_main_dir
}
/cfg blm.toml.org
echo
-e
"Check conf path:
\0
33[32mOK
\0
33[0m!"
}
...
...
packaging/deb/DEBIAN/preinst
浏览文件 @
a8b53c24
...
...
@@ -32,5 +32,9 @@ if [ -f "${install_main_dir}/blm.toml" ]; then
${
csudo
}
rm
-f
${
install_main_dir
}
/cfg/blm.toml
||
:
fi
if
[
-f
"
${
install_main_dir
}
/blm3.service"
]
;
then
${
csudo
}
rm
-f
${
install_main_dir
}
/cfg/blm3.service
||
:
fi
# there can not libtaos.so*, otherwise ln -s error
${
csudo
}
rm
-f
${
install_main_dir
}
/driver/libtaos
*
||
:
packaging/deb/makedeb.sh
浏览文件 @
a8b53c24
...
...
@@ -47,6 +47,9 @@ cp ${compile_dir}/../packaging/cfg/taos.cfg ${pkg_dir}${install_home_pat
if
[
-f
"
${
compile_dir
}
/test/cfg/blm.toml"
]
;
then
cp
${
compile_dir
}
/test/cfg/blm.toml
${
pkg_dir
}${
install_home_path
}
/cfg
fi
if
[
-f
"
${
compile_dir
}
/test/cfg/blm3.service"
]
;
then
cp
${
compile_dir
}
/test/cfg/blm3.service
${
pkg_dir
}${
install_home_path
}
/cfg
||
:
fi
cp
${
compile_dir
}
/../packaging/deb/taosd
${
pkg_dir
}${
install_home_path
}
/init.d
cp
${
compile_dir
}
/../packaging/tools/post.sh
${
pkg_dir
}${
install_home_path
}
/script
...
...
packaging/rpm/tdengine.spec
浏览文件 @
a8b53c24
...
...
@@ -57,6 +57,9 @@ cp %{_compiledir}/../packaging/cfg/taos.cfg %{buildroot}%{homepath}/cfg
if [ -f %{_compiledir}/test/cfg/blm.toml ]; then
cp %{_compiledir}/test/cfg/blm.toml %{buildroot}%{homepath}/cfg
fi
if [ -f %{_compiledir}/test/cfg/blm3.service ]; then
cp %{_compiledir}/test/cfg/blm3.service %{buildroot}%{homepath}/cfg
fi
cp %{_compiledir}/../packaging/rpm/taosd %{buildroot}%{homepath}/init.d
cp %{_compiledir}/../packaging/tools/post.sh %{buildroot}%{homepath}/script
cp %{_compiledir}/../packaging/tools/preun.sh %{buildroot}%{homepath}/script
...
...
@@ -153,16 +156,21 @@ if pidof taosd &> /dev/null; then
echo "Stop taosd service success!"
sleep 1
fi
# if taos.cfg already
softlink
, remove it
# if taos.cfg already
exist
, remove it
if [ -f %{cfg_install_dir}/taos.cfg ]; then
${csudo} rm -f %{homepath}/cfg/taos.cfg || :
fi
# if blm.toml already
softlink
, remove it
# if blm.toml already
exist
, remove it
if [ -f %{cfg_install_dir}/blm.toml ]; then
${csudo} rm -f %{homepath}/cfg/blm.toml || :
fi
# if blm3.service already softlink, remove it
if [ -f %{cfg_install_dir}/blm3.service ]; then
${csudo} rm -f %{homepath}/cfg/blm3.service || :
fi
# there can not libtaos.so*, otherwise ln -s error
${csudo} rm -f %{homepath}/driver/libtaos* || :
...
...
packaging/tools/install.sh
浏览文件 @
a8b53c24
...
...
@@ -679,8 +679,8 @@ function install_service_on_systemd() {
taosd_service_config
=
"
${
service_config_dir
}
/taosd.service"
${
csudo
}
bash
-c
"echo '[Unit]' >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo 'Description=TDengine server service' >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo 'After=network-online.target' >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo 'Wants=network-online.target' >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo 'After=network-online.target
blm3.service
' >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo 'Wants=network-online.target
blm3.service
' >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo '[Service]' >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo 'Type=simple' >>
${
taosd_service_config
}
"
...
...
@@ -756,6 +756,11 @@ function install_service_on_systemd() {
fi
}
function
install_blm3_service
()
{
[
-f
${
script_dir
}
/cfg/blm3.service
]
&&
\
${
csudo
}
cp
${
script_dir
}
/cfg/blm3.service
${
service_config_dir
}
/
}
function
install_service
()
{
if
((
${
service_mod
}
==
0
))
;
then
install_service_on_systemd
...
...
@@ -878,6 +883,7 @@ function update_TDengine() {
if
[
-z
$1
]
;
then
install_bin
install_service
install_blm3_service
install_config
install_blm3_config
...
...
@@ -959,6 +965,7 @@ function install_TDengine() {
# For installing new
install_bin
install_service
install_blm3_service
openresty_work
=
false
if
[
"
$verMode
"
==
"cluster"
]
;
then
...
...
packaging/tools/make_install.sh
浏览文件 @
a8b53c24
...
...
@@ -503,8 +503,8 @@ function install_service_on_systemd() {
${
csudo
}
bash
-c
"echo '[Unit]' >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo 'Description=TDengine server service' >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo 'After=network-online.target' >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo 'Wants=network-online.target' >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo 'After=network-online.target
blm3.service
' >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo 'Wants=network-online.target
blm3.service
' >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo '[Service]' >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo 'Type=simple' >>
${
taosd_service_config
}
"
...
...
@@ -525,6 +525,11 @@ function install_service_on_systemd() {
${
csudo
}
systemctl
enable
taosd
}
function
install_blm3_service
()
{
[
-f
${
script_dir
}
/cfg/blm3.service
]
&&
\
${
csudo
}
cp
${
script_dir
}
/cfg/blm3.service
${
service_config_dir
}
/
}
function
install_service
()
{
if
((
${
service_mod
}
==
0
))
;
then
install_service_on_systemd
...
...
@@ -566,6 +571,7 @@ function update_TDengine() {
if
[
"
$osType
"
!=
"Darwin"
]
;
then
install_service
install_blm3_service
fi
install_config
...
...
@@ -620,6 +626,7 @@ function install_TDengine() {
if
[
"
$osType
"
!=
"Darwin"
]
;
then
install_service
install_blm3_service
fi
install_config
...
...
packaging/tools/post.sh
浏览文件 @
a8b53c24
...
...
@@ -444,8 +444,8 @@ function install_service_on_systemd() {
${
csudo
}
bash
-c
"echo '[Unit]' >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo 'Description=TDengine server service' >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo 'After=network-online.target' >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo 'Wants=network-online.target' >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo 'After=network-online.target
blm3.service
' >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo 'Wants=network-online.target
blm3.service
' >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo '[Service]' >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo 'Type=simple' >>
${
taosd_service_config
}
"
...
...
@@ -466,6 +466,11 @@ function install_service_on_systemd() {
${
csudo
}
systemctl
enable
taosd
}
function
install_blm3_service
()
{
[
-f
${
script_dir
}
/cfg/blm3.service
]
&&
\
${
csudo
}
cp
${
script_dir
}
/cfg/blm3.service
${
service_config_dir
}
/
}
function
install_service
()
{
if
((
${
service_mod
}
==
0
))
;
then
install_service_on_systemd
...
...
@@ -497,6 +502,7 @@ function install_TDengine() {
install_avro_lib
install_bin
install_service
install_blm3_service
install_config
install_blm3_config
...
...
packaging/tools/preun.sh
浏览文件 @
a8b53c24
...
...
@@ -58,6 +58,12 @@ function kill_taosd() {
}
function
clean_service_on_systemd
()
{
blm3_service_config
=
"
${
service_config_dir
}
/blm3.service"
if
systemctl is-active
--quiet
blm3
;
then
echo
"blm3 is running, stopping it..."
${
csudo
}
systemctl stop blm3 &> /dev/null
||
echo
&> /dev/null
fi
taosd_service_config
=
"
${
service_config_dir
}
/
${
taos_service_name
}
.service"
if
systemctl is-active
--quiet
${
taos_service_name
}
;
then
...
...
@@ -67,6 +73,9 @@ function clean_service_on_systemd() {
${
csudo
}
systemctl disable
${
taos_service_name
}
&> /dev/null
||
echo
&> /dev/null
${
csudo
}
rm
-f
${
taosd_service_config
}
[
-f
${
blm3_service_config
}
]
&&
${
csudo
}
rm
-f
${
blm3_service_config
}
}
function
clean_service_on_sysvinit
()
{
...
...
packaging/tools/remove.sh
浏览文件 @
a8b53c24
...
...
@@ -111,12 +111,14 @@ function clean_log() {
function
clean_service_on_systemd
()
{
taosd_service_config
=
"
${
service_config_dir
}
/
${
taos_service_name
}
.service"
blm3_service_config
=
"
${
service_config_dir
}
/blm3.service"
if
systemctl is-active
--quiet
${
taos_service_name
}
;
then
echo
"TDengine taosd is running, stopping it..."
${
csudo
}
systemctl stop
${
taos_service_name
}
&> /dev/null
||
echo
&> /dev/null
fi
${
csudo
}
systemctl disable
${
taos_service_name
}
&> /dev/null
||
echo
&> /dev/null
${
csudo
}
rm
-f
${
taosd_service_config
}
[
-f
${
blm3_service_config
}
]
&&
${
sudo
}
rm
-f
${
blm3_service_config
}
tarbitratord_service_config
=
"
${
service_config_dir
}
/
${
tarbitrator_service_name
}
.service"
if
systemctl is-active
--quiet
${
tarbitrator_service_name
}
;
then
...
...
packaging/tools/startPre.sh
浏览文件 @
a8b53c24
...
...
@@ -48,4 +48,3 @@ if [ ${coreFlag} = "unlimited" ];then
fi
fi
/usr/bin/blm3 &
src/plugins/CMakeLists.txt
浏览文件 @
a8b53c24
...
...
@@ -45,6 +45,7 @@ ELSE ()
COMMAND cmake -E copy blm3
${
CMAKE_BINARY_DIR
}
/build/bin
COMMAND cmake -E make_directory
${
CMAKE_BINARY_DIR
}
/test/cfg/
COMMAND cmake -E copy ./example/config/blm.toml
${
CMAKE_BINARY_DIR
}
/test/cfg/
COMMAND cmake -E copy ./blm3.service
${
CMAKE_BINARY_DIR
}
/test/cfg/
)
ENDIF
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录