Skip to content

Instantly share code, notes, and snippets.

View lnthien97's full-sized avatar

thienln lnthien97

View GitHub Profile
#Ubuntu 22.04
# How to install Nginx using nginx-build tools.
## Install nginx-build.
$ wget https://github.com/cubicdaiya/nginx-build/releases/download/v0.11.6/nginx-build-linux-amd64-0.11.6.tar.gz \
-O /tmp/nginx-build.tar.gz && \
tar -xzf /tmp/nginx-build.tar.gz \
-C /usr/local/bin && \
chmod +x /usr/local/bin/nginx-build
@lnthien97
lnthien97 / how-to-create-csr-file
Created March 25, 2024 04:21
Manually Generate a Certificate Signing Request (CSR) Using OpenSSL
# CSR for single domain: abc.example.com
openssl req -new -newkey rsa:2048 \
-keyout abc.key \
-nodes -out abc.csr \
-subj "/C=VN/ST=Ho Chi Minh/L=District 16/O=MyCompany/OU=MyTeam/CN=abc.example.com"
# CSR for multi-domain - Subject Alternative Name (SAN): abc.example.com and xyz.example.com
openssl req -new -newkey rsa:2048 \
-keyout abcxyz.key \
-nodes -out abcxyz.csr \
# gdisk
gdisk /dev/sdb
-> x extra functionality (experts only)
-> Command (? for help): x
-> z zap (destroy) GPT data structures and exit
-> Blank out MBR? (Y/N): Y
# sgdisk
zgdisk -Z /dev/sdb
How to use iperf3 to test bandwidth between 2 hosts
# Ubuntu 22.04
# Install iperf3
sudo apt install iperf3
# On host-01 (10.10.10.205), run iperf3 as a server
iperf3 -s