Centos 7 二进制安装时序数据库TDengine_我和国产时序数据库的第一次亲密接触

一、前言

之前在搞监控时,曾学习和测试过InfluxDB数据库,第一次接触时序数据库,也深深感受到了时序数据库的块,最近在墨天轮上看到对国产库时序数据库(Time Series Database)的介绍,特别是看了涛思数据库创世人陶总的采访,真的挺钦佩陶总的三次创业历程,现在又把涛思数据库搞的这么好。也很想好好了解和学习下这款国产时序数据库,也希望能和InfluxDB数据库做个对比,希望能在后面的一些项目中使用该数据库,于是在公司测试环境尝试使用二进制安装测试下该数据库。

二、安装数据库

本次安装所选用的操作系统是Centos 7.9 x86_64位操作系统,使用root用户安装。

2.1 下载安装包

登录TDengine数据库官网(https://www.taosdata.com/)

点击产品,如下图,

image20230526133714146.png

选择“TDengine 社区版”,

image20230526133851193.png

选择“快速上手”,

image20230526133955962.png

选择“安装包”,然后选择tar.gz安装,然后点击“TDengine-server-3.0.4.2-Linux-x64.tar.gz”下载。

image20230526134235983.png

弹出一个对话框,根据要求填写邮箱地址,

image20230526134407726.png

然后点击“下载”,会弹出一个信息框,如下,

image20230526134522493.png

然后打开邮箱,查看接收到的邮件信息,如下:

image20230526134647478.png

然后点击“这个链接”按钮,就会下载二进制安装包。

1.2 安装数据库

将下载好的安装包TDengine-server-3.0.4.2-Linux-x64.tar.gz上传至服务器某个目录下,比如/home/soft目录下,解压数据库安装包。

1) 解压安装包
# 解压数据库安装包 使用-v参数可以详细查看安装包都含哪些具体信息
[root@xsky-node4 soft]# tar -zxvf TDengine-server-3.0.4.2-Linux-x64.tar.gz 
TDengine-server-3.0.4.2/
TDengine-server-3.0.4.2/package.tar.gz
TDengine-server-3.0.4.2/install.sh
TDengine-server-3.0.4.2/examples/
TDengine-server-3.0.4.2/examples/c/
TDengine-server-3.0.4.2/examples/c/CMakeLists.txt
TDengine-server-3.0.4.2/examples/c/asyncdemo.c
TDengine-server-3.0.4.2/examples/c/demo.c
TDengine-server-3.0.4.2/examples/c/makefile
TDengine-server-3.0.4.2/examples/c/prepare.c
TDengine-server-3.0.4.2/examples/c/schemaless.c
TDengine-server-3.0.4.2/examples/c/stream_demo.c
TDengine-server-3.0.4.2/examples/c/tmq.c
TDengine-server-3.0.4.2/examples/JDBC/
TDengine-server-3.0.4.2/examples/JDBC/JDBCDemo/
TDengine-server-3.0.4.2/examples/JDBC/JDBCDemo/README-jdbc-windows.md
TDengine-server-3.0.4.2/examples/JDBC/JDBCDemo/pom.xml
TDengine-server-3.0.4.2/examples/JDBC/JDBCDemo/readme.md
TDengine-server-3.0.4.2/examples/JDBC/JDBCDemo/src/
TDengine-server-3.0.4.2/examples/JDBC/JDBCDemo/src/main/
TDengine-server-3.0.4.2/examples/JDBC/JDBCDemo/src/main/java/
TDengine-server-3.0.4.2/examples/JDBC/JDBCDemo/src/main/java/com/
TDengine-server-3.0.4.2/examples/JDBC/JDBCDemo/src/main/java/com/taosdata/
TDengine-server-3.0.4.2/examples/JDBC/JDBCDemo/src/main/java/com/taosdata/example/
TDengine-server-3.0.4.2/examples/JDBC/JDBCDemo/src/main/java/com/taosdata/example/JdbcDemo.java
TDengine-server-3.0.4.2/examples/JDBC/JDBCDemo/src/main/java/com/taosdata/example/JdbcRestfulDemo.java
TDengine-server-3.0.4.2/examples/JDBC/JDBCDemo/src/main/java/com/taosdata/example/SubscribeDemo.java
TDengine-server-3.0.4.2/examples/JDBC/SpringJdbcTemplate/
TDengine-server-3.0.4.2/examples/JDBC/SpringJdbcTemplate/.gitignore
TDengine-server-3.0.4.2/examples/JDBC/SpringJdbcTemplate/pom.xml
TDengine-server-3.0.4.2/examples/JDBC/SpringJdbcTemplate/readme.md
TDengine-server-3.0.4.2/examples/JDBC/SpringJdbcTemplate/src/
TDengine-server-3.0.4.2/examples/JDBC/SpringJdbcTemplate/src/main/
TDengine-server-3.0.4.2/examples/JDBC/SpringJdbcTemplate/src/main/java/
TDengine-server-3.0.4.2/examples/JDBC/SpringJdbcTemplate/src/main/java/com/
TDengine-server-3.0.4.2/examples/JDBC/SpringJdbcTemplate/src/main/java/com/taosdata/
TDengine-server-3.0.4.2/examples/JDBC/SpringJdbcTemplate/src/main/java/com/taosdata/example/
TDengine-server-3.0.4.2/examples/JDBC/SpringJdbcTemplate/src/main/java/com/taosdata/example/jdbcTemplate/
TDengine-server-3.0.4.2/examples/JDBC/SpringJdbcTemplate/src/main/java/com/taosdata/example/jdbcTemplate/App.java
TDengine-server-3.0.4.2/examples/JDBC/SpringJdbcTemplate/src/main/java/com/taosdata/example/jdbcTemplate/dao/
TDengine-server-3.0.4.2/examples/JDBC/SpringJdbcTemplate/src/main/java/com/taosdata/example/jdbcTemplate/dao/ExecuteAsStatement.java
TDengine-server-3.0.4.2/examples/JDBC/SpringJdbcTemplate/src/main/java/com/taosdata/example/jdbcTemplate/dao/ExecuteAsStatementImpl.java
TDengine-server-3.0.4.2/examples/JDBC/SpringJdbcTemplate/src/main/java/com/taosdata/example/jdbcTemplate/dao/WeatherDao.java
TDengine-server-3.0.4.2/examples/JDBC/SpringJdbcTemplate/src/main/java/com/taosdata/example/jdbcTemplate/dao/WeatherDaoImpl.java
TDengine-server-3.0.4.2/examples/JDBC/SpringJdbcTemplate/src/main/java/com/taosdata/example/jdbcTemplate/domain/
TDengine-server-3.0.4.2/examples/JDBC/SpringJdbcTemplate/src/main/java/com/taosdata/example/jdbcTemplate/domain/Weather.java
TDengine-server-3.0.4.2/examples/JDBC/SpringJdbcTemplate/src/main/resources/
TDengine-server-3.0.4.2/examples/JDBC/SpringJdbcTemplate/src/main/resources/applicationContext.xml
TDengine-server-3.0.4.2/examples/JDBC/SpringJdbcTemplate/src/test/
TDengine-server-3.0.4.2/examples/JDBC/SpringJdbcTemplate/src/test/java/
TDengine-server-3.0.4.2/examples/JDBC/SpringJdbcTemplate/src/test/java/com/
TDengine-server-3.0.4.2/examples/JDBC/SpringJdbcTemplate/src/test/java/com/taosdata/
TDengine-server-3.0.4.2/examples/JDBC/SpringJdbcTemplate/src/test/java/com/taosdata/example/
TDengine-server-3.0.4.2/examples/JDBC/SpringJdbcTemplate/src/test/java/com/taosdata/example/jdbcTemplate/
TDengine-server-3.0.4.2/examples/JDBC/SpringJdbcTemplate/src/test/java/com/taosdata/example/jdbcTemplate/BatcherInsertTest.java
TDengine-server-3.0.4.2/examples/JDBC/connectionPools/
TDengine-server-3.0.4.2/examples/JDBC/connectionPools/README-cn.md
TDengine-server-3.0.4.2/examples/JDBC/connectionPools/pom.xml
TDengine-server-3.0.4.2/examples/JDBC/connectionPools/src/
TDengine-server-3.0.4.2/examples/JDBC/connectionPools/src/main/
TDengine-server-3.0.4.2/examples/JDBC/connectionPools/src/main/java/
TDengine-server-3.0.4.2/examples/JDBC/connectionPools/src/main/java/com/
TDengine-server-3.0.4.2/examples/JDBC/connectionPools/src/main/java/com/taosdata/
TDengine-server-3.0.4.2/examples/JDBC/connectionPools/src/main/java/com/taosdata/example/
TDengine-server-3.0.4.2/examples/JDBC/connectionPools/src/main/java/com/taosdata/example/ConnectionPoolDemo.java
TDengine-server-3.0.4.2/examples/JDBC/connectionPools/src/main/java/com/taosdata/example/ProxoolDemo.java
TDengine-server-3.0.4.2/examples/JDBC/connectionPools/src/main/java/com/taosdata/example/common/
TDengine-server-3.0.4.2/examples/JDBC/connectionPools/src/main/java/com/taosdata/example/common/InsertTask.java
TDengine-server-3.0.4.2/examples/JDBC/connectionPools/src/main/java/com/taosdata/example/pool/
TDengine-server-3.0.4.2/examples/JDBC/connectionPools/src/main/java/com/taosdata/example/pool/C3p0Builder.java
TDengine-server-3.0.4.2/examples/JDBC/connectionPools/src/main/java/com/taosdata/example/pool/DbcpBuilder.java
TDengine-server-3.0.4.2/examples/JDBC/connectionPools/src/main/java/com/taosdata/example/pool/DruidPoolBuilder.java
TDengine-server-3.0.4.2/examples/JDBC/connectionPools/src/main/java/com/taosdata/example/pool/HikariCpBuilder.java
TDengine-server-3.0.4.2/examples/JDBC/connectionPools/src/main/resources/
TDengine-server-3.0.4.2/examples/JDBC/connectionPools/src/main/resources/log4j.properties
TDengine-server-3.0.4.2/examples/JDBC/connectionPools/src/main/resources/proxool.xml
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/.gitignore
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/.mvn/
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/.mvn/wrapper/
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/.mvn/wrapper/MavenWrapperDownloader.java
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/.mvn/wrapper/maven-wrapper.jar
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/.mvn/wrapper/maven-wrapper.properties
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/mvnw
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/mvnw.cmd
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/pom.xml
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/readme
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/src/
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/src/main/
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/src/main/java/
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/src/main/java/com/
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/src/main/java/com/taosdata/
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/src/main/java/com/taosdata/example/
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/src/main/java/com/taosdata/example/mybatisplusdemo/
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/src/main/java/com/taosdata/example/mybatisplusdemo/MybatisplusDemoApplication.java
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/src/main/java/com/taosdata/example/mybatisplusdemo/config/
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/src/main/java/com/taosdata/example/mybatisplusdemo/config/MybatisPlusConfig.java
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/src/main/java/com/taosdata/example/mybatisplusdemo/domain/
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/src/main/java/com/taosdata/example/mybatisplusdemo/domain/Temperature.java
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/src/main/java/com/taosdata/example/mybatisplusdemo/domain/Weather.java
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/src/main/java/com/taosdata/example/mybatisplusdemo/mapper/
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/src/main/java/com/taosdata/example/mybatisplusdemo/mapper/TemperatureMapper.java
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/src/main/java/com/taosdata/example/mybatisplusdemo/mapper/WeatherMapper.java
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/src/main/resources/
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/src/main/resources/application.yml
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/src/test/
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/src/test/java/
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/src/test/java/com/
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/src/test/java/com/taosdata/
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/src/test/java/com/taosdata/example/
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/src/test/java/com/taosdata/example/mybatisplusdemo/
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/src/test/java/com/taosdata/example/mybatisplusdemo/mapper/
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/src/test/java/com/taosdata/example/mybatisplusdemo/mapper/TemperatureMapperTest.java
TDengine-server-3.0.4.2/examples/JDBC/mybatisplus-demo/src/test/java/com/taosdata/example/mybatisplusdemo/mapper/WeatherMapperTest.java
TDengine-server-3.0.4.2/examples/JDBC/readme.md
TDengine-server-3.0.4.2/examples/JDBC/springbootdemo/
TDengine-server-3.0.4.2/examples/JDBC/springbootdemo/.gitignore
TDengine-server-3.0.4.2/examples/JDBC/springbootdemo/mvnw
TDengine-server-3.0.4.2/examples/JDBC/springbootdemo/mvnw.cmd
TDengine-server-3.0.4.2/examples/JDBC/springbootdemo/pom.xml
TDengine-server-3.0.4.2/examples/JDBC/springbootdemo/readme.md
TDengine-server-3.0.4.2/examples/JDBC/springbootdemo/src/
TDengine-server-3.0.4.2/examples/JDBC/springbootdemo/src/main/
TDengine-server-3.0.4.2/examples/JDBC/springbootdemo/src/main/java/
TDengine-server-3.0.4.2/examples/JDBC/springbootdemo/src/main/java/com/
TDengine-server-3.0.4.2/examples/JDBC/springbootdemo/src/main/java/com/taosdata/
TDengine-server-3.0.4.2/examples/JDBC/springbootdemo/src/main/java/com/taosdata/example/
TDengine-server-3.0.4.2/examples/JDBC/springbootdemo/src/main/java/com/taosdata/example/springbootdemo/
TDengine-server-3.0.4.2/examples/JDBC/springbootdemo/src/main/java/com/taosdata/example/springbootdemo/SpringbootdemoApplication.java
TDengine-server-3.0.4.2/examples/JDBC/springbootdemo/src/main/java/com/taosdata/example/springbootdemo/controller/
TDengine-server-3.0.4.2/examples/JDBC/springbootdemo/src/main/java/com/taosdata/example/springbootdemo/controller/WeatherController.java
TDengine-server-3.0.4.2/examples/JDBC/springbootdemo/src/main/java/com/taosdata/example/springbootdemo/dao/
TDengine-server-3.0.4.2/examples/JDBC/springbootdemo/src/main/java/com/taosdata/example/springbootdemo/dao/WeatherMapper.java
TDengine-server-3.0.4.2/examples/JDBC/springbootdemo/src/main/java/com/taosdata/example/springbootdemo/dao/WeatherMapper.xml
TDengine-server-3.0.4.2/examples/JDBC/springbootdemo/src/main/java/com/taosdata/example/springbootdemo/domain/
TDengine-server-3.0.4.2/examples/JDBC/springbootdemo/src/main/java/com/taosdata/example/springbootdemo/domain/Weather.java
TDengine-server-3.0.4.2/examples/JDBC/springbootdemo/src/main/java/com/taosdata/example/springbootdemo/service/
TDengine-server-3.0.4.2/examples/JDBC/springbootdemo/src/main/java/com/taosdata/example/springbootdemo/service/WeatherService.java
TDengine-server-3.0.4.2/examples/JDBC/springbootdemo/src/main/java/com/taosdata/example/springbootdemo/util/
TDengine-server-3.0.4.2/examples/JDBC/springbootdemo/src/main/java/com/taosdata/example/springbootdemo/util/TaosAspect.java
TDengine-server-3.0.4.2/examples/JDBC/springbootdemo/src/main/resources/
TDengine-server-3.0.4.2/examples/JDBC/springbootdemo/src/main/resources/application.properties
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/.gitignore
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/.mvn/
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/.mvn/wrapper/
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/.mvn/wrapper/MavenWrapperDownloader.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/.mvn/wrapper/maven-wrapper.jar
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/.mvn/wrapper/maven-wrapper.properties
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/mvnw
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/mvnw.cmd
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/pom.xml
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/readme.md
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/TaosDemoApplication.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/components/
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/components/DataSourceFactory.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/components/JdbcTaosdemoConfig.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/components/JsonConfig.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/dao/
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/dao/DatabaseMapper.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/dao/DatabaseMapperImpl.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/dao/SubTableMapper.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/dao/SubTableMapperImpl.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/dao/SuperTableMapper.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/dao/SuperTableMapperImpl.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/dao/TableMapper.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/dao/TableMapperImpl.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/domain/
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/domain/FieldMeta.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/domain/FieldValue.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/domain/RowValue.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/domain/SubTableMeta.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/domain/SubTableValue.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/domain/SuperTableMeta.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/domain/TableMeta.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/domain/TableValue.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/domain/TagMeta.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/domain/TagValue.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/service/
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/service/AbstractService.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/service/DatabaseService.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/service/QueryService.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/service/SqlExecuteTask.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/service/SubTableService.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/service/SuperTableService.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/service/TableService.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/service/data/
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/service/data/FieldValueGenerator.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/service/data/SubTableMetaGenerator.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/service/data/SubTableValueGenerator.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/service/data/SuperTableMetaGenerator.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/service/data/TagValueGenerator.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/utils/
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/utils/DataGenerator.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/utils/Printer.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/utils/SqlSpeller.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/utils/TaosConstants.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/java/com/taosdata/taosdemo/utils/TimeStampUtil.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/resources/
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/resources/application.properties
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/resources/insert.json
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/resources/log4j.properties
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/resources/query.json
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/resources/templates/
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/main/resources/templates/index.html
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/test/
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/test/java/
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/test/java/com/
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/test/java/com/taosdata/
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/test/java/com/taosdata/taosdemo/
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/test/java/com/taosdata/taosdemo/service/
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/test/java/com/taosdata/taosdemo/service/DatabaseServiceTest.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/test/java/com/taosdata/taosdemo/service/QueryServiceTest.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/test/java/com/taosdata/taosdemo/service/SubTableServiceTest.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/test/java/com/taosdata/taosdemo/service/SuperTableServiceTest.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/test/java/com/taosdata/taosdemo/service/data/
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/test/java/com/taosdata/taosdemo/service/data/FieldValueGeneratorTest.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/test/java/com/taosdata/taosdemo/service/data/SubTableMetaGeneratorTest.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/test/java/com/taosdata/taosdemo/service/data/SuperTableMetaGeneratorImplTest.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/test/java/com/taosdata/taosdemo/service/data/TagValueGeneratorTest.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/test/java/com/taosdata/taosdemo/utils/
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/test/java/com/taosdata/taosdemo/utils/DataGeneratorTest.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/test/java/com/taosdata/taosdemo/utils/SqlSpellerTest.java
TDengine-server-3.0.4.2/examples/JDBC/taosdemo/src/test/java/com/taosdata/taosdemo/utils/TimeStampUtilTest.java
TDengine-server-3.0.4.2/examples/matlab/
TDengine-server-3.0.4.2/examples/matlab/TDengineDemo.m
TDengine-server-3.0.4.2/examples/python/
TDengine-server-3.0.4.2/examples/python/PYTHONConnectorChecker/
TDengine-server-3.0.4.2/examples/python/PYTHONConnectorChecker/PythonChecker.py
TDengine-server-3.0.4.2/examples/python/read_example.py
TDengine-server-3.0.4.2/examples/python/taosdemo/
TDengine-server-3.0.4.2/examples/python/taosdemo/README.md
TDengine-server-3.0.4.2/examples/python/taosdemo/requirements.txt
TDengine-server-3.0.4.2/examples/python/taosdemo/taosdemo.py
TDengine-server-3.0.4.2/examples/R/
TDengine-server-3.0.4.2/examples/R/command.txt
TDengine-server-3.0.4.2/examples/go/
TDengine-server-3.0.4.2/examples/go/taosdemo.go
TDengine-server-3.0.4.2/examples/nodejs/
TDengine-server-3.0.4.2/examples/nodejs/README-win.md
TDengine-server-3.0.4.2/examples/nodejs/nodejsChecker.js
TDengine-server-3.0.4.2/examples/C#/
TDengine-server-3.0.4.2/examples/C#/C#checker/
TDengine-server-3.0.4.2/examples/C#/C#checker/C#checker.cs
TDengine-server-3.0.4.2/examples/C#/C#checker/TDengineDriver.cs
TDengine-server-3.0.4.2/examples/C#/TDengineDriver.cs
TDengine-server-3.0.4.2/examples/C#/TDengineTest.cs
TDengine-server-3.0.4.2/examples/C#/taosdemo/
TDengine-server-3.0.4.2/examples/C#/taosdemo/Dockerfile
TDengine-server-3.0.4.2/examples/C#/taosdemo/README.md
TDengine-server-3.0.4.2/examples/C#/taosdemo/TDengineDriver.cs
TDengine-server-3.0.4.2/examples/C#/taosdemo/taosdemo.cs
TDengine-server-3.0.4.2/examples/C#/taosdemo/taosdemo.csproj
TDengine-server-3.0.4.2/examples/taosbenchmark-json/
TDengine-server-3.0.4.2/examples/taosbenchmark-json/insert_csv.json
TDengine-server-3.0.4.2/examples/taosbenchmark-json/insert-from-to.json
TDengine-server-3.0.4.2/examples/taosbenchmark-json/insert.json
TDengine-server-3.0.4.2/examples/taosbenchmark-json/insert-rest.json
TDengine-server-3.0.4.2/examples/taosbenchmark-json/insert-with-partial-columns.json
TDengine-server-3.0.4.2/examples/taosbenchmark-json/query.json
TDengine-server-3.0.4.2/examples/taosbenchmark-json/query-sqls.txt
TDengine-server-3.0.4.2/examples/taosbenchmark-json/query-with-file.json
TDengine-server-3.0.4.2/examples/taosbenchmark-json/sample.csv
TDengine-server-3.0.4.2/examples/taosbenchmark-json/sample_tag.csv
TDengine-server-3.0.4.2/examples/taosbenchmark-json/sml_telnet.json
TDengine-server-3.0.4.2/examples/taosbenchmark-json/subscribe.json
TDengine-server-3.0.4.2/examples/taosbenchmark-json/tmq.json
TDengine-server-3.0.4.2/driver/
TDengine-server-3.0.4.2/driver/libtaos.so.3.0.4.2
TDengine-server-3.0.4.2/driver/vercomp.txt
TDengine-server-3.0.4.2/driver/libtaosws.so
2) 安装数据库
 
