Nginx

Add the following entry in “http{}” block on the/etc/nginx/nginx.conflog_format debug_val_format "$debug_val";In the “server{}” block , for example, set the following entries.#For debuggingset $debug_val "value is :$valiable";access_log/var/log/nginx/debug_val.log debug_val_f ...

CentOS,MySQL

Install MySQL Yum Repository

Example: Download “mysql80-community-release-el8-1.noarch.rpm“

wget

Install “mysql80-community-release-el8-1.noarch.rpm“

yum install mysql80-community-release-el8-1.noarch.rpm

Add “sudo”, if needed.

Check Repo list# yum ...

Ubuntu

If GUI is not installed on Ubuntu, you need to setup Network configuration by editing some files.

Here is an example of how to set static IP address on Ubuntu 20.04.Move the default configuration file.$ mv/etc/netplan/00-installer-config.yaml/etc/netplan/00-installer-config.yaml.bkupEdit Netwo ...

Infrastructure,VirtualBox

“Nested VT-x/AMD-V” can not be changed by default

On page of the Virtual Box 6.x, “Enable Nested VT-x/AMD-V” is grayed out and cannot be changed.

Solution : Execute a VBoxManage command

Move to the directory where Virtual Box is installed on. Then execute the followin ...

Infrastructure,Nginx

If you want to know how to setup a basic HTTP reverse proxy server with NGINX, please visit “How To Setup HTTP Reverse Proxy with Nginx” at first.

In this article, we assumed that the basic setup for a basic http reverse proxy is already finished.

Obtain Certificates for HTTP ...

Infrastructure,MySQL

Problem: MySQL 5.7 is down.

MySQL server is shutdown unexpectedly once a month. It happened when we updated MySQL to 5.7.24. In the/var/mysql.log, the following logs are shown. What is wrong?

2020-07-09T05:54:41.056589Z 0 Giving 0 client threads a chance to die gracefully2020-07-09T05:54:41.05 ...

Infrastructure,Nginx

If you want to know how to install NGINX, please visit “How To Install Nginx on Ubuntu 20.04” at first.

Setup HTTP Reverse Proxy!

Let’s try to setup a HTTP reverse proxy server with Nginx as the following picture.

Understand Nginx’s configuration files.

NginxR ...

CentOS,Firewall,Infrastructure,Security,Ubuntu

For example, we assume that the packets received at the Node A’s interface “192.168.0.3” will be forwarded from another interface “172.20.0.1” to the destination Node B “172.20.0.11”.

Forward From Node A (192.168.0.3) to Node B (172.20.0.11)

In the f ...

Docker,Infrastructure

Option 1. Use the “/etc/localtime” file

Mounting the “localtime” file is the most popular way to change the timezone of containers. Here is an example.

Example: By using host server’s “/etc/localtime” file, change container’s timezone.

sudo ...

Docker,Infrastructure

Port Forwarding Feature on Docker

As you know, on Docker, you can set port forwarding between host server and containers with the following command.

$ docker container run -p :

Example: Create Nginx container. In this case the packets coming to 80 port on the host server will be forwarded to ...

Infrastructure,Ubuntu

NOTICE: Certbot-auto can NOT Work on Ubuntu 20.04

Generally we can download certbot-auto and use it by using like the following commands,

wget mv certbot-auto/usr/local/bin/certbot-autosudo chown root/usr/local/bin/certbot-autosudo chmod 0755/usr/local/bin/certbot-auto

Example: Get a certifi ...

Infrastructure,Ubuntu

Check Current Timezone$ timedatectl

Example:

$ timedatectl Local time: Wed 2020-07-01 01:35:04 UTC Universal time: Wed 2020-07-01 01:35:04 UTC RTC time: Wed 2020-07-01 01:35:05 Time zone: Etc/UTC (UTC, +0000)System clock synchronized: yes NTP service: active RTC in local TZ: noChange Timezone

Infrastructure,Nginx,Ubuntu

Nginx is one of the most popular and highest performance web servers in the world.
In most cases it is used a web server or HTTP/HTTPS reverse proxy. Also recently it can become a proxy of UDP stream.

Install Nginx on Ubuntu 20.04sudo apt updatesudo apt install nginxCheck If Your Nginx is ...

CentOS,Infrastructure

Create Swap File

Here, as an example, create a 400MB swap file “/swpfile”.

dd if=/dev/zero of=/swapfile bs=1M count=1048mkswap/swapfilechmod 600/swapfile

After the swap file “/swpfile” is created, enable the file.

swapon/swapfile

You can check the status with the ...

Infrastructure,Ubuntu

Install Samba Server on Ubuntu 20.04

Install the Samba from Ubuntu repository with following commands in your Ubuntu terminal.

sudo apt upgradesudo apt install samba

After install, check status and version.

smbd --versionsystemctl status smbdsystemctl status nmbd

Example:

Edit/etc/sam ...

Infrastructure,Ubuntu

This is quick setup guide to connect to Ubuntu 20.04 via Remote Desktop.

Install xrdp with apt commandsudo apt updatesudo apt install -y xrdpsudo systemctl restart xrdpConnect from Windows 10 to Ubuntu 20.04

Open RDP on Windows 10 . Before you connect from Windows to Ubuntu via RDP, I recomm ...

Docker,Infrastructure

Basically, there are 2 options to control containers with shells without SSH login.

Option 1. Use -t (pseudo-tty) option without ssh

Example: Create a new nginx container named “webnode“, and run it interactively. By using “-t” option that simulates a terminal, you ca ...

Docker,Infrastructure

Basically, you can see the all commands with “docker container –help“, but at first, I believe you need the following commands for your quick start!

Basic commands

Check version.

$ docker version

Check more details.

$ docker info

Docker command format.

$ docker ...

Docker,Infrastructure

Install Ubuntu to virtual box.

1-1. Download and Install Ubuntu.

Ubuntu-downloadInstall some applications and change OS settings.

2-1. Install ssh.

$ sudo apt-get install openssh-server

2-2. Install curl.

$ sudo apt install curl

2-3. Install git.

$ sudo apt install git

2-4 Cha ...