diff --git a/_includes/templates/install/cassandra-rhel-install.md b/_includes/templates/install/cassandra-rhel-install.md index fc11f77934..567a4416da 100644 --- a/_includes/templates/install/cassandra-rhel-install.md +++ b/_includes/templates/install/cassandra-rhel-install.md @@ -1,25 +1,4 @@ -Instructions listed below will help you to install Cassandra. - -```bash -# Add cassandra repository -cat << EOF | sudo tee /etc/yum.repos.d/cassandra.repo > /dev/null -[cassandra] -name=Apache Cassandra -baseurl=https://redhat.cassandra.apache.org/41x/ -gpgcheck=1 -repo_gpgcheck=1 -gpgkey=https://downloads.apache.org/cassandra/KEYS -EOF - -# Cassandra installation -sudo yum install cassandra -# Tools installation -sudo yum install cassandra-tools -# Start Cassandra -sudo service cassandra start -# Configure the database to start automatically when OS starts. -sudo chkconfig cassandra on -``` +Please follow [official Apache Cassandra installation guide](https://cassandra.apache.org/doc/latest/cassandra/installing/installing.html#install-as-rpm-package). You can use Astra DB cloud instead installing your own Cassandra. See how to [connect ThingsBoard to Astra DB](/docs/user-guide/install/pe/cassandra-cloud-astra-db/) diff --git a/_includes/templates/install/cassandra-ubuntu-install.md b/_includes/templates/install/cassandra-ubuntu-install.md index 394cdf0a43..73cba7009e 100644 --- a/_includes/templates/install/cassandra-ubuntu-install.md +++ b/_includes/templates/install/cassandra-ubuntu-install.md @@ -11,5 +11,42 @@ sudo apt-get install cassandra sudo apt-get install cassandra-tools ``` +In order to run Cassandra, you will need to install Java 11. + +Install the package. +```bash +sudo apt install openjdk-11-jdk +``` +{: .copy-code} +Set Java 17 as the default version (required for ThingsBoard). +```bash +sudo update-alternatives --config java +``` +{: .copy-code} +Edit Cassandra config. +```bash +sudo nano /usr/share/cassandra/cassandra.in.sh +``` +{: .copy-code} +Find the following line. +```bash +# JAVA_HOME can optionally be set here +#JAVA_HOME=/usr/local/jdk6 +``` +And replace it as follows: +```bash +# JAVA_HOME can optionally be set here +JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64 +``` +Then, restart Cassandra. +```bash +sudo service cassandra stop +``` +{: .copy-code} +```bash +sudo service cassandra start +``` +{: .copy-code} + You can use Astra DB cloud instead installing your own Cassandra. See how to [connect ThingsBoard to Astra DB](/docs/user-guide/install/pe/cassandra-cloud-astra-db/) diff --git a/_includes/templates/install/docker-queue-kafka.md b/_includes/templates/install/docker-queue-kafka.md index 2f5a2af7da..9781551b5d 100644 --- a/_includes/templates/install/docker-queue-kafka.md +++ b/_includes/templates/install/docker-queue-kafka.md @@ -11,31 +11,31 @@ nano docker-compose.yml Add the following lines to the yml file. ```yml -version: '3.0' +version: '3.2' services: - zookeeper: - restart: always - image: "zookeeper:3.5" - ports: - - "2181:2181" - environment: - ZOO_MY_ID: 1 - ZOO_SERVERS: server.1=zookeeper:2888:3888;zookeeper:2181 kafka: restart: always - image: wurstmeister/kafka - depends_on: - - zookeeper + image: bitnami/kafka:3.5.2 ports: - - "9092:9092" + - 9092:9092 #to localhost:9092 from host machine + - 9093 #for Kraft + - 9094 #to kafka:9094 from within Docker network environment: - KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 - KAFKA_LISTENERS: INSIDE://:9093,OUTSIDE://:9092 - KAFKA_ADVERTISED_LISTENERS: INSIDE://:9093,OUTSIDE://kafka:9092 - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT - KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE + ALLOW_PLAINTEXT_LISTENER: "yes" + KAFKA_CFG_LISTENERS: "OUTSIDE://:9092,CONTROLLER://:9093,INSIDE://:9094" + KAFKA_CFG_ADVERTISED_LISTENERS: "OUTSIDE://localhost:9092,INSIDE://kafka:9094" + KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: "INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT,CONTROLLER:PLAINTEXT" + KAFKA_CFG_INTER_BROKER_LISTENER_NAME: "INSIDE" + KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: "false" + KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: "1" + KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: "1" + KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: "1" + KAFKA_CFG_PROCESS_ROLES: "controller,broker" #KRaft + KAFKA_CFG_NODE_ID: "0" #KRaft + KAFKA_CFG_CONTROLLER_LISTENER_NAMES: "CONTROLLER" #KRaft + KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: "0@kafka:9093" #KRaft volumes: - - /var/run/docker.sock:/var/run/docker.sock + - kafka-data:/bitnami mytb: restart: always image: "thingsboard/tb-postgres" @@ -48,9 +48,12 @@ services: - "5683-5688:5683-5688/udp" environment: TB_QUEUE_TYPE: kafka - TB_KAFKA_SERVERS: kafka:9092 + TB_KAFKA_SERVERS: kafka:9094 volumes: - ~/.mytb-data:/data - ~/.mytb-logs:/var/log/thingsboard +volumes: + kafka-data: + driver: local ``` {: .copy-code} diff --git a/_includes/templates/install/memory-on-slow-machines.md b/_includes/templates/install/memory-on-slow-machines.md index b78cae8e0a..86a9b72500 100644 --- a/_includes/templates/install/memory-on-slow-machines.md +++ b/_includes/templates/install/memory-on-slow-machines.md @@ -11,4 +11,6 @@ Add the following lines to the configuration file. # Update ThingsBoard memory usage and restrict it to 2G in /etc/thingsboard/conf/thingsboard.conf export JAVA_OPTS="$JAVA_OPTS -Xms2G -Xmx2G" ``` -{: .copy-code} \ No newline at end of file +{: .copy-code} + +We recommend adjusting these parameters depending on your server resources. It should be set to at least 2G (gigabytes), and increased accordingly if there is additional RAM space available. Usually, you need to set it to 1/2 of your total RAM if you do not run any other memory-intensive processes (e.g. Cassandra), or to 1/3 otherwise. \ No newline at end of file diff --git a/_includes/templates/install/pe-docker-queue-kafka.md b/_includes/templates/install/pe-docker-queue-kafka.md index df2051e18d..5fd77a0369 100644 --- a/_includes/templates/install/pe-docker-queue-kafka.md +++ b/_includes/templates/install/pe-docker-queue-kafka.md @@ -11,31 +11,31 @@ nano docker-compose.yml Add the following line to the yml file. Don’t forget to replace "PUT_YOUR_LICENSE_SECRET_HERE" with your **license secret obtained on the first step**: ```yml -version: '3.0' +version: '3.2' services: - zookeeper: - restart: always - image: "zookeeper:3.5" - ports: - - "2181:2181" - environment: - ZOO_MY_ID: 1 - ZOO_SERVERS: server.1=zookeeper:2888:3888;zookeeper:2181 kafka: restart: always - image: wurstmeister/kafka - depends_on: - - zookeeper + image: bitnami/kafka:3.5.2 ports: - - "9092:9092" + - 9092:9092 #to localhost:9092 from host machine + - 9093 #for Kraft + - 9094 #to kafka:9094 from within Docker network environment: - KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 - KAFKA_LISTENERS: INSIDE://:9093,OUTSIDE://:9092 - KAFKA_ADVERTISED_LISTENERS: INSIDE://:9093,OUTSIDE://kafka:9092 - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT - KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE + ALLOW_PLAINTEXT_LISTENER: "yes" + KAFKA_CFG_LISTENERS: "OUTSIDE://:9092,CONTROLLER://:9093,INSIDE://:9094" + KAFKA_CFG_ADVERTISED_LISTENERS: "OUTSIDE://localhost:9092,INSIDE://kafka:9094" + KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: "INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT,CONTROLLER:PLAINTEXT" + KAFKA_CFG_INTER_BROKER_LISTENER_NAME: "INSIDE" + KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: "false" + KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: "1" + KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: "1" + KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: "1" + KAFKA_CFG_PROCESS_ROLES: "controller,broker" #KRaft + KAFKA_CFG_NODE_ID: "0" #KRaft + KAFKA_CFG_CONTROLLER_LISTENER_NAMES: "CONTROLLER" #KRaft + KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: "0@kafka:9093" #KRaft volumes: - - /var/run/docker.sock:/var/run/docker.sock + - kafka-data:/bitnami mytbpe: restart: always image: "thingsboard/tb-pe:{{ site.release.pe_full_ver }}" @@ -49,7 +49,7 @@ services: environment: TB_QUEUE_TYPE: kafka SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/thingsboard - TB_KAFKA_SERVERS: kafka:9092 + TB_KAFKA_SERVERS: kafka:9094 TB_LICENSE_SECRET: PUT_YOUR_LICENSE_SECRET_HERE TB_LICENSE_INSTANCE_DATA_FILE: /data/license.data volumes: @@ -65,5 +65,8 @@ services: POSTGRES_PASSWORD: postgres volumes: - ~/.mytbpe-data/db:/var/lib/postgresql/data +volumes: + kafka-data: + driver: local ``` {: .copy-code} diff --git a/_includes/templates/install/postgres-install-rhel.md b/_includes/templates/install/postgres-install-rhel.md index 5426750e3f..f274f4be57 100644 --- a/_includes/templates/install/postgres-install-rhel.md +++ b/_includes/templates/install/postgres-install-rhel.md @@ -2,7 +2,7 @@ Instructions listed below will help you to install PostgreSQL. ```bash # Update your system -sudo yum update +sudo dnf update ``` {: .copy-code} @@ -12,7 +12,7 @@ Install the repository. ```bash # Install the repository RPM: -sudo yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm +sudo dnf -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm ``` {: .copy-code} @@ -20,7 +20,7 @@ sudo yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8- ```bash # Install the repository RPM: -sudo yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm +sudo dnf -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm ``` {: .copy-code} diff --git a/_includes/templates/install/queue-kafka-in-docker.md b/_includes/templates/install/queue-kafka-in-docker.md index 3c8f6263ab..79acd5f0bb 100644 --- a/_includes/templates/install/queue-kafka-in-docker.md +++ b/_includes/templates/install/queue-kafka-in-docker.md @@ -4,4 +4,48 @@ ##### Install Kafka -Use this [instruction](https://github.com/wurstmeister/kafka-docker) for installing Kafka in Docker container. +Use the instructions below for installing Kafka in a Docker container. + +```text +nano docker-compose-kafka.yml +``` +{: .copy-code} + +Add the following lines to the docker-compose-kafka.yml file: +```yml +version: '3.2' +services: + kafka: + restart: always + image: bitnami/kafka:3.5.2 + ports: + - 9092:9092 #to localhost:9092 from host machine + - 9093 #for Kraft + - 9094 #to kafka:9094 from within Docker network + environment: + ALLOW_PLAINTEXT_LISTENER: "yes" + KAFKA_CFG_LISTENERS: "OUTSIDE://:9092,CONTROLLER://:9093,INSIDE://:9094" + KAFKA_CFG_ADVERTISED_LISTENERS: "OUTSIDE://localhost:9092,INSIDE://kafka:9094" + KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: "INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT,CONTROLLER:PLAINTEXT" + KAFKA_CFG_INTER_BROKER_LISTENER_NAME: "INSIDE" + KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: "false" + KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: "1" + KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: "1" + KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: "1" + KAFKA_CFG_PROCESS_ROLES: "controller,broker" #KRaft + KAFKA_CFG_NODE_ID: "0" #KRaft + KAFKA_CFG_CONTROLLER_LISTENER_NAMES: "CONTROLLER" #KRaft + KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: "0@kafka:9093" #KRaft + volumes: + - kafka-data:/bitnami +volumes: + kafka-data: + driver: local +``` +{: .copy-code} + +Start the container: +```text +docker compose -f docker-compose-kafka.yml up -d +``` +{: .copy-code} \ No newline at end of file diff --git a/_includes/templates/install/rhel-java-install.md b/_includes/templates/install/rhel-java-install.md index 52e505a56b..071b43890e 100644 --- a/_includes/templates/install/rhel-java-install.md +++ b/_includes/templates/install/rhel-java-install.md @@ -1,11 +1,11 @@ -ThingsBoard service is running on Java 11. Follow this instructions to install OpenJDK 11: +ThingsBoard service is running on Java 17. Follow this instructions to install OpenJDK 17: ```bash -sudo yum install java-11-openjdk +sudo dnf install java-17-openjdk ``` {: .copy-code} -Please don't forget to configure your operating system to use OpenJDK 11 by default. +Please don't forget to configure your operating system to use OpenJDK 17 by default. You can configure which version is the default using the following command: ```bash @@ -23,7 +23,7 @@ java -version Expected command output is: ```text -openjdk version "11.0.xx" +openjdk version "17.x.xx" OpenJDK Runtime Environment (...) OpenJDK 64-Bit Server VM (build ...) ``` diff --git a/_includes/templates/install/rhel-queue-kafka.md b/_includes/templates/install/rhel-queue-kafka.md index 18ca213848..9f14c67938 100644 --- a/_includes/templates/install/rhel-queue-kafka.md +++ b/_includes/templates/install/rhel-queue-kafka.md @@ -1,10 +1,4 @@ -#### Kafka Installation - -[Apache Kafka](https://kafka.apache.org/) is an open-source stream-processing software platform. - -##### Install Kafka - -We recommend to use Kafka in Docker container, use this [instruction](https://github.com/wurstmeister/kafka-docker) for installing. +{% include templates/install/queue-kafka-in-docker.md %} ##### ThingsBoard Configuration diff --git a/_includes/templates/install/ubuntu-java-install.md b/_includes/templates/install/ubuntu-java-install.md index 2810692292..e8aab4a878 100644 --- a/_includes/templates/install/ubuntu-java-install.md +++ b/_includes/templates/install/ubuntu-java-install.md @@ -1,12 +1,12 @@ -ThingsBoard service is running on Java 11. Follow this instructions to install OpenJDK 11: +ThingsBoard service is running on Java 17. Follow this instructions to install OpenJDK 17: ```bash sudo apt update -sudo apt install openjdk-11-jdk +sudo apt install openjdk-17-jdk ``` {: .copy-code} -Please don't forget to configure your operating system to use OpenJDK 11 by default. +Please don't forget to configure your operating system to use OpenJDK 17 by default. You can configure which version is the default using the following command: ```bash @@ -24,7 +24,7 @@ java -version Expected command output is: ```text -openjdk version "11.0.xx" +openjdk version "17.x.xx" OpenJDK Runtime Environment (...) -OpenJDK 64-Bit Server VM (build ...) +OpenJDK 64-Bit Server VM (...) ``` diff --git a/_includes/templates/install/windows-db-hybrid-timescale.md b/_includes/templates/install/windows-db-hybrid-timescale.md index c335f8ca58..fd95e6b852 100644 --- a/_includes/templates/install/windows-db-hybrid-timescale.md +++ b/_includes/templates/install/windows-db-hybrid-timescale.md @@ -6,7 +6,7 @@ In this case, ThingsBoard will be storing timeseries data in TimescaleDB Hyperta ##### PostgreSQL Installation -Download the installation file (PostgreSQL 12.17 or newer releases) [here](https://www.enterprisedb.com/downloads/postgres-postgresql-downloads#windows) and follow the installation instructions. +Download the installation file (PostgreSQL 15 or newer releases) [here](https://www.enterprisedb.com/downloads/postgres-postgresql-downloads#windows) and follow the installation instructions. During PostgreSQL installation, you will be prompted for superuser (postgres) password. Don't forget this password. It will be used later. For simplicity, we will substitute it with "postgres". @@ -50,7 +50,7 @@ spring: username: "${SPRING_DATASOURCE_USERNAME:postgres}" password: "${SPRING_DATASOURCE_PASSWORD:YOUR_POSTGRES_PASSWORD_HERE}" hikari: - maximumPoolSize: "${SPRING_DATASOURCE_MAXIMUM_POOL_SIZE:5}" + maximumPoolSize: "${SPRING_DATASOURCE_MAXIMUM_POOL_SIZE:16}" ``` {: .copy-code} diff --git a/_includes/templates/install/windows-db-postgresql.md b/_includes/templates/install/windows-db-postgresql.md index 2d2b1d3936..3105cc7a5b 100644 --- a/_includes/templates/install/windows-db-postgresql.md +++ b/_includes/templates/install/windows-db-postgresql.md @@ -6,7 +6,7 @@ Many cloud vendors support managed PostgreSQL servers which is a cost-effective ##### PostgreSQL Installation -Download the installation file (PostgreSQL 12.17 or newer releases) [here](https://www.enterprisedb.com/downloads/postgres-postgresql-downloads#windows) and follow the installation instructions. +Download the installation file (PostgreSQL 15 or newer releases) [here](https://www.enterprisedb.com/downloads/postgres-postgresql-downloads#windows) and follow the installation instructions. During PostgreSQL installation, you will be prompted for superuser (postgres) password. Don't forget this password. It will be used later. For simplicity, we will substitute it with "postgres". @@ -48,7 +48,7 @@ spring: username: "${SPRING_DATASOURCE_USERNAME:postgres}" password: "${SPRING_DATASOURCE_PASSWORD:YOUR_POSTGRES_PASSWORD_HERE}" hikari: - maximumPoolSize: "${SPRING_DATASOURCE_MAXIMUM_POOL_SIZE:5}" + maximumPoolSize: "${SPRING_DATASOURCE_MAXIMUM_POOL_SIZE:16}" ``` {: .copy-code} diff --git a/_includes/templates/install/windows-docker-queue-kafka.md b/_includes/templates/install/windows-docker-queue-kafka.md index e5cd530f55..c8d1b3a6b4 100644 --- a/_includes/templates/install/windows-docker-queue-kafka.md +++ b/_includes/templates/install/windows-docker-queue-kafka.md @@ -12,31 +12,31 @@ docker-compose.yml Add the following line to the yml file. ```yml -version: '3.0' +version: '3.2' services: - zookeeper: - restart: always - image: "zookeeper:3.5" - ports: - - "2181:2181" - environment: - ZOO_MY_ID: 1 - ZOO_SERVERS: server.1=zookeeper:2888:3888;zookeeper:2181 kafka: restart: always - image: wurstmeister/kafka - depends_on: - - zookeeper + image: bitnami/kafka:3.5.2 ports: - - "9092:9092" + - 9092:9092 #to localhost:9092 from host machine + - 9093 #for Kraft + - 9094 #to kafka:9094 from within Docker network environment: - KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 - KAFKA_LISTENERS: INSIDE://:9093,OUTSIDE://:9092 - KAFKA_ADVERTISED_LISTENERS: INSIDE://:9093,OUTSIDE://kafka:9092 - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT - KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE + ALLOW_PLAINTEXT_LISTENER: "yes" + KAFKA_CFG_LISTENERS: "OUTSIDE://:9092,CONTROLLER://:9093,INSIDE://:9094" + KAFKA_CFG_ADVERTISED_LISTENERS: "OUTSIDE://localhost:9092,INSIDE://kafka:9094" + KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: "INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT,CONTROLLER:PLAINTEXT" + KAFKA_CFG_INTER_BROKER_LISTENER_NAME: "INSIDE" + KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: "false" + KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: "1" + KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: "1" + KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: "1" + KAFKA_CFG_PROCESS_ROLES: "controller,broker" #KRaft + KAFKA_CFG_NODE_ID: "0" #KRaft + KAFKA_CFG_CONTROLLER_LISTENER_NAMES: "CONTROLLER" #KRaft + KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: "0@kafka:9093" #KRaft volumes: - - /var/run/docker.sock:/var/run/docker.sock + - kafka-data:/bitnami mytb: restart: always image: "thingsboard/tb-postgres" @@ -49,7 +49,7 @@ services: - "5683-5688:5683-5688/udp" environment: TB_QUEUE_TYPE: kafka - TB_KAFKA_SERVERS: kafka:9092 + TB_KAFKA_SERVERS: kafka:9094 volumes: - mytb-data:/data - mytb-logs:/var/log/thingsboard @@ -58,5 +58,7 @@ volumes: external: true mytb-logs: external: true + kafka-data: + driver: local ``` {: .copy-code} diff --git a/_includes/templates/install/windows-java-install.md b/_includes/templates/install/windows-java-install.md index c0eb3c577e..11eb3a30df 100644 --- a/_includes/templates/install/windows-java-install.md +++ b/_includes/templates/install/windows-java-install.md @@ -1,11 +1,14 @@ -ThingsBoard service is running on Java 11. Follow this instructions to install OpenJDK 11. +ThingsBoard service is running on Java 17. Follow this instructions to install OpenJDK 17. - * Visit [Open JDK Download Page](https://adoptopenjdk.net/index.html) to download latest **OpenJDK 11 (LTS)** MSI package. + * Visit [Open JDK Download Page](https://adoptium.net). Go to "Other platforms and versions", select "Operating System" as "Windows", "Architecture" as "x64", "Version" as "17 - LTS" and download **JDK .msi** package. * Run the downloaded MSI package and follow the instructions. Make sure you have selected "**Add to PATH**" and "**Set JAVA_HOME variable**" options to "Will be installed on local hard drive" state. - * Visit [PostgreSQL JDBC Download Page](https://jdbc.postgresql.org/download/) to download PostgreSQL JDBC Driver - * Copy downloaded file to **C:\Program Files\AdoptOpenJDK\jdk-11.0.10.9-hotspot\jre\lib\ext** and add a global variable named **CLASSPATH** with value **.;"C:\Program Files\AdoptOpenJDK\jdk-11.0.10.9-hotspot\jre\lib\ext\postgresql-42.2.18.jar"** to your system (right click on "My Computer", scroll down, "Advanced System Settings", "Advanced", "Environmental variables...", under "System variables" click "Create..."). - * If the **jre** folder does not exists under **"C:\Program Files\AdoptOpenJDK\jdk-11.0.10.9-hotspot"** path, create this folder and all required sub-folders + * Visit [PostgreSQL JDBC Download Page](https://jdbc.postgresql.org/download/) to download PostgreSQL JDBC Driver. Choose the latest available option. + * Create the folder **C:\Program Files\JDBC** and copy downloaded file there. Then, add a new global variable - run PowerShell as an administrator and execute the following command. Do not forget to change "postgresql-42.2.18.jar" in the command to match the downloaded version. + ```powershell +[System.Environment]::SetEnvironmentVariable("CLASSPATH", '.;"C:\Program Files\JDBC\postgresql-42.2.18.jar"', [System.EnvironmentVariableTarget]::Machine) +``` +{: .copy-code} You can check the installation using the following command (using Command Prompt): @@ -19,7 +22,7 @@ Expected command output is: ```text C:\Users\User>java -version -openjdk version "11.0.xx" -OpenJDK Runtime Environment (AdoptOpenJDK)(...) -OpenJDK 64-Bit Server VM (AdoptOpenJDK)(...) +openjdk version "17.x.xx" +OpenJDK Runtime Environment Temurin-17.x.xx (...) +OpenJDK 64-Bit Server VM Temurin-17.x.xx (...) ``` diff --git a/_includes/templates/install/windows-memory-on-slow-machines.md b/_includes/templates/install/windows-memory-on-slow-machines.md index 11f33c00a3..68b3ddeadb 100644 --- a/_includes/templates/install/windows-memory-on-slow-machines.md +++ b/_includes/templates/install/windows-memory-on-slow-machines.md @@ -18,9 +18,9 @@ Locate the following lines to the configuration file. and change them to ```xml --Xms256m --Xmx256m +-Xms2048m +-Xmx2048m ``` -change "256m" to approximately 1/3rd of your total RAM (in MB) +change "2048m" to approximately 1/3rd of your total RAM (in MB) {: .copy-code} \ No newline at end of file diff --git a/_includes/templates/install/windows-pe-docker-queue-kafka.md b/_includes/templates/install/windows-pe-docker-queue-kafka.md index 8418eea110..39a5549d96 100644 --- a/_includes/templates/install/windows-pe-docker-queue-kafka.md +++ b/_includes/templates/install/windows-pe-docker-queue-kafka.md @@ -11,31 +11,31 @@ docker-compose.yml Add the following line to the yml file. Don’t forget to replace "PUT_YOUR_LICENSE_SECRET_HERE" with your **license secret obtained on the first step**: ```yml -version: '3.0' +version: '3.2' services: - zookeeper: - restart: always - image: "zookeeper:3.5" - ports: - - "2181:2181" - environment: - ZOO_MY_ID: 1 - ZOO_SERVERS: server.1=zookeeper:2888:3888;zookeeper:2181 kafka: restart: always - image: wurstmeister/kafka - depends_on: - - zookeeper + image: bitnami/kafka:3.5.2 ports: - - "9092:9092" + - 9092:9092 #to localhost:9092 from host machine + - 9093 #for Kraft + - 9094 #to kafka:9094 from within Docker network environment: - KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 - KAFKA_LISTENERS: INSIDE://:9093,OUTSIDE://:9092 - KAFKA_ADVERTISED_LISTENERS: INSIDE://:9093,OUTSIDE://kafka:9092 - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT - KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE + ALLOW_PLAINTEXT_LISTENER: "yes" + KAFKA_CFG_LISTENERS: "OUTSIDE://:9092,CONTROLLER://:9093,INSIDE://:9094" + KAFKA_CFG_ADVERTISED_LISTENERS: "OUTSIDE://localhost:9092,INSIDE://kafka:9094" + KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: "INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT,CONTROLLER:PLAINTEXT" + KAFKA_CFG_INTER_BROKER_LISTENER_NAME: "INSIDE" + KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: "false" + KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: "1" + KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: "1" + KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: "1" + KAFKA_CFG_PROCESS_ROLES: "controller,broker" #KRaft + KAFKA_CFG_NODE_ID: "0" #KRaft + KAFKA_CFG_CONTROLLER_LISTENER_NAMES: "CONTROLLER" #KRaft + KAFKA_CFG_CONTROLLER_QUORUM_VOTERS: "0@kafka:9093" #KRaft volumes: - - /var/run/docker.sock:/var/run/docker.sock + - kafka-data:/bitnami mytbpe: restart: always image: "thingsboard/tb-pe:{{ site.release.pe_full_ver }}" @@ -49,7 +49,7 @@ services: environment: TB_QUEUE_TYPE: kafka SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/thingsboard - TB_KAFKA_SERVERS: kafka:9092 + TB_KAFKA_SERVERS: kafka:9094 TB_LICENSE_SECRET: PUT_YOUR_LICENSE_SECRET_HERE TB_LICENSE_INSTANCE_DATA_FILE: /data/license.data volumes: @@ -72,5 +72,7 @@ volumes: external: true mytbpe-data-db: external: true + kafka-data: + driver: local ``` {: .copy-code} diff --git a/docs/trendz/install/docker-windows.md b/docs/trendz/install/docker-windows.md index 6ccae3a707..82021ba691 100644 --- a/docs/trendz/install/docker-windows.md +++ b/docs/trendz/install/docker-windows.md @@ -125,18 +125,6 @@ docker volume create mytrendz-logs {% assign serviceName = "trendz" %} {% include templates/install/docker/docker-compose-up.md %} - -In order to get access to necessary resources from external IP/Host on Windows machine, please execute the following commands: - -```yml -set PATH=%PATH%;"C:\Program Files\Oracle\VirtualBox" -VBoxManage controlvm "default" natpf1 "tcp-port8888,tcp,,8888,,8888" -``` -{: .copy-code} - -Where - -- `C:\Program Files\Oracle\VirtualBox` - path to your VirtualBox installation directory After executing this command you can open `http://{your-host-ip}:8888` in you browser (for ex. `http://localhost:8888`). You should see Trendz login page. diff --git a/docs/user-guide/install/docker-windows.md b/docs/user-guide/install/docker-windows.md index 47d8cb3e2c..b986459760 100644 --- a/docs/user-guide/install/docker-windows.md +++ b/docs/user-guide/install/docker-windows.md @@ -74,27 +74,6 @@ Where: {% assign serviceName = "tb" %} {% include templates/install/docker/docker-compose-up.md %} -In order to get access to necessary resources from external IP/Host on Windows machine, please execute the following commands: - -``` -set PATH=%PATH%;"C:\Program Files\Oracle\VirtualBox" -VBoxManage controlvm "default" natpf1 "tcp-port8080,tcp,,8080,,9090" -VBoxManage controlvm "default" natpf1 "tcp-port1883,tcp,,1883,,1883" -VBoxManage controlvm "default" natpf1 "tcp-port7070,tcp,,7070,,7070" -VBoxManage controlvm "default" natpf1 "udp-port5683,udp,,5683,,5683" -VBoxManage controlvm "default" natpf1 "udp-port5684,udp,,5684,,5684" -VBoxManage controlvm "default" natpf1 "udp-port5685,udp,,5685,,5685" -VBoxManage controlvm "default" natpf1 "udp-port5686,udp,,5686,,5686" -VBoxManage controlvm "default" natpf1 "udp-port5687,udp,,5687,,5687" -VBoxManage controlvm "default" natpf1 "udp-port5688,udp,,5688,,5688" -``` -{: .copy-code} - -Where: - -- `C:\Program Files\Oracle\VirtualBox` - path to your VirtualBox installation directory - - After executing this command you can open `http://{your-host-ip}:8080` in you browser (for ex. `http://localhost:8080`). You should see ThingsBoard login page. Use the following default credentials: diff --git a/docs/user-guide/install/edge/docker-windows.md b/docs/user-guide/install/edge/docker-windows.md index d7e2ce9139..5fcfffdc92 100644 --- a/docs/user-guide/install/edge/docker-windows.md +++ b/docs/user-guide/install/edge/docker-windows.md @@ -88,15 +88,6 @@ volumes: {% assign serviceName = "tbedge" %} {% include templates/install/docker/docker-compose-up.md %} -In order to get access to necessary resources from external IP/Host on Windows machine, please execute the following commands: -``` -set PATH=%PATH%;"C:\Program Files\Oracle\VirtualBox" -VBoxManage controlvm "default" natpf1 "tcp-port8080,tcp,,8080,,8080" -VBoxManage controlvm "default" natpf1 "tcp-port1883,tcp,,1883,,1883" -VBoxManage controlvm "default" natpf1 "tcp-port5683,tcp,,5683,,5683" -``` -{: .copy-code} - Where: - `C:\Program Files\Oracle\VirtualBox` - path to your VirtualBox installation directory diff --git a/docs/user-guide/install/pe/add-haproxy-rhel.md b/docs/user-guide/install/pe/add-haproxy-rhel.md index c42c5cf414..b7486a26a4 100644 --- a/docs/user-guide/install/pe/add-haproxy-rhel.md +++ b/docs/user-guide/install/pe/add-haproxy-rhel.md @@ -13,7 +13,7 @@ as a service. This is possible in case you are hosting ThingsBoard in the cloud ### Prerequisites -RHEL/CentOS 7/8 with valid DNS name assigned to the instance. Network settings should allow connections on Port 80 (HTTP) and 443 (HTTPS). +RHEL/CentOS 8/9 with valid DNS name assigned to the instance. Network settings should allow connections on Port 80 (HTTP) and 443 (HTTPS). In order to open 80 and 443 ports execute the following command: @@ -21,122 +21,41 @@ In order to open 80 and 443 ports execute the following command: sudo firewall-cmd --zone=public --add-port=80/tcp --permanent sudo firewall-cmd --zone=public --add-port=443/tcp --permanent sudo firewall-cmd --reload - ``` +{: .copy-code} ### Step 1. Connect to your ThingsBoard instance over SSH Below is example command for AWS as a reference: ```bash -$ ssh -i ubuntu@ +$ ssh -i ec2-user@ ``` or consult your cloud vendor for different options. ### Step 2. Install HAProxy Load Balancer package -- For **RHEL/CentOS 7** the following command will ensure the Cheese repo is enabled: - -```bash -sudo yum -y install http://www.nosuchhost.net/~cheese/fedora/packages/epel-7/x86_64/cheese-release-7-1.noarch.rpm -sudo yum-config-manager --enable cheese - -``` -{: .copy-code} - -- For **RHEL/CentOS 8** the following command will ensure the PowerTools repo is enabled: - -```bash -sudo dnf config-manager --enable powertools - -``` -{: .copy-code} - -Execute the following commands to install HAProxy package: +Execute the following command to install HAProxy package: ```bash -sudo yum install gcc pcre-devel openssl-devel readline-devel systemd-devel tar lua lua-devel make -y -wget http://www.haproxy.org/download/2.4/src/haproxy-2.4.3.tar.gz -O ~/haproxy.tar.gz -mkdir -p ~/haproxy-src -tar xzvf ~/haproxy.tar.gz -C ~/haproxy-src --strip-components=1 -rm haproxy.tar.gz -make -C ~/haproxy-src USE_NS=1 USE_TFO=1 USE_OPENSSL=1 USE_ZLIB=1 USE_LUA=1 USE_PCRE=1 USE_SYSTEMD=1 USE_LIBCRYPT=1 USE_THREAD=1 TARGET=linux-glibc -sudo make -C ~/haproxy-src TARGET=linux-glibc install-bin install-man -sudo ln -sf /usr/local/sbin/haproxy /usr/sbin/haproxy -sudo groupadd -g 992 haproxy -sudo useradd -g 992 -u 995 -m -d /var/lib/haproxy -s /sbin/nologin -c haproxy haproxy -sudo mkdir -p /etc/haproxy -rm -rf ~/haproxy-src - +sudo dnf -y install haproxy ``` {: .copy-code} -Execute the following commands to create haproxy SystemD Unit File: - -(copy-paste full text of the command as-is) +Execute the following command to enable service auto startup: ```bash -cat <<'EOT' | sudo tee /etc/systemd/system/haproxy.service -[Unit] -Description=HAProxy 2.4.3 -After=syslog.target network.target - -[Service] -Type=notify -EnvironmentFile=/etc/sysconfig/haproxy -ExecStart=/usr/local/sbin/haproxy -f $CONFIG_FILE -p $PID_FILE $CLI_OPTIONS -ExecReload=/bin/kill -USR2 $MAINPID -ExecStop=/bin/kill -USR1 $MAINPID - -[Install] -WantedBy=multi-user.target -EOT -``` -{: .copy-code} - -Execute the following commands to create haproxy SystemD Environment File: - -(copy-paste full text of the command as-is) - -```bash -cat <(Event Streaming Platform based on Kafka)%,%confl Launch windows shell (Command Prompt) as Administrator. Change directory to your ThingsBoard installation directory. -Execute **install.bat** script to install ThingsBoard as a Windows service (or run **"install.bat --loadDemo"** to install and add demo data). +Execute **install.bat** script to install ThingsBoard as a Windows service (or run **".\install.bat --loadDemo"** to install and add demo data). This means it will be automatically started on system startup. Similar, **uninstall.bat** will remove ThingsBoard from Windows services. The output should be similar to this one: ```text -C:\Program Files (x86)\thingsboard>install.bat --loadDemo +C:\Program Files (x86)\thingsboard>.\install.bat --loadDemo Detecting Java version installed. -CurrentVersion 18 -Java 1.8 found! +CurrentVersion 170 +Java 17 found! Installing thingsboard ... ... ThingsBoard installed successfully! diff --git a/docs/user-guide/install/rhel.md b/docs/user-guide/install/rhel.md index fe2cd35d0f..5a5438515f 100644 --- a/docs/user-guide/install/rhel.md +++ b/docs/user-guide/install/rhel.md @@ -23,9 +23,9 @@ Before continue to installation execute the following commands in order to insta ```bash # Install wget -sudo yum install -y nano wget +sudo dnf install -y nano wget # Add latest EPEL release for CentOS 8 -sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm +sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm ``` {: .copy-code} @@ -33,13 +33,13 @@ sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8. ```bash # Install wget -sudo yum install -y nano wget +sudo dnf install -y nano wget # Add latest EPEL release for CentOS 9 -sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm +sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm ``` {: .copy-code} -### Step 1. Install Java 11 (OpenJDK) +### Step 1. Install Java 17 (OpenJDK) {% include templates/install/rhel-java-install.md %} diff --git a/docs/user-guide/install/rpi.md b/docs/user-guide/install/rpi.md index ef35848edf..e0aa378658 100644 --- a/docs/user-guide/install/rpi.md +++ b/docs/user-guide/install/rpi.md @@ -16,7 +16,7 @@ This guide describes how to install ThingsBoard on a Raspberry Pi running Raspbi ### Third-party components installation -### Step 1. Install Java 11 (OpenJDK) +### Step 1. Install Java 17 (OpenJDK) ```bash # Add repository. @@ -26,7 +26,7 @@ echo "deb http://deb.debian.org/debian unstable main non-free contrib" | sudo te sudo apt update # Install JAVA -sudo apt install openjdk-11-jdk +sudo apt install openjdk-17-jdk #Check installation java -version diff --git a/docs/user-guide/install/ubuntu.md b/docs/user-guide/install/ubuntu.md index 4ad3df1515..faf52a3116 100644 --- a/docs/user-guide/install/ubuntu.md +++ b/docs/user-guide/install/ubuntu.md @@ -12,12 +12,12 @@ description: Installing ThingsBoard CE on Ubuntu Server ### Prerequisites -This guide describes how to install ThingsBoard on Ubuntu 20.04 LTS / 22.04 LTS. +This guide describes how to install ThingsBoard on Ubuntu 20.04 LTS / 22.04 LTS / 24.04 LTS. Hardware requirements depend on chosen database and amount of devices connected to the system. To run ThingsBoard and PostgreSQL on a single machine you will need at least 4Gb of RAM. To run ThingsBoard and Cassandra on a single machine you will need at least 8Gb of RAM. -### Step 1. Install Java 11 (OpenJDK) +### Step 1. Install Java 17 (OpenJDK) {% include templates/install/ubuntu-java-install.md %} diff --git a/docs/user-guide/install/windows.md b/docs/user-guide/install/windows.md index 6739f2462e..9fe263d034 100644 --- a/docs/user-guide/install/windows.md +++ b/docs/user-guide/install/windows.md @@ -22,7 +22,7 @@ Hardware requirements depend on chosen database and amount of devices connected To run ThingsBoard and PostgreSQL on a single machine you will need at least 4Gb of RAM. To run ThingsBoard and Cassandra on a single machine you will need at least 8Gb of RAM. -### Step 1. Install Java 11 (OpenJDK) +### Step 1. Install Java 17 (OpenJDK) {% include templates/install/windows-java-install.md %} @@ -70,16 +70,16 @@ Confluent Cloud (Event Streaming Platform based on Kafka)%,%confl Launch windows shell (Command Prompt) as Administrator. Change directory to your ThingsBoard installation directory. -Execute **install.bat** script to install ThingsBoard as a Windows service (or run **"install.bat --loadDemo"** to install and add demo data). +Execute **install.bat** script to install ThingsBoard as a Windows service (or run **".\install.bat --loadDemo"** to install and add demo data). This means it will be automatically started on system startup. Similar, **uninstall.bat** will remove ThingsBoard from Windows services. The output should be similar to this one: ```text -C:\Program Files (x86)\thingsboard>install.bat --loadDemo +C:\Program Files (x86)\thingsboard>.\install.bat --loadDemo Detecting Java version installed. -CurrentVersion 110 -Java 11 found! +CurrentVersion 170 +Java 17 found! Installing thingsboard ... ... ThingsBoard installed successfully!