[root@xsky-node4 soft]# cd TDengine-server-3.0.4.2
[root@xsky-node4 TDengine-server-3.0.4.2]# ./install.sh -e no
Start to update TDengine...
Created symlink from /etc/systemd/system/multi-user.target.wants/taosd.service to /etc/systemd/system/taosd.service.To configure TDengine : edit /etc/taos/taos.cfg
To configure taos Adapter : edit /etc/taos/taosadapter.toml
To start TDengine     : sudo systemctl start taosd
To start taos Adapter : sudo systemctl start taosadapter 
To access TDengine    : use taos -h xsky-node4 in shellTDengine is updated successfully!
Install taoskeeper as a standalone service
taoskeeper is installed, enable it by `systemctl enable taoskeeper`
3)启动数据库
  • 启动服务进程:systemctl start taosd
  • 停止服务进程:systemctl stop taosd
  • 重启服务进程:systemctl restart taosd
  • 查看服务状态:systemctl status taosd
# 使用root用户启动服务
[root@xsky-node4 TDengine-server-3.0.4.2]# systemctl enable taoskeeper
Created symlink from /etc/systemd/system/multi-user.target.wants/taoskeeper.service to /etc/systemd/system/taoskeeper.service.
[root@xsky-node4 TDengine-server-3.0.4.2]# 
[root@xsky-node4 TDengine-server-3.0.4.2]# systemctl start taosd
[root@xsky-node4 TDengine-server-3.0.4.2]# systemctl status taosd
● taosd.service - server serviceLoaded: loaded (/etc/systemd/system/taosd.service; enabled; vendor preset: disabled)Active: active (running) since Fri 2023-05-26 13:06:47 CST; 7s agoProcess: 31181 ExecStartPre=/usr/local/taos/bin/startPre.sh (code=exited, status=0/SUCCESS)Main PID: 31188 (taosd)CGroup: /system.slice/taosd.service├─31188 /usr/bin/taosd└─31209 /usr/bin/udfd -c /etc/taos/May 26 13:06:47 xsky-node4 systemd[1]: Starting server service...
May 26 13:06:47 xsky-node4 systemd[1]: Started server service.
[root@xsky-node4 TDengine-server-3.0.4.2]# 
[root@xsky-node4 TDengine-server-3.0.4.2]# systemctl start taosadapter 
[root@xsky-node4 TDengine-server-3.0.4.2]# systemctl status taosadapter    
● taosadapter.service - adapter serviceLoaded: loaded (/etc/systemd/system/taosadapter.service; disabled; vendor preset: disabled)Active: active (running) since Fri 2023-05-26 13:07:02 CST; 6s agoMain PID: 31338 (taosadapter)CGroup: /system.slice/taosadapter.service└─31338 /usr/bin/taosadapterMay 26 13:07:02 xsky-node4 systemd[1]: Started adapter service.

