Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
c46d0076
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看板
提交
c46d0076
编写于
11月 30, 2021
作者:
Z
zyyang-taosdata
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TS-505]<release>: install.sh error in centos
上级
a7c5785d
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
168 addition
and
72 deletion
+168
-72
packaging/cfg/nginxd.service
packaging/cfg/nginxd.service
+22
-0
packaging/cfg/taosd.service
packaging/cfg/taosd.service
+21
-0
packaging/cfg/tarbitratord.service
packaging/cfg/tarbitratord.service
+20
-0
packaging/release.sh
packaging/release.sh
+13
-5
packaging/tools/install.sh
packaging/tools/install.sh
+82
-67
packaging/tools/makepkg.sh
packaging/tools/makepkg.sh
+10
-0
未找到文件。
packaging/cfg/nginxd.service
0 → 100644
浏览文件 @
c46d0076
[Unit]
Description
=
Nginx For TDengine Service
After
=
network-online.target
Wants
=
network-online.target
[Service]
Type
=
forking
PIDFile
=
/usr/local/nginxd/logs/nginx.pid
ExecStart
=
/usr/local/nginxd/sbin/nginx
ExecStop
=
/usr/local/nginxd/sbin/nginx -s stop
TimeoutStopSec
=
1000000s
LimitNOFILE
=
infinity
LimitNPROC
=
infinity
LimitCORE
=
infinity
TimeoutStartSec
=
0
StandardOutput
=
null
Restart
=
always
StartLimitBurst
=
3
StartLimitInterval
=
60s
[Install]
WantedBy
=
multi-user.target
packaging/cfg/taosd.service
0 → 100644
浏览文件 @
c46d0076
[Unit]
Description
=
TDengine server service
After
=
network-online.target
Wants
=
network-online.target
[Service]
Type
=
simple
ExecStart
=
/usr/bin/taosd
ExecStartPre
=
/usr/local/taos/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/cfg/tarbitratord.service
0 → 100644
浏览文件 @
c46d0076
[Unit]
Description
=
TDengine arbitrator service
After
=
network-online.target
Wants
=
network-online.target
[Service]
Type
=
simple
ExecStart
=
/usr/bin/tarbitrator
TimeoutStopSec
=
1000000s
LimitNOFILE
=
infinity
LimitNPROC
=
infinity
LimitCORE
=
infinity
TimeoutStartSec
=
0
StandardOutput
=
null
Restart
=
always
StartLimitBurst
=
3
StartLimitInterval
=
60s
[Install]
WantedBy
=
multi-user.target
packaging/release.sh
浏览文件 @
c46d0076
...
...
@@ -14,6 +14,7 @@ set -e
# -d [taos | power | tq | pro | kh | jh]
# -n [2.0.0.3]
# -m [2.0.0.0]
# -H [ false | true]
# set parameters by default value
verMode
=
edge
# [cluster, edge]
...
...
@@ -26,8 +27,9 @@ dbName=taos # [taos | power | tq | pro | kh | jh]
allocator
=
glibc
# [glibc | jemalloc]
verNumber
=
""
verNumberComp
=
"1.0.0.0"
httpdBuild
=
false
while
getopts
"hv:V:c:o:l:s:d:a:n:m:"
arg
while
getopts
"hv:V:c:o:l:s:d:a:n:m:
H:
"
arg
do
case
$arg
in
v
)
...
...
@@ -70,6 +72,10 @@ do
#echo "osType=$OPTARG"
osType
=
$(
echo
$OPTARG
)
;;
H
)
#echo "httpdBuild=$OPTARG"
httpdBuild
=
$(
echo
$OPTARG
)
;;
h
)
echo
"Usage:
`
basename
$0
`
-v [cluster | edge] "
echo
" -c [aarch32 | aarch64 | x64 | x86 | mips64 ...] "
...
...
@@ -81,6 +87,7 @@ do
echo
" -d [taos | power | tq | pro | kh | jh] "
echo
" -n [version number] "
echo
" -m [compatible version number] "
echo
" -H [false | true] "
exit
0
;;
?
)
#unknow option
...
...
@@ -90,7 +97,7 @@ do
esac
done
echo
"verMode=
${
verMode
}
verType=
${
verType
}
cpuType=
${
cpuType
}
osType=
${
osType
}
pagMode=
${
pagMode
}
soMode=
${
soMode
}
dbName=
${
dbName
}
allocator=
${
allocator
}
verNumber=
${
verNumber
}
verNumberComp=
${
verNumberComp
}
"
echo
"verMode=
${
verMode
}
verType=
${
verType
}
cpuType=
${
cpuType
}
osType=
${
osType
}
pagMode=
${
pagMode
}
soMode=
${
soMode
}
dbName=
${
dbName
}
allocator=
${
allocator
}
verNumber=
${
verNumber
}
verNumberComp=
${
verNumberComp
}
httpdBuild=
${
httpdBuild
}
"
curr_dir
=
$(
pwd
)
...
...
@@ -405,9 +412,10 @@ if [[ "$dbName" == "jh" ]]; then
# TODO: src/dnode/CMakeLists.txt
fi
echo
"build
${
pagMode
}
package ..."
if
[[
"
$pagMode
"
==
"lite"
]]
;
then
if
[[
"
$httpdBuild
"
==
"true"
]]
;
then
BUILD_HTTP
=
true
else
BUILD_HTTP
=
false
fi
# check support cpu type
...
...
@@ -484,7 +492,7 @@ if [[ "$allocator" == "jemalloc" ]]; then
# jemalloc need compile first, so disable parallel build
make
V
=
1
&&
${
csudo
}
make
install
else
make
-j8
&&
${
csudo
}
make
install
make
&&
${
csudo
}
make
install
fi
cd
${
curr_dir
}
...
...
packaging/tools/install.sh
浏览文件 @
c46d0076
...
...
@@ -676,78 +676,93 @@ function clean_service_on_systemd() {
function
install_service_on_systemd
()
{
clean_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 taosadapter.service' >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo 'Wants=network-online.target taosadapter.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
}
"
${
csudo
}
bash
-c
"echo 'ExecStart=/usr/bin/taosd' >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo 'ExecStartPre=/usr/local/taos/bin/startPre.sh' >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo 'TimeoutStopSec=1000000s' >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo 'LimitNOFILE=infinity' >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo 'LimitNPROC=infinity' >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo 'LimitCORE=infinity' >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo 'TimeoutStartSec=0' >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo 'StandardOutput=null' >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo 'Restart=always' >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo 'StartLimitBurst=3' >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo 'StartLimitInterval=60s' >>
${
taosd_service_config
}
"
#${csudo} bash -c "echo 'StartLimitIntervalSec=60s' >> ${taosd_service_config}"
${
csudo
}
bash
-c
"echo >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo '[Install]' >>
${
taosd_service_config
}
"
${
csudo
}
bash
-c
"echo 'WantedBy=multi-user.target' >>
${
taosd_service_config
}
"
[
-f
${
script_dir
}
/cfg/taosd.service
]
&&
\
${
csudo
}
cp
${
script_dir
}
/cfg/taosd.service
\
${
service_config_dir
}
/
||
:
${
csudo
}
systemctl daemon-reload
#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 taosadapter.service' >> ${taosd_service_config}"
#${csudo} bash -c "echo 'Wants=network-online.target taosadapter.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}"
#${csudo} bash -c "echo 'ExecStart=/usr/bin/taosd' >> ${taosd_service_config}"
#${csudo} bash -c "echo 'ExecStartPre=/usr/local/taos/bin/startPre.sh' >> ${taosd_service_config}"
#${csudo} bash -c "echo 'TimeoutStopSec=1000000s' >> ${taosd_service_config}"
#${csudo} bash -c "echo 'LimitNOFILE=infinity' >> ${taosd_service_config}"
#${csudo} bash -c "echo 'LimitNPROC=infinity' >> ${taosd_service_config}"
#${csudo} bash -c "echo 'LimitCORE=infinity' >> ${taosd_service_config}"
#${csudo} bash -c "echo 'TimeoutStartSec=0' >> ${taosd_service_config}"
#${csudo} bash -c "echo 'StandardOutput=null' >> ${taosd_service_config}"
#${csudo} bash -c "echo 'Restart=always' >> ${taosd_service_config}"
#${csudo} bash -c "echo 'StartLimitBurst=3' >> ${taosd_service_config}"
#${csudo} bash -c "echo 'StartLimitInterval=60s' >> ${taosd_service_config}"
##${csudo} bash -c "echo 'StartLimitIntervalSec=60s' >> ${taosd_service_config}"
#${csudo} bash -c "echo >> ${taosd_service_config}"
#${csudo} bash -c "echo '[Install]' >> ${taosd_service_config}"
#${csudo} bash -c "echo 'WantedBy=multi-user.target' >> ${taosd_service_config}"
${
csudo
}
systemctl
enable
taosd
tarbitratord_service_config
=
"
${
service_config_dir
}
/tarbitratord.service"
${
csudo
}
bash
-c
"echo '[Unit]' >>
${
tarbitratord_service_config
}
"
${
csudo
}
bash
-c
"echo 'Description=TDengine arbitrator service' >>
${
tarbitratord_service_config
}
"
${
csudo
}
bash
-c
"echo 'After=network-online.target' >>
${
tarbitratord_service_config
}
"
${
csudo
}
bash
-c
"echo 'Wants=network-online.target' >>
${
tarbitratord_service_config
}
"
${
csudo
}
bash
-c
"echo >>
${
tarbitratord_service_config
}
"
${
csudo
}
bash
-c
"echo '[Service]' >>
${
tarbitratord_service_config
}
"
${
csudo
}
bash
-c
"echo 'Type=simple' >>
${
tarbitratord_service_config
}
"
${
csudo
}
bash
-c
"echo 'ExecStart=/usr/bin/tarbitrator' >>
${
tarbitratord_service_config
}
"
${
csudo
}
bash
-c
"echo 'TimeoutStopSec=1000000s' >>
${
tarbitratord_service_config
}
"
${
csudo
}
bash
-c
"echo 'LimitNOFILE=infinity' >>
${
tarbitratord_service_config
}
"
${
csudo
}
bash
-c
"echo 'LimitNPROC=infinity' >>
${
tarbitratord_service_config
}
"
${
csudo
}
bash
-c
"echo 'LimitCORE=infinity' >>
${
tarbitratord_service_config
}
"
${
csudo
}
bash
-c
"echo 'TimeoutStartSec=0' >>
${
tarbitratord_service_config
}
"
${
csudo
}
bash
-c
"echo 'StandardOutput=null' >>
${
tarbitratord_service_config
}
"
${
csudo
}
bash
-c
"echo 'Restart=always' >>
${
tarbitratord_service_config
}
"
${
csudo
}
bash
-c
"echo 'StartLimitBurst=3' >>
${
tarbitratord_service_config
}
"
${
csudo
}
bash
-c
"echo 'StartLimitInterval=60s' >>
${
tarbitratord_service_config
}
"
${
csudo
}
bash
-c
"echo >>
${
tarbitratord_service_config
}
"
${
csudo
}
bash
-c
"echo '[Install]' >>
${
tarbitratord_service_config
}
"
${
csudo
}
bash
-c
"echo 'WantedBy=multi-user.target' >>
${
tarbitratord_service_config
}
"
[
-f
${
script_dir
}
/cfg/tarbitratord.service
]
&&
\
${
csudo
}
cp
${
script_dir
}
/cfg/tarbitratord.service
\
${
service_config_dir
}
/
||
:
${
csudo
}
systemctl daemon-reload
#tarbitratord_service_config="${service_config_dir}/tarbitratord.service"
#${csudo} bash -c "echo '[Unit]' >> ${tarbitratord_service_config}"
#${csudo} bash -c "echo 'Description=TDengine arbitrator service' >> ${tarbitratord_service_config}"
#${csudo} bash -c "echo 'After=network-online.target' >> ${tarbitratord_service_config}"
#${csudo} bash -c "echo 'Wants=network-online.target' >> ${tarbitratord_service_config}"
#${csudo} bash -c "echo >> ${tarbitratord_service_config}"
#${csudo} bash -c "echo '[Service]' >> ${tarbitratord_service_config}"
#${csudo} bash -c "echo 'Type=simple' >> ${tarbitratord_service_config}"
#${csudo} bash -c "echo 'ExecStart=/usr/bin/tarbitrator' >> ${tarbitratord_service_config}"
#${csudo} bash -c "echo 'TimeoutStopSec=1000000s' >> ${tarbitratord_service_config}"
#${csudo} bash -c "echo 'LimitNOFILE=infinity' >> ${tarbitratord_service_config}"
#${csudo} bash -c "echo 'LimitNPROC=infinity' >> ${tarbitratord_service_config}"
#${csudo} bash -c "echo 'LimitCORE=infinity' >> ${tarbitratord_service_config}"
#${csudo} bash -c "echo 'TimeoutStartSec=0' >> ${tarbitratord_service_config}"
#${csudo} bash -c "echo 'StandardOutput=null' >> ${tarbitratord_service_config}"
#${csudo} bash -c "echo 'Restart=always' >> ${tarbitratord_service_config}"
#${csudo} bash -c "echo 'StartLimitBurst=3' >> ${tarbitratord_service_config}"
#${csudo} bash -c "echo 'StartLimitInterval=60s' >> ${tarbitratord_service_config}"
#${csudo} bash -c "echo >> ${tarbitratord_service_config}"
#${csudo} bash -c "echo '[Install]' >> ${tarbitratord_service_config}"
#${csudo} bash -c "echo 'WantedBy=multi-user.target' >> ${tarbitratord_service_config}"
#${csudo} systemctl enable tarbitratord
if
[
"
$verMode
"
==
"cluster"
]
;
then
nginx_service_config
=
"
${
service_config_dir
}
/nginxd.service"
${
csudo
}
bash
-c
"echo '[Unit]' >>
${
nginx_service_config
}
"
${
csudo
}
bash
-c
"echo 'Description=Nginx For TDengine Service' >>
${
nginx_service_config
}
"
${
csudo
}
bash
-c
"echo 'After=network-online.target' >>
${
nginx_service_config
}
"
${
csudo
}
bash
-c
"echo 'Wants=network-online.target' >>
${
nginx_service_config
}
"
${
csudo
}
bash
-c
"echo >>
${
nginx_service_config
}
"
${
csudo
}
bash
-c
"echo '[Service]' >>
${
nginx_service_config
}
"
${
csudo
}
bash
-c
"echo 'Type=forking' >>
${
nginx_service_config
}
"
${
csudo
}
bash
-c
"echo 'PIDFile=/usr/local/nginxd/logs/nginx.pid' >>
${
nginx_service_config
}
"
${
csudo
}
bash
-c
"echo 'ExecStart=/usr/local/nginxd/sbin/nginx' >>
${
nginx_service_config
}
"
${
csudo
}
bash
-c
"echo 'ExecStop=/usr/local/nginxd/sbin/nginx -s stop' >>
${
nginx_service_config
}
"
${
csudo
}
bash
-c
"echo 'TimeoutStopSec=1000000s' >>
${
nginx_service_config
}
"
${
csudo
}
bash
-c
"echo 'LimitNOFILE=infinity' >>
${
nginx_service_config
}
"
${
csudo
}
bash
-c
"echo 'LimitNPROC=infinity' >>
${
nginx_service_config
}
"
${
csudo
}
bash
-c
"echo 'LimitCORE=infinity' >>
${
nginx_service_config
}
"
${
csudo
}
bash
-c
"echo 'TimeoutStartSec=0' >>
${
nginx_service_config
}
"
${
csudo
}
bash
-c
"echo 'StandardOutput=null' >>
${
nginx_service_config
}
"
${
csudo
}
bash
-c
"echo 'Restart=always' >>
${
nginx_service_config
}
"
${
csudo
}
bash
-c
"echo 'StartLimitBurst=3' >>
${
nginx_service_config
}
"
${
csudo
}
bash
-c
"echo 'StartLimitInterval=60s' >>
${
nginx_service_config
}
"
${
csudo
}
bash
-c
"echo >>
${
nginx_service_config
}
"
${
csudo
}
bash
-c
"echo '[Install]' >>
${
nginx_service_config
}
"
${
csudo
}
bash
-c
"echo 'WantedBy=multi-user.target' >>
${
nginx_service_config
}
"
[
-f
${
script_dir
}
/cfg/nginxd.service
]
&&
\
${
csudo
}
cp
${
script_dir
}
/cfg/nginxd.service
\
${
service_config_dir
}
/
||
:
${
csudo
}
systemctl daemon-reload
#nginx_service_config="${service_config_dir}/nginxd.service"
#${csudo} bash -c "echo '[Unit]' >> ${nginx_service_config}"
#${csudo} bash -c "echo 'Description=Nginx For TDengine Service' >> ${nginx_service_config}"
#${csudo} bash -c "echo 'After=network-online.target' >> ${nginx_service_config}"
#${csudo} bash -c "echo 'Wants=network-online.target' >> ${nginx_service_config}"
#${csudo} bash -c "echo >> ${nginx_service_config}"
#${csudo} bash -c "echo '[Service]' >> ${nginx_service_config}"
#${csudo} bash -c "echo 'Type=forking' >> ${nginx_service_config}"
#${csudo} bash -c "echo 'PIDFile=/usr/local/nginxd/logs/nginx.pid' >> ${nginx_service_config}"
#${csudo} bash -c "echo 'ExecStart=/usr/local/nginxd/sbin/nginx' >> ${nginx_service_config}"
#${csudo} bash -c "echo 'ExecStop=/usr/local/nginxd/sbin/nginx -s stop' >> ${nginx_service_config}"
#${csudo} bash -c "echo 'TimeoutStopSec=1000000s' >> ${nginx_service_config}"
#${csudo} bash -c "echo 'LimitNOFILE=infinity' >> ${nginx_service_config}"
#${csudo} bash -c "echo 'LimitNPROC=infinity' >> ${nginx_service_config}"
#${csudo} bash -c "echo 'LimitCORE=infinity' >> ${nginx_service_config}"
#${csudo} bash -c "echo 'TimeoutStartSec=0' >> ${nginx_service_config}"
#${csudo} bash -c "echo 'StandardOutput=null' >> ${nginx_service_config}"
#${csudo} bash -c "echo 'Restart=always' >> ${nginx_service_config}"
#${csudo} bash -c "echo 'StartLimitBurst=3' >> ${nginx_service_config}"
#${csudo} bash -c "echo 'StartLimitInterval=60s' >> ${nginx_service_config}"
#${csudo} bash -c "echo >> ${nginx_service_config}"
#${csudo} bash -c "echo '[Install]' >> ${nginx_service_config}"
#${csudo} bash -c "echo 'WantedBy=multi-user.target' >> ${nginx_service_config}"
if
!
${
csudo
}
systemctl
enable
nginxd &> /dev/null
;
then
${
csudo
}
systemctl daemon-reexec
${
csudo
}
systemctl
enable
nginxd
...
...
packaging/tools/makepkg.sh
浏览文件 @
c46d0076
...
...
@@ -86,6 +86,16 @@ 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
||
:
fi
if
[
-f
"
${
cfg_dir
}
/tarbitratord.service"
]
;
then
cp
${
cfg_dir
}
/tarbitratord.service
${
install_dir
}
/cfg
||
:
fi
if
[
-f
"
${
cfg_dir
}
/nginxd.service"
]
;
then
cp
${
cfg_dir
}
/nginxd.service
${
install_dir
}
/cfg
||
:
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
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录