apt install ca-certificates curl
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
chmod a+r /etc/apt/keyrings/docker.asc
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
tee /etc/apt/sources.list.d/docker.list > /dev/null
apt update
apt-cache madison docker-ce | awk '{ print $3 }'
VERSION_STRING="5:26.1.3-1~debian.12~bookworm"
apt-get install docker-ce=$VERSION_STRING docker-ce-cli=$VERSION_STRING containerd.io docker-buildx-plugin docker-compose-plugin
Wednesday, August 13, 2025
Install Docker on Debian 12
Monday, July 29, 2024
Add JMX monitor without authen and SSL
Add this line to java command, replace 10.68.55.37 with ip of local jmx server
-Dcom.sun.management.jmxremote -Djava.rmi.server.hostname=10.68.55.37 -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.port=9999 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
Saturday, August 12, 2023
Install kernel mainline
- In Terminal, enter
uname -mrsto determine the current kernel version. - Check and get any needed updates by entering
sudo apt update && sudo apt upgrade. - Add the ppa for the kernels:
sudo add-apt-repository ppa:cappelikan/ppa -y - Again, get the update list, now that the new repository has been added:
sudo apt update - Install the latest mainline kernel:
sudo apt install mainline -y - Reboot.
Dell 9310 fix suspend issue
BIOS, turn off Early Logo Display to OFF in the Sign of Life options
BIOS, disable Secure Boot
In the system, edit and configure in /etc/default/grub to add to the kernel options : mem_sleep_default=deep
My current kernel options are : GRUB_CMDLINE_LINUX_DEFAULT="quiet splash mitigations=off mem_sleep_default=deep"
(do NOT use mitigations=off unless you seriously know what you're doing)
Reboot. TO check if the deep sleep is on :
cat /sys/power/mem_sleep
Should return :
s2idle [deep]
The deep here confirms the deep sleep mode is turned on.
Saturday, June 10, 2023
Renew openvpn certificate
cd /etc/openvpn/easy-rsa
#replace server_X79s9v1gWRTvLcGp with your server_yourcertificate
# name server_X79s9v1gWRTvLcGp can be found in /etc/openvpn
./easyrsa renew server_X79s9v1gWRTvLcGp nopass
cp pki/issued/server_X79s9v1gWRTvLcGp.crt ../
cp pki/private/server_X79s9v1gWRTvLcGp.key ../
/etc/init.d/openvpn restart
Friday, April 21, 2023
Run DBeaver portable with jdk 17
add to eclipse.ini config:
-XX:+IgnoreUnrecognizedVMOptions
--add-modules=ALL-SYSTEM
--add-opens=java.base/java.nio=ALL-UNNAMED
--add-opens=java.base/java.net=ALL-UNNAMED
Thursday, March 23, 2023
Setup relicate table Postgres
SHOW wal_level;
ALTER SYSTEM SET wal_level = logical;
On Publisher database:
--STEP 1: create publiccation named mypub, for table1,table2, table3
CREATE PUBLICATION mypub FOR TABLE newtable;
--check created publication
SELECT *
FROM pg_catalog.pg_publication
SELECT *
FROM pg_catalog.pg_publication_tables
--STEP 2: for each subscription, need to creating relication slot on publication node, 'pgoutput' is plugin
SELECT pg_create_logical_replication_slot('mysub', 'pgoutput');
--check replication slot
SELECT slot_name, slot_type, active FROM pg_replication_slots;
--in case to manual delete replication slot, run
SELECT * FROM pg_drop_replication_slot('slot_name');
CONNECTION 'host=192.168.56.20 port=5432 user=databaseuser password=passhere dbname=dbtest1'
PUBLICATION mypub
WITH (create_slot=false);
SELECT *
FROM pg_subscription
-- drop subscription
ALTER SUBSCRIPTION mysub DISABLE;
ALTER SUBSCRIPTION mysub SET (slot_name=NONE);
DROP SUBSCRIPTION mysub