4)使用数据库

TDengine提供了taos这一CLI命令行工具可以方便登录数据库,要登录数据库,执行执行 taos命令即可,登录成功会显示如下信息。

登录数据库后,可使用命令执行创建/删除/查询数据库及表操作。

[root@xsky-node4 TDengine-server-3.0.4.2]# taos
read /etc/localtime error, reason:Invalid argumentThere is not /etc/timezone.
Welcome to the TDengine Command Line Interface, Client Version:3.0.4.2
Copyright (c) 2022 by TDengine, all rights reserved.******************************  Tab Completion  ***********************************   The TDengine CLI supports tab completion for a variety of items,             **   including database names, table names, function names and keywords.              **   The full list of shortcut keys is as follows:                                    **    [ TAB ]        ......  complete the current word                                **                   ......  if used on a blank line, display all supported commands  **    [ Ctrl + A ]   ......  move cursor to the st[A]rt of the line                   **    [ Ctrl + E ]   ......  move cursor to the [E]nd of the line                     **    [ Ctrl + W ]   ......  move cursor to the middle of the line                    **    [ Ctrl + L ]   ......  clear the entire screen                                  **    [ Ctrl + K ]   ......  clear the screen after the cursor                        **    [ Ctrl + U ]   ......  clear the screen before the cursor                       ***************************************************************************************Server is Community Edition.taos> # 可以看到和MySQL数据库很像
taos> CREATE DATABASE demo;
Create OK, 0 row(s) affected (0.172574s)taos> USE demo;
Database changed.taos> show databases;name              |
=================================information_schema             |performance_schema             |demo                           |
Query OK, 3 row(s) in set (0.002513s)taos> CREATE TABLE t (ts TIMESTAMP, speed INT);
Create OK, 0 row(s) affected (0.001873s)taos> INSERT INTO t VALUES ('2023-05-26 13:13:00', 10);
Insert OK, 1 row(s) affected (0.000862s)taos> INSERT INTO t VALUES ('2023-05-26 13:14:00', 20);
Insert OK, 1 row(s) affected (0.000776s)# 时序数据库不能使用commit进行提交
taos> commit;DB error: syntax error near "commit;" (0.000067s)

