MariaDB / MySQL write and read Log files on Centos / Rocky Linux
By default, mariaDB never write logs hers for you. Sure, it’s her privacy that she doesn’t want others to know. However, you can enable her logging like this: Make your logs folder and change permission: Edit this file /etc/my.cnf.d/server.conf or /etc/my.cnf.d like as below: Restart your mariadb: Now, you have three file: /var/log/mariadb/error.log /var/log/mariadb/mysql.log /var/log/mariadb/slow.log…
Kafka CLI library- most Apache Kafka & Zookeeper commands in Linux OS
Make sure that you are in Kafka folder: Bellow example is Localhost, but you can do with any server if the true port is opened. Default Kafka port is 9092. You can change port number in config/server.properties. 1- Topics Kafka command 1.1- Create new topic more options: If replication-factor > 1 and partitions > 1,…
Cyberpanel: Unable to download OWASP ModSecurity Core Rules and COMODO ModSecurity 3.0
Cyberpanel: Unable to download OWASP ModSecurity Core Rules and COMODO ModSecurity 3.0 Edit this file: change the mirrorpath from “cyberpanel.net” to “cyberpanel.sh” mirrorPath = “cyberpanel.sh” Now, you redo install MODSECURITY RULES PACKAGES!
Send (publish, produce) a KAFKA message from a server to another server
Send (publish, produce) a message from a server to another server. In destination Kafka server, add this config to server.properties (my file is: /home/kafka/kafka/config/server.properties): Your IP is exactly which you set in producer… Or replace with domain. If you want to delete a KAFKA topic: So, it’s easy to send a KAFKA message to another…
NestJS (NodeJS) sending message to Kafka topic is easy
NestJS (NodeJS) send message to Kafka topic easily in this quick trick: Create a new NestJS test project: Paste this code in main.ts: Install package: Make sure topic: ‘test-server’ was created on target Kafka server, and you are subscribing on that topic to watch the result. Run script: Note: Your script only runs if you…
Download and config Kafka MQTT Connector
After Install Kafka… Download Kafka MQTT Connector Besure that java and maven were installed. Download: If not working, download from this source: https://drive.google.com/file/d/10Gw-NGxdz48eg7LpJ1klIpVjv2XxlolB/view Note: Kafka Connector default port is TCP 8083. It’s conflict Mosquitto default port. We need to change config of Mosquitto (or your broker). Example, I change websocket port from 8083 to 9093:…
Kafka quick install in ONE paste
Install Apache Kafka Copy and paste this to Centos8 terminal (just change some commands if your OS is different): You can run Kafka test command after “cd /home/kafka/kafka “ Create Kafka Cluster Read more: https://quicktricks.net/create-kafka-cluster-with-3-nodes/ Install and config Kafka Connector Read more: https://quicktricks.net/download-and-config-kafka-mqtt-connector/
Error: MySQL server has gone away
“MySQL server has gone away”: This is an error when you tried to import a large file to MySQL/MariaDB. So, you can temporatly set max_allowed_packet by below guide: Your file size (MB): X Your file size (bytes): Y = X*1024*1024. Example: X = 2GB => Y = 2,097,152,000,000 Your import commands likes this: