AKZN Notes

Archives for My Lazy and Forgetful Mind

Category: Linux

how to log mysql query that has long time to execute

To log slow-running MySQL queries, you can enable the Slow Query Log feature in MySQL. This log will record all queries that take longer than a specified amount of time to execute. Here’s how to set it up: Step 1: Enable Slow Query Logging To enable slow query logging, you need to modify the MySQL […]

HTTP Basic Authentication to secure phpMyAdmin

HTTP Authentication is a method of securing web resources by requiring users to provide valid credentials before accessing them. It operates at the HTTP protocol level and can be implemented using several authentication schemes. One common method for HTTP Authentication is Basic Authentication, which prompts users to enter their username and password in a dialog […]

Importing MySQL Gzipped Dump File via Terminal

Importing MySQL Gzipped Dump File via Terminal When dealing with MySQL databases, it’s common to export and import data for various reasons, such as backups or transferring data between environments. In this concise guide, we’ll focus on importing a gzipped MySQL dump file using the terminal on a system running Ubuntu. Step 1: Navigate to […]

How to Set Timezone Permanently on Ubuntu to UTC+7 (Indochina Time, ICT)

Introduction: Setting the correct timezone on your Ubuntu system is crucial for accurate timekeeping and proper synchronization. In this article, we will guide you through the process of permanently setting the timezone to UTC+7 (Indochina Time, ICT) using the timedatectl command. Step 1: Open a Terminal Open a terminal on your Ubuntu system. You can […]

Run two PHP version on same server

Below is a simple Markdown tutorial for configuring Apache to run two PHP versions (PHP 7.4 and PHP 8.0) concurrently using PHP-FPM. This assumes you’re using a Linux system with Apache. Running Multiple PHP Versions with Apache and PHP-FPM before starting, check if we already has two php version sudo update-alternatives –display php Prerequisites Linux […]

Deploy NodeJs Application to VPS

Deploying a Node.js application to a Virtual Private Server (VPS) is a crucial step in bringing your web applications to life. In this guide, we’ll walk you through the process of setting up your VPS, transferring your Node.js code, and configuring the server to host your application efficiently. Deploy to VPS Set Up Your VPS: […]

How to deploy golang API backend

Step-by-Step Guide: Deploying a Golang API Backend on a Linux Server Prerequisites: You have a Golang API project ready. You have access to a Linux server. Apache is installed and properly configured on the server. Deployment Steps: 1. Check the .env File: Ensure your Golang project has a properly configured .env file containing all the […]

Install Server Stack to Armbian for CVCMA

This article is my notes for step by step to install and configure set top box Armbian into kiosk device. List of Bugs browser failed to launch immediately solution : add sleep 60 before launching the browser display need to restart or reattach the hdmi cable if system rebooted. solution: use xrandr to relaunch the […]

Configuring DNS in Linux with resolv.conf

In Linux, you can configure DNS settings using the resolv.conf file. Here’s a quick guide to get you started: Open a terminal. Edit the resolv.conf file using a text editor: sudo nano /etc/resolv.conf Add your preferred DNS servers: nameserver 8.8.8.8 nameserver 8.8.4.4 Save the changes and close the text editor. To prevent overwriting, create a […]

Using dd Command with Windows 10 Using Cygwin

Using dd Command with Windows 10 Using Cygwin The dd command is a powerful tool commonly used in Unix-like operating systems for disk-related operations. While Windows 10 does not have a built-in dd command, you can leverage the capabilities of Cygwin to use dd in a Windows environment. Cygwin provides a collection of GNU and […]