三、taosBenchmark压测测试

3.1 创建测试数据

可以在当前环境下使用taosBenchmark命令进行压测。

[root@xsky-node4 driver]# taosBenchmark
[05/26 13:16:14.224118] INFO: client version: 3.0.4.2Press enter key to continue or Ctrl-C to stopread /etc/localtime error, reason:Invalid argumentThere is not /etc/timezone.
[05/26 13:16:18.017853] INFO: command to create database: <CREATE DATABASE IF NOT EXISTS test VGROUPS 16 PRECISION 'ms';>
[05/26 13:16:18.022662] SUCC: created database (test)
[05/26 13:16:18.026331] WARN: failed to run command DESCRIBE `test`.`meters`, code: 0x80002603, reason: Table does not exist
[05/26 13:16:18.026372] INFO: stable meters does not exist, will create one
[05/26 13:16:18.026419] INFO: create stable: <CREATE TABLE test.meters (ts TIMESTAMP,current float,voltage int,phase float) TAGS (groupid int,location binary(24))>
[05/26 13:16:18.042256] INFO: generate stable<meters> columns data with lenOfCols<80> * prepared_rand<57>
[05/26 13:16:18.586524] INFO: generate stable<meters> tags data with lenOfTags<62> * childTblCount<10000>
[05/26 13:16:18.590886] INFO: start creating 10000 table(s) with 8 thread(s)
[05/26 13:16:18.592883] INFO: thread[0] start creating table from 0 to 1249
[05/26 13:16:18.593163] INFO: thread[1] start creating table from 1250 to 2499
[05/26 13:16:18.594267] INFO: thread[2] start creating table from 2500 to 3749
[05/26 13:16:18.594675] INFO: thread[3] start creating table from 3750 to 4999
[05/26 13:16:18.595735] INFO: thread[4] start creating table from 5000 to 6249
[05/26 13:16:18.596445] INFO: thread[5] start creating table from 6250 to 7499
[05/26 13:16:18.597336] INFO: thread[6] start creating table from 7500 to 8749
[05/26 13:16:18.597902] INFO: thread[7] start creating table from 8750 to 9999
[05/26 13:16:19.166405] SUCC: Spent 0.5760 seconds to create 10000 table(s) with 8 thread(s), already exist 0 table(s), actual 10000 table(s) pre created, 0 table(s) will be auto createdPress enter key to continue or Ctrl-C to stop   # 按回车[05/26 13:16:22.739893] INFO: record per request (30000) is larger than insert rows (10000) in progressive mode, which will be set to 10000
[05/26 13:16:22.829202] INFO: Total 637 tables on bb test's vgroup 0 (id: 4)
[05/26 13:16:22.829223] INFO: Total 630 tables on bb test's vgroup 1 (id: 5)
[05/26 13:16:22.829232] INFO: Total 635 tables on bb test's vgroup 2 (id: 6)
[05/26 13:16:22.829241] INFO: Total 580 tables on bb test's vgroup 3 (id: 7)
[05/26 13:16:22.829249] INFO: Total 588 tables on bb test's vgroup 4 (id: 8)
[05/26 13:16:22.829257] INFO: Total 627 tables on bb test's vgroup 5 (id: 9)
[05/26 13:16:22.829277] INFO: Total 635 tables on bb test's vgroup 6 (id: 10)
[05/26 13:16:22.829290] INFO: Total 672 tables on bb test's vgroup 7 (id: 11)
[05/26 13:16:22.829298] INFO: Total 628 tables on bb test's vgroup 8 (id: 12)
[05/26 13:16:22.829306] INFO: Total 617 tables on bb test's vgroup 9 (id: 13)
[05/26 13:16:22.829321] INFO: Total 615 tables on bb test's vgroup 10 (id: 14)
[05/26 13:16:22.829335] INFO: Total 660 tables on bb test's vgroup 11 (id: 15)
[05/26 13:16:22.829343] INFO: Total 621 tables on bb test's vgroup 12 (id: 16)
[05/26 13:16:22.829357] INFO: Total 610 tables on bb test's vgroup 13 (id: 17)
[05/26 13:16:22.829377] INFO: Total 628 tables on bb test's vgroup 14 (id: 18)
[05/26 13:16:22.829387] INFO: Total 617 tables on bb test's vgroup 15 (id: 19)
[05/26 13:16:22.904732] INFO: Estimate memory usage: 64.46MBPress enter key to continue or Ctrl-C to stop   # 按回车[05/26 13:16:51.087453] SUCC: thread[4] progressive mode, completed total inserted rows: 5880000, 252417.64 records/second
[05/26 13:16:51.238672] SUCC: thread[3] progressive mode, completed total inserted rows: 5800000, 246624.54 records/second
[05/26 13:16:52.551139] SUCC: thread[13] progressive mode, completed total inserted rows: 6100000, 247242.48 records/second
[05/26 13:16:52.710359] SUCC: thread[12] progressive mode, completed total inserted rows: 6210000, 250751.84 records/second
[05/26 13:16:52.869708] SUCC: thread[15] progressive mode, completed total inserted rows: 6170000, 247865.38 records/second
[05/26 13:16:52.936221] SUCC: thread[10] progressive mode, completed total inserted rows: 6150000, 246960.57 records/second
[05/26 13:16:52.968699] SUCC: thread[9] progressive mode, completed total inserted rows: 6170000, 247375.94 records/second
[05/26 13:16:52.986824] SUCC: thread[8] progressive mode, completed total inserted rows: 6280000, 252138.93 records/second
[05/26 13:16:53.045996] SUCC: thread[5] progressive mode, completed total inserted rows: 6270000, 251036.01 records/second
[05/26 13:16:53.214220] SUCC: thread[2] progressive mode, completed total inserted rows: 6350000, 252953.29 records/second
[05/26 13:16:53.228965] SUCC: thread[1] progressive mode, completed total inserted rows: 6300000, 249370.62 records/second
[05/26 13:16:53.255729] SUCC: thread[14] progressive mode, completed total inserted rows: 6280000, 249431.25 records/second
[05/26 13:16:53.419322] SUCC: thread[6] progressive mode, completed total inserted rows: 6350000, 250368.38 records/second
[05/26 13:16:53.583290] SUCC: thread[0] progressive mode, completed total inserted rows: 6370000, 249322.08 records/second
[05/26 13:16:53.686440] SUCC: thread[11] progressive mode, completed total inserted rows: 6600000, 258572.71 records/second
[05/26 13:16:54.185829] SUCC: thread[7] progressive mode, completed total inserted rows: 6720000, 257826.77 records/second
[05/26 13:16:54.188303] SUCC: Spent 29.488637 seconds to insert rows: 100000000 with 16 thread(s) into test 3391136.73 records/second
[05/26 13:16:54.188349] SUCC: insert delay, min: 13.9810ms, avg: 39.8915ms, p90: 54.2760ms, p95: 61.5230ms, p99: 73.9060ms, max: 97.9570ms

