未验证 提交 281123f1 编写于 作者: sangshuduo's avatar sangshuduo 提交者: GitHub

Test/sangshuduo/td 13408 move example back (#10471)

* [TD-13408]<test>: move examples back

* [TD-13408]<test>: move examples back

* add examples/c to CMakeLists.txt

* update tests

* [TD-13408]<test>: move rust example back

* fix examples path for Windows

* fix tests/exmaples

* fix typo and spell mistakes
上级 4f24ebc0
......@@ -54,8 +54,8 @@ TDengine is removed successfully!
### 安装 rpm
1、从官网下载获得rpm安装包,比如TDengine-server-2.0.0.0-Linux-x64.rpm;
2、进入到TDengine-server-2.0.0.0-Linux-x64.rpm安装包所在目录,执行如下的安装命令:
1、从官网下载获得 rpm 安装包,比如 TDengine-server-2.0.0.0-Linux-x64.rpm;
2、进入到 TDengine-server-2.0.0.0-Linux-x64.rpm 安装包所在目录,执行如下的安装命令:
```
$ sudo rpm -ivh TDengine-server-2.4.0.7-Linux-x64.rpm
......@@ -94,8 +94,8 @@ TDengine is removed successfully!
### 安装 tar.gz 安装包
1、从官网下载获得tar.gz安装包,比如TDengine-server-2.0.0.0-Linux-x64.tar.gz;
2、进入到TDengine-server-2.0.0.0-Linux-x64.tar.gz安装包所在目录,先解压文件后,进入子目录,执行其中的install.sh安装脚本:
1、从官网下载获得 tar.gz 安装包,比如 TDengine-server-2.4.0.7-Linux-x64.tar.gz;
2、进入到 TDengine-server-2.4.0.7-Linux-x64.tar.gz 安装包所在目录,先解压文件后,进入子目录,执行其中的 install.sh 安装脚本:
```
$ tar xvzf TDengine-enterprise-server-2.4.0.7-Linux-x64.tar.gz
......@@ -141,7 +141,7 @@ Install taoskeeper as a standalone service
taoskeeper is installed, enable it by `systemctl enable taoskeeper`
```
说明:install.sh 安装脚本在执行过程中,会通过命令行交互界面询问一些配置信息。如果希望采取无交互安装方式,那么可以用 -e no 参数来执行 install.sh 脚本。运行 ./install.sh -h 指令可以查看所有参数的详细说明信息。
说明:install.sh 安装脚本在执行过程中,会通过命令行交互界面询问一些配置信息。如果希望采取无交互安装方式,那么可以用 -e no 参数来执行 install.sh 脚本。运行 `./install.sh -h` 指令可以查看所有参数的详细说明信息。
### tar.gz 安装后的卸载
......@@ -157,7 +157,7 @@ taosKeeper is removed successfully!
## 安装目录说明
TDengine成功安装后,主安装目录是/usr/local/taos,目录内容如下:
TDengine 成功安装后,主安装目录是 /usr/local/taos,目录内容如下:
```
$ cd /usr/local/taos
......@@ -176,24 +176,24 @@ lrwxrwxrwx 1 root root 13 Feb 22 09:34 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目录下;
- 配置文件缺省目录:/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 目录下;
## 卸载和更新文件说明
卸载安装包的时候,将保留配置文件、数据库文件和日志文件,即 /etc/taos/taos.cfg 、 /var/lib/taos 、 /var/log/taos 。如果用户确认后不需保留,可以手工删除,但一定要慎重,因为删除后,数据将永久丢失,不可以恢复!
如果是更新安装,当缺省配置文件( /etc/taos/taos.cfg )存在时,仍然使用已有的配置文件,安装包中携带的配置文件修改为taos.cfg.org保存在 /usr/local/taos/cfg/ 目录,可以作为设置配置参数的参考样例;如果不存在配置文件,就使用安装包中自带的配置文件。
如果是更新安装,当缺省配置文件( /etc/taos/taos.cfg )存在时,仍然使用已有的配置文件,安装包中携带的配置文件修改为 taos.cfg.orig 保存在 /usr/local/taos/cfg/ 目录,可以作为设置配置参数的参考样例;如果不存在配置文件,就使用安装包中自带的配置文件。
## 注意事项
- TDengine提供了多种安装包,但最好不要在一个系统上同时使用 tar.gz 安装包和 deb 或 rpm 安装包。否则会相互影响,导致在使用时出现问题。
- 对于deb包安装后,如果安装目录被手工误删了部分,出现卸载、或重新安装不能成功。此时,需要清除 tdengine 包的安装信息,执行如下命令:
- 对于deb包安装后,如果安装目录被手工误删了部分,出现卸载、或重新安装不能成功。此时,需要清除 TDengine 包的安装信息,执行如下命令:
```
$ sudo rm -f /var/lib/dpkg/info/tdengine*
......@@ -201,7 +201,7 @@ $ sudo rm -f /var/lib/dpkg/info/tdengine*
然后再重新进行安装就可以了。
- 对于rpm包安装后,如果安装目录被手工误删了部分,出现卸载、或重新安装不能成功。此时,需要清除tdengine包的安装信息,执行如下命令:
- 对于 rpm 包安装后,如果安装目录被手工误删了部分,出现卸载、或重新安装不能成功。此时,需要清除 TDengine 包的安装信息,执行如下命令:
```
$ sudo rpm -e --noscripts tdengine
......
......@@ -32,14 +32,14 @@ This command starts a docker container with TDengine server running and maps the
- **tdengine/tdengine**: the official TDengine published application image that is pulled
- **526aa188da767ae94b244226a2b2eec2b5f17dd8eff592893d9ec0cd0f3a1ccd**: The long character returned is the container ID, and we can also view the corresponding container by its container ID
Further, you can also use the `docker run` command to start the docker container running TDengine server, and use the `--name` command line parameter to name the container tdengine, use `--hostname` to specify the hostname as tdengine-server, and use `-v` to mount the local directory (-v) to synchronize the data inside the host and the container to prevent data loss after the container is deleted.
Further, you can also use the `docker run` command to start the docker container running TDengine server, and use the `--name` command line parameter to name the container TDengine, use `--hostname` to specify the hostname as TDengine-server, and use `-v` to mount the local directory (-v) to synchronize the data inside the host and the container to prevent data loss after the container is deleted.
```
docker run -d --name tdengine --hostname="tdengine-server" -v ~/work/taos/log:/var/log/taos -v ~/work/taos/data:/var/lib/taos -p 6030-6041:6030-6041 -p 6030-6041:6030-6041/udp tdengine/tdengine
```
- **--name tdengine**: set the container name, we can access the corresponding container by container name
- **--hostnamename=tdengine-server**: set the hostname of the Linux system inside the container, we can map the hostname and IP to solve the problem that the container IP may change.
- **--hostname=tdengine-server**: set the hostname of the Linux system inside the container, we can map the hostname and IP to solve the problem that the container IP may change.
- **-v**: Set the host file directory to be mapped to the inner container directory to avoid data loss after the container is deleted.
### Use the `docker ps` command to verify that the container is running correctly
......@@ -121,7 +121,7 @@ TDengine RESTful interface details can be found in the [official documentation](
### Running TDengine server and taosAdapter with a Docker container
Docker containers of TDegnine version 2.4.0.0 and later include a component named `taosAdapter`, which supports data writing and querying capabilities to the TDengine server through the RESTful interface and provides the data ingestion interfaces compatible with InfluxDB/OpenTSDB. Allows seamless migration of InfluxDB/OpenTSDB applications to access TDengine.
Docker containers of TDengine version 2.4.0.0 and later include a component named `taosAdapter`, which supports data writing and querying capabilities to the TDengine server through the RESTful interface and provides the data ingestion interfaces compatible with InfluxDB/OpenTSDB. Allows seamless migration of InfluxDB/OpenTSDB applications to access TDengine.
Note: If taosAdapter is running inside the container, you need to add mapping to other additional ports as needed, please refer to [taosAdapter documentation](https://github.com/taosdata/taosadapter/blob/develop/README.md) for the default port number and modification methods for the specific purpose.
......@@ -274,7 +274,7 @@ Query OK, 1 row(s) in set (0.003490s)
### Application Example: use data collection agent to write data into TDengine
taosAdapter supports multiple data collection agents (e.g. Telegraf, StatsD, collectd, etc.), here only demonstrate how StasD is simulated to write data, and the command is executed from the host side as follows.
taosAdapter supports multiple data collection agents (e.g. Telegraf, StatsD, collectd, etc.), here only demonstrate how StatsD is simulated to write data, and the command is executed from the host side as follows.
```
echo "foo:1|c" | nc -u -w0 127.0.0.1 6044
......
# How to install/uninstall TDengine with installtion package
# How to install/uninstall TDengine with installation package
TDengine open source version provides `deb` and `rpm` format installation packages. Our users can choose the appropriate installation package according to their own running environment. The `deb` supports Debian/Ubuntu etc. and the `rpm` supports CentOS/RHEL/SUSE etc. We also provide `tar.gz` format installers for enterprise users.
......@@ -51,7 +51,7 @@ Removing tdengine (2.4.0.7) ...
TDengine is removed successfully!
```
## Install and unstall rpm package
## Install and uninstall rpm package
### Install rpm
......@@ -138,7 +138,7 @@ To start TDengine : sudo systemctl start taosd
To access TDengine : use taos -h shuduo-1804 in shell OR from http://127.0.0.1:6060
TDengine is updated successfully!
Install taoskeeper as a standalone service
Install taoskeeper as a stand-alone service
taoskeeper is installed, enable it by `systemctl enable taoskeeper`
```
......@@ -177,9 +177,9 @@ lrwxrwxrwx 1 root root 13 Feb 22 09:34 log -> /var/log/taos/
```
- Automatically generates the configuration file directory, database directory, and log directory.
- Configuration file default directory: /etc/taos/taos.cfg, softlinked to /usr/local/taos/cfg/taos.cfg.
- Database default directory: /var/lib/taos, softlinked to /usr/local/taos/data.
- Log default directory: /var/log/taos, softlinked to /usr/local/taos/log.
- Configuration file default directory: /etc/taos/taos.cfg, soft-linked to /usr/local/taos/cfg/taos.cfg.
- Database default directory: /var/lib/taos, soft-linked to /usr/local/taos/data.
- Log default directory: /var/log/taos, soft-linked to /usr/local/taos/log.
- executables in the /usr/local/taos/bin directory, which are soft-linked to the /usr/bin directory.
- Dynamic library files in the /usr/local/taos/driver directory, which are soft-linked to the /usr/lib directory.
- header files in the /usr/local/taos/include directory, which are soft-linked to the /usr/include directory.
......@@ -188,14 +188,13 @@ lrwxrwxrwx 1 root root 13 Feb 22 09:34 log -> /var/log/taos/
When uninstalling the installation package, the configuration files, database files and log files will be kept, i.e. /etc/taos/taos.cfg, /var/lib/taos, /var/log/taos. If users confirm that they do not need to keep them, they can delete them manually, but must be careful, because after deletion, the data will be permanently lost and cannot be recovered!
If the installation is updated, when the default configuration file (/etc/taos/taos.cfg) exists, the existing configuration file is still used. The configuration file carried in the installation package is modified to taos.cfg.org and saved in the /usr/local/taos/cfg/ directory, which can be used as a reference sample for setting configuration parameters; if the configuration file does not exist, the Use the configuration file that comes with the installation package
file that comes with the installation package.
If the installation is updated, when the default configuration file (/etc/taos/taos.cfg) exists, the existing configuration file is still used. The configuration file carried in the installation package is modified to taos.cfg.orig and saved in the /usr/local/taos/cfg/ directory, which can be used as a reference sample for setting configuration parameters; if the configuration file does not exist, the use the configuration file that comes with the installation package file that comes with the installation package.
## Caution
- TDengine provides several installers, but it is best not to use both the tar.gz installer and the deb or rpm installer on one system. Otherwise, they may affect each other and cause problems when using them.
- For deb package installation, if the installation directory is manually deleted by mistake, the uninstallation, or reinstallation cannot be successful. In this case, you need to clear the installation information of the tdengine package by executing the following command:
- For deb package installation, if the installation directory is manually deleted by mistake, the uninstallation, or reinstallation cannot be successful. In this case, you need to clear the installation information of the TDengine package by executing the following command:
```
$ sudo rm -f /var/lib/dpkg/info/tdengine*
......@@ -203,7 +202,7 @@ $ sudo rm -f /var/lib/dpkg/info/tdengine*
Then just reinstall it.
- For the rpm package after installation, if the installation directory is manually deleted by mistake part of the uninstallation, or reinstallation can not be successful. In this case, you need to clear the installation information of the tdengine package by executing the following command:
- For the rpm package after installation, if the installation directory is manually deleted by mistake part of the uninstallation, or reinstallation can not be successful. In this case, you need to clear the installation information of the TDengine package by executing the following command:
```
$ sudo rpm -e --noscripts tdengine
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册