Blog


  • 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…

    >> Read more

  • 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,…

    >> Read more

  • 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!

    >> Read more

  • Find large files or folder on Linux to delete when 100% disk usage

    When 100% disk usage, find large files or folder on Linux: Delete that folder: If you want to delete old file >1 day: In my case, I set cronjob for delete all old file in a session folder:

    >> Read more

  • 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…

    >> Read more

  • 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…

    >> Read more

  • How to migrate CentOS 8 / Stream 8 to Rocky Linux without error?

    Why need to migrate CentOS 8 / Stream 8 to Rocky Linux? Dear, after event Centos 8 EOL (end of life) 2022-01-31, RedHat destroyed Centos 8 (stable). Then instead the Centos Stream demo. This is extremely dangerous for your server system. Because automatic updates will be beta only. It may interrupt your service any time.…

    >> Read more

  • 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:…

    >> Read more

  • 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/

    >> Read more

  • 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:

    >> Read more

  • Install and Config Mosquitto (MQTT broker server)

    MQTT is a super lightweight IoT protocol on TCP/IP with …8 bits header. Send and receive messages with others in “topic” like as a chatroom. Install Mosquitto (MQTT Broker Server) Install MQTT broker on server Create user and password (exp: admin): Sercurity config: Open file /etc/mosquitto/mosquitto.conf to add this config to require password when connect:…

    >> Read more

  • Config Cyberpanel/ OpenLiteSpeed server to run NodeJS on port 80/443

    If you use LiteSpeed, you can run NodeJS project as a PHP project. Step 1: Add a domain (example domain.com) to your server You need to: Create a folder to upload your code. Or create by Cyberpanel admin tool (recommend). Add new DNS record (A) from domain to your server IP Step 2: Modify the…

    >> Read more

  • Install MongoDB for PHP Laravel

    At this moment, php-mongodb support PHP7.2 for Laravel. You need to change PHP-cli to 7.2 (my server use OpenLiteSpeed): Depend on your server OS, your commands like as: Add “extension=mongodb.so” to php72 config (php.ini). Restart your php server: For OpenLiteSpeed: systemctl restart lsws In your project folder, run:

    >> Read more

  • Quick install MongoDB on Centos 8/ Rocky Linux in 1 minute

    In Centos/ Rocky Linux terminal, run all bellow command: You can connect your DB by MongoDB Compass app in manual Change your MongoDB port and bind IP in: /etc/mongod.conf

    >> Read more

  • Basic and Important CloudFlare Firewall Configuration for Website Protection?

    You need to this basic CloudFlare Firewall Configuration to protect your login page. Click Edit expression to paste them: Basic and Important CloudFlare Firewall Configuration Rule 1: This is Challenge Captcha for url “/wp-admin” (or something you are) when request from Your Country (ex: VN): Rule 2: This is for Block if request from other…

    >> Read more

  • Config Kibana + Elasticsearch 100% working on Linux (Centos/ Rocky)

    Install JAVA First, install Java 1.8. Check java, install if not exist: Open firewall TCP port 9200, 8200, and 5601 Install ElasticSearch: Install Elasticsearch: Config ELS: Save xml file then: Config tempdir to work with JAVA: Above for Elasticsearc 7.15. For newer Elasticsearch version maybe: Save elasticsearch file, then restart & check status: If everything…

    >> Read more

  • Install AAPT service to read APK file information on Linux (Centos/ Rocky)

    If you want to run aapt read apk file information: STEP 1: Download aapt-linux build-tool at https://androidaapt.com/STEP 2: Copy the entire lib64 folder to usr/lib64 on centosSTEP 3: Copy the aapt file to the usr/bin directory and then chmod +x aapt (755)Example reading file version: Example reading file package name: In your script (my example…

    >> Read more

  • Download APK file by PHP script

    This is 100% working PHP script to download a APK file, or any extension: By this way, you can restrict directly download. And you can count downloaded too.

    >> Read more

  • Install & Config Supervisor to keep terminal live to run script on Linux

    You can keep a script (like as PHP or JS, Java,…) always live by Supervisor. To install Supervisor on Centos 8/ Rocky Linux: On Centos 7 use “yum” instead of “dnf”. Create a file myname.ini in folder /etc/supervisord.d/ with below content: Update data: Start program: If just start my-first-program: Check program status: You can restart…

    >> Read more

  • How to setup hosts file for multiple domains on same IP?

    How to setup hosts file for multiple domains on same IP? On Linux, you can put all in one line. But on Windows, max domains number is 9 per line. To set multi domain to one IP, you need to do like that: To do it, you edit file “hosts” in this folder: C:\Windows\System32\drivers\etc on…

    >> Read more

  • Automated Database Backup (MariaDB, MySQL) on RHEL/Linux using Cron Job?

    Have you thought about continuous database backup? Perhaps using the Control Panel is the choice of many people. But it will not be optimal in case you want to customize the backup file name. Or your server only runs MySQL, MariaDB (without Control Panel, no PHP,…). I will show you how to Automated Smart Database…

    >> Read more

  • Solution for “Lighthouse was unable to download a robots.txt file” error!

    Hi! You have this error (Lighthouse was unable to download a robots.txt file) when analyzing SEO score on Lighthouse. I know, you have tried with a lot of information sources. For example, fiddling with instructions from Lighthouse introduced (example). Or set up CSP connect-src ‘self’ like some tutorials on Google Search. If the methods you…

    >> Read more

  • Some commonly used Linux (Rocky,…) commands (no need to learn more)

    These is some commonly used Centos, Rocky (RHEL Linux) commands. You no need to learn more. They are enough to use. Note: ↵: Enter <>: Something can change (): Note Commonly used Linux (Rocky, Centos, RHEL) commands reboot ↵ (mean reboot system) systemctl restart <something> ↵ (restart a program) systemctl status <something> ↵ (watch working…

    >> Read more

  • Hello world!

    Hi everyone! This is a blog write on WordPress. So, I keep the first of sample post “Hello World”. I think, this is so important. I keep to use default themes, because I think You simple need to read some short content. This blog is my method to keep some special contents, and share to…

    >> Read more