3.3 查询数据

[root@xsky-node4 TDengine-server-3.0.4.2]# taos
read /etc/localtime error, reason:Invalid argumentThere is not /etc/timezone.
Welcome to the TDengine Command Line Interface, Client Version:3.0.4.2
Copyright (c) 2022 by TDengine, all rights reserved.******************************  Tab Completion  ***********************************   The TDengine CLI supports tab completion for a variety of items,             **   including database names, table names, function names and keywords.              **   The full list of shortcut keys is as follows:                                    **    [ TAB ]        ......  complete the current word                                **                   ......  if used on a blank line, display all supported commands  **    [ Ctrl + A ]   ......  move cursor to the st[A]rt of the line                   **    [ Ctrl + E ]   ......  move cursor to the [E]nd of the line                     **    [ Ctrl + W ]   ......  move cursor to the middle of the line                    **    [ Ctrl + L ]   ......  clear the entire screen                                  **    [ Ctrl + K ]   ......  clear the screen after the cursor                        **    [ Ctrl + U ]   ......  clear the screen before the cursor                       ***************************************************************************************Server is Community Edition.taos> show databases;name              |
=================================information_schema             |performance_schema             |demo                           |test                           |
Query OK, 4 row(s) in set (0.002425s)taos> use test;
Database changed.# 查询超级表 meters 下的记录总条数, 一亿条,耗时才0.231158s
taos> SELECT COUNT(*) FROM test.meters;count(*)        |
========================100000000 |
Query OK, 1 row(s) in set (0.231158s)# 使用聚合函数,查询 1 亿条记录的平均值、最大值、最小值等,也好快
taos> SELECT AVG(current), MAX(voltage), MIN(phase) FROM test.meters;avg(current)        | max(voltage) |      min(phase)      |
==================================================================9.979949643 |          114 |              0.29167 |
Query OK, 1 row(s) in set (0.417387s)# 从一亿条数据查询 location = "California.SanFrancisco" 的记录总条数:
taos> SELECT COUNT(*) FROM test.meters WHERE location = "California.SanFrancisco";count(*)        |
========================10130000 |
Query OK, 1 row(s) in set (0.051128s)# 查询 groupId = 10 的所有记录的平均值、最大值、最小值等:
taos> SELECT AVG(current), MAX(voltage), MIN(phase) FROM test.meters WHERE groupId = 10;avg(current)        | max(voltage) |      min(phase)      |
==================================================================9.979666885 |          114 |              0.29167 |
Query OK, 1 row(s) in set (0.092011s)# 对表 d10 按 10 每秒进行平均值、最大值和最小值聚合统计: 
taos> SELECT FIRST(ts), AVG(current), MAX(voltage), MIN(phase) FROM test.d10 INTERVAL(10s);first(ts)        |       avg(current)        | max(voltage) |      min(phase)      |
============================================================================================2017-07-14 10:40:00.000 |               9.990264009 |          114 |              0.29167 |
Query OK, 1 row(s) in set (0.004499s)

