TDengine多种安装包的安装和卸载
TDengine开源版本提供deb、rpm、tar.gz三种安装包,用户可以根据自己的运行环境选择合适的安装包。
其中deb支持ubuntu系统,rpm支持centos系统,tar.gz包两种系统都支持。
deb包的安装和卸载
一、安装
1、从官网下载获得deb安装包,比如tdengine-1.6.1.5.deb;
2、进入到tdengine-1.6.1.5.deb安装包所在目录,执行如下的安装命令:
plum@ubuntu:~/git/taosv16$ sudo dpkg -i tdengine-1.6.1.5.deb
Selecting previously unselected package tdengine.
(Reading database ... 193536 files and directories currently installed.)
Preparing to unpack tdengine-1.6.1.5.deb ...
Unpacking tdengine (1.6.1.5) ...
Setting up tdengine (1.6.1.5) ...
Start to install TDEngine...
Created symlink from /etc/systemd/system/multi-user.target.wants/taosd.service to /etc/systemd/system/taosd.service.
TDengine is installed successfully!
To configure TDengine : edit /etc/taos/taos.cfg
To start TDengine : sudo systemctl start taosd
To access TDengine : use taos in shell
TDengine is installed successfully!
二、卸载
卸载命令如下:
plum@ubuntu:~/git/tdengine/debs$ sudo dpkg -r tdengine
(Reading database ... 193718 files and directories currently installed.)
Removing tdengine (1.6.1.5) ...
TDEngine is removed successfully!
plum@ubuntu:~/git/tdengine/debs$
rpm包的安装和卸载
一、安装
1、从官网下载获得rpm安装包,比如tdengine-1.6.1.5-3.el7.x86_64.rpm;
2、进入到tdengine-1.6.1.5-3.el7.x86_64.rpm安装包所在目录,执行如下的安装命令:
[root@bogon x86_64]# rpm -iv tdengine-1.6.1.5-3.el7.x86_64.rpm
Preparing packages...
tdengine-1.6.1.5-3.el7.x86_64
Start to install TDEngine...
Created symlink from /etc/systemd/system/multi-user.target.wants/taosd.service to /etc/systemd/system/taosd.service.
TDengine is installed successfully!
To configure TDengine : edit /etc/taos/taos.cfg
To start TDengine : sudo systemctl start taosd
To access TDengine : use taos in shell
TDengine is installed successfully!
二、卸载
卸载命令如下:
[root@bogon x86_64]# rpm -e tdengine
TDEngine is removed successfully!
tar.gz包的安装和卸载
一、安装
1、从官网下载获得tar.gz安装包,比如taos-1.6.1.5-linux-2019-08-08-11-02.tar.gz;
2、进入到taos-1.6.1.5-linux-2019-08-08-11-02.tar.gz安装包所在目录,先解压文件后,进入子目录,执行其中的install.sh安装脚本:
plum@ubuntu:~/git/tdengine/release$ sudo tar -xzvf taos-1.6.1.5-linux-2019-08-08-11-02.tar.gz
plum@ubuntu:~/git/tdengine/release$ ll
total 3796
drwxr-xr-x 3 root root 4096 Aug 9 14:20 ./
drwxrwxr-x 11 plum plum 4096 Aug 8 11:03 ../
drwxr-xr-x 5 root root 4096 Aug 8 11:03 taos-1.6.1.5-linux-2019-08-08-11-02/
-rw-r--r-- 1 root root 3871844 Aug 8 11:03 taos-1.6.1.5-linux-2019-08-08-11-02.tar.gz
plum@ubuntu:~/git/tdengine/release$ cd taos-1.6.1.5-linux-2019-08-08-11-02/
plum@ubuntu:~/git/tdengine/release/taos-1.6.1.5-linux-2019-08-08-11-02$ ll
total 2640
drwxr-xr-x 5 root root 4096 Aug 8 11:03 ./
drwxr-xr-x 3 root root 4096 Aug 9 14:20 ../
drwxr-xr-x 5 root root 4096 Aug 8 11:03 connector/
drwxr-xr-x 2 root root 4096 Aug 8 11:03 driver/
drwxr-xr-x 8 root root 4096 Aug 8 11:03 examples/
-rwxr-xr-x 1 root root 87 Aug 8 11:03 install_client.sh*
-rwxr-xr-x 1 root root 13095 Aug 8 11:03 install.sh*
-rw-r--r-- 1 root root 6253 Aug 8 11:03 release_note
-rw-r--r-- 1 root root 2651954 Aug 8 11:03 taos.tar.gz
plum@ubuntu:~/git/tdengine/release/taos-1.6.1.5-linux-2019-08-08-11-02$ sudo ./install.sh
Start to install TDEngine...
Created symlink from /etc/systemd/system/multi-user.target.wants/taosd.service to /etc/systemd/system/taosd.service.
TDengine is installed successfully!
To configure TDengine : edit /etc/taos/taos.cfg
To start TDengine : sudo systemctl start taosd
To access TDengine : use taos in shell
TDengine is installed successfully!
二、卸载
卸载命令如下:
plum@ubuntu:~/git/tdengine/release/taos-1.6.1.5-linux-2019-08-08-11-02$ rmtaos
TDEngine is removed successfully!
安装目录说明
TDengine成功安装后,主安装目录是/usr/local/taos,目录内容如下:
plum@ubuntu:/usr/local/taos$ cd /usr/local/taos
plum@ubuntu:/usr/local/taos$ ll
total 36
drwxr-xr-x 9 root root 4096 Aug 9 14:33 ./
drwxr-xr-x 13 root root 4096 Aug 9 14:33 ../
drwxr-xr-x 2 root root 4096 Aug 9 14:33 bin/
drwxr-xr-x 2 root root 4096 Aug 9 14:33 cfg/
drwxr-xr-x 5 root root 4096 Aug 9 14:33 connector/
lrwxrwxrwx 1 root root 13 Aug 9 14:33 data -> /var/lib/taos/
drwxr-xr-x 2 root root 4096 Aug 9 14:33 driver/
drwxr-xr-x 8 root root 4096 Aug 9 14:33 examples/
drwxr-xr-x 2 root root 4096 Aug 9 14:33 include/
drwxr-xr-x 2 root root 4096 Aug 9 14:33 init.d/
lrwxrwxrwx 1 root root 13 Aug 9 14:33 log -> /var/log/taos/
自动生成配置文件目录、数据库目录、日志目录。
配置文件缺省目录:/etc/taos/taos.cfg, 软链接到/usr/local/taos/cfg/taos.cfg;
数据库缺省目录:/var/lib/taos, 软链接到/usr/local/taos/data;
日志缺省目录:/var/log/taos, 软链接到/usr/local/taos/log;
/usr/local/taos/bin目录下的可执行文件,会软链接到/usr/bin目录下;
/usr/local/taos/driver目录下的动态库文件,会软链接到/usr/lib目录下;
/usr/local/taos/include目录下的头文件,会软链接到到/usr/include目录下;
注意事项
TDengine提供了多种安装包,但最好不要在一个系统上同时使用tar.gz安装包和deb或rpm安装包。否则会相互影响,导致在使用时出现问题。
对于deb包安装后,如果安装目录被手工误删了部分,出现卸载、或重新安装不能成功。此时,需要清除tdengine包的安装信息,执行如下命令:
plum@ubuntu:~/git/tdengine/$ sudo rm -f /var/lib/dpkg/info/tdengine*
然后再重新进行安装就可以了。
对于rpm包安装后,如果安装目录被手工误删了部分,出现卸载、或重新安装不能成功。此时,需要清除tdengine包的安装信息,执行如下命令:
[root@bogon x86_64]# rpm -e --noscripts tdengine
然后再重新进行安装就可以了。