四、后记

目前万里长征人刚迈出数据库安装和简单使用的一步,之前测试和使用过众多国产分布式数据库,本次算是和国产时序数据库的第一次亲密接触,后面将逐步深入去了解这块数据库,也希望后面的一些项目、尤其是监控项目能使用到,先给自己加个油!

后面也想尝试下采用集群部署TDengine,看看集群下的国产时序数据库是什么样子,待后面会将这部分内容分享到墨天轮。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/bicheng/65583.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Design Compiler:两种工作模式(线负载模式和拓扑模式)

相关阅读 Design Compilerhttps://blog.csdn.net/weixin_45791458/category_12738116.html?spm1001.2014.3001.5482 Design Compiler可以以线负载模式或拓扑模式启动&#xff0c;必须选择其中一个模式。在拓扑模式下还可使用多模式和UPF模式&#xff1a;多模式允许在多种工作…

真的一行代码没写,使用cursor智能代码编辑器,通过问答的方式,我构建了一个微信小程序

文章目录 1 待办123 产品介绍1.1 使用说明1.2 产品亮点1.3 应用场景 2 零基础实战教程&#xff1a;零代码开发微信小程序2.1 微信公众号注册小程序2.2 下载安装微信开发者工具2.3 下载安装cursor2.4 使用cursor零代码构建微信小程序 3 总结 使用cursor已经有一段时间了&#xf…

element-plus在Vue3中开发相关知识

报错&#xff1a;error.mjs:20 ElementPlusError: [ElForm] model is required for resetFields to work. 原因&#xff1a;el-form使用v-model没有把内容绑定上&#xff0c;需要使用 :model 才可以校验 将&#xff1a; <el-form label-width"auto" class"…

Python爬虫实战(保姆级登网页信息爬取教程)

此blog为爬虫实战教学&#xff0c;代码已附上&#xff0c;可以复制运行。若要直接看实战代码翻到博客后半部分。 本文使用selenium库进行爬虫&#xff0c;实现爬取数据操作&#xff0c;此库是通过模仿用户的操作进行对页面的处理。了解了这个思维模式&#xff0c;可以对代码进…

PyTorch快速入门教程【小土堆】之DataLoader的使用

视频地址DataLoader的使用_哔哩哔哩_bilibili dataset数据集&#xff0c;相当于一副扑克&#xff0c;dataloader数据加载器相当于我们的手&#xff0c;选择摸几张牌&#xff0c;怎么摸牌 import torchvision# 准备的测试数据集 from torch.utils.data import DataLoader from …

# 光速上手 - JPA 原生 sql DTO 投影

前言 使用 JPA 时&#xff0c;我们一般通过 Entity 进行实体类映射&#xff0c;从数据库中查询出对象。然而&#xff0c;在实际开发中&#xff0c;有时需要自定义查询结果并将其直接映射到 DTO&#xff0c;而不是实体类。这种需求可以通过 JPA 原生 SQL 查询和 DTO 投影 来实现…

ThinkPHP 8开发环境安装

【图书介绍】《ThinkPHP 8高效构建Web应用》-CSDN博客 《ThinkPHP 8高效构建Web应用 夏磊 编程与应用开发丛书 清华大学出版社》【摘要 书评 试读】- 京东图书 1. 安装PHP8 Windows系统用户可以前往https://windows.php.net/downloads/releases/archives/下载PHP 8.0版本&am…

pikachu靶场搭建详细步骤

一、靶场下载 点我去下载 二、靶场安装 需要的环境&#xff1a; mysqlApaches&#xff08;直接使用小皮面板Phpstudy&#xff1a;https://www.xp.cn/&#xff09;&#xff0c;启动他们 设置网站&#xff0c;把靶场的路径对应过来 对应数据库的信息 由于没有核对数据库的信…

每天40分玩转Django:Django表单集

Django表单集 一、知识要点概览表 类别知识点掌握程度要求基础概念FormSet、ModelFormSet深入理解内联表单集InlineFormSet、BaseInlineFormSet熟练应用表单集验证clean方法、验证规则熟练应用自定义配置extra、max_num、can_delete理解应用动态管理JavaScript动态添加/删除表…

LabVIEW中实现多个Subpanel独立调用同一个VI

在LabVIEW中&#xff0c;如果需要通过多个Subpanel同时调用同一个VI并让这些VI实例独立运行&#xff0c;可以通过以下方法实现&#xff1a; 1. 问题背景 LabVIEW默认的VI是以单实例方式运行的。当将同一个VI加载到多个Subpanel时&#xff0c;会因为共享同一内存空间而导致冲突…

语聊系统:JAVA语聊大厅语音聊天APP系统源码

JAVA语聊大厅语音聊天APP系统源码详解 在当今数字化时代&#xff0c;语音社交已成为连接人与人之间情感的重要桥梁。JAVA语聊大厅语音聊天APP系统源码&#xff0c;作为一款集成了多种先进技术与功能的社交软件&#xff0c;正以其独特魅力引领着语音社交的新潮流。该系统不仅提…

【学生管理系统】权限管理之用户管理

目录 6. 权限管理 6.1 环境搭建 6.1.1 数据库 6.1.2 后端环境 6.2 用户管理 6.2.1 查询所有用户&#xff08;关联角色&#xff09; 6.2.2 核心1&#xff1a;给用户授予角色 6. 权限管理 6.1 环境搭建 6.1.1 数据库 权限管理的5张表的关系 添加4张表 # 权限表&…

Unity 和 OpenCV:结合计算机视觉和游戏开发

文章目录 前言一、Unity 中集成 OpenCV1. 安装OpenCV plus Unity 插件2. 导入 OpenCV 包 二、图像处理应用程序的创建1. 实时轮廓检测2. 粒子发射器3. 碰撞区域 三、效果四、总结 前言 Unity 和 OpenCV 是两个强大的开发工具&#xff0c;分别用于游戏开发和计算机视觉。结合它…

记一次内存泄漏分析(待写稿)

背景 线上Flink频繁重启&#xff0c;先后排查了很多情况&#xff0c;目前在内存阶段排查&#xff0c;首先说说学到的知识 内存泄漏分析 JVM常用命令 JConsole JVisualvm 快照的这里是最有用的&#xff0c;它和jmap不同&#xff0c;jmap查找的是占用字节最多的类&#xff…

剑指Offer|LCR 014. 字符串的排列

LCR 014. 字符串的排列 给定两个字符串 s1 和 s2&#xff0c;写一个函数来判断 s2 是否包含 s1 的某个变位词。 换句话说&#xff0c;第一个字符串的排列之一是第二个字符串的 子串 。 示例 1&#xff1a; 输入: s1 "ab" s2 "eidbaooo" 输出: True 解…

Java编程题_面向对象和常用API01_B级

Java编程题_面向对象和常用API01_B级 第1题 面向对象、异常、集合、IO 题干: 请编写程序&#xff0c;完成键盘录入学生信息&#xff0c;并计算总分将学生信息与总分一同写入文本文件 需求&#xff1a;键盘录入3个学生信息(姓名,语文成绩,数学成绩) 求出每个学生的总分 ,并…

用户界面的UML建模05

4 抽象表示层建模&#xff08;Abstract Presentation Modeling&#xff09; 在进行应用程序建模时&#xff0c;很自然地会需要对UI 表示层进行建模。甚至是对于非常简单的场景&#xff08;scenario&#xff09;而言&#xff0c;UI 表示层部分的建模都是必不可少的。在这个阶段…

2024.12.25在腾讯云服务器上使用docker部署flask

2024.12.25在腾讯云服务器上使用docker部署flask 操作系统&#xff1a;Ubuntu 根据腾讯云的说明文档安装 Docker 并配置镜像加速源&#xff0c;注意需要安装腾讯云的加速源&#xff0c;使用官网的加速源连接极其不稳定&#xff0c;容易导致运行失败。使用哪个公司的云服务器就…

存储块的删除与状态查询

目录 存储块的删除 设计实现 存储块的删除 仅需删除任务列表的所有任务&#xff0c;无需在意空闲存储块。 设计实现 存储块的删除&#xff08;清空过程中可能有任务就绪&#xff0c;需执行一次调度&#xff09;存储块的状态查询&#xff08;当前存储块的计数、允许的最大计数、…

如何在IDEA一个窗口中导入多个项目

一般在IDEA窗口中想导入一个新项目&#xff0c;会提示我们在当前窗口还是新窗口。如果选新窗口&#xff0c;就会新打开一个窗口&#xff0c;此时新窗口里面只有新导入的项目。 而为了浏览起来更方便&#xff0c;需要实现在IDEA一个窗口中导入多个项目。具体步骤如下&#xff1…