-
Update apt's package list from the repository
sudo apt-get update
-
Install openssh-server package.
sudo apt-get install -y openssh-server
-
ssh service should be started and enabled by default after installation. Check to confirm.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from enum import IntEnum | |
from pydantic import BaseModel | |
class DropdownCode(BaseModel): | |
display_code: Optional[str] = Field(None, title="表示コード") | |
display_name: Optional[str] = Field(None, title="表示名") | |
class LabelEnum(IntEnum): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
##Note the below commands may need to be run as a sudo depending on the OS you are using. | |
# Updates the OPERATING SYSTEM | |
yum update -y | |
# Install EPEL, required for NGINX, note you would typically do a yum install -y epel-release but in case of | |
# AWS Linux you will need to do the following | |
amazon-linux-extras install epel -y |
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com
, example2.com
, and example1.com/images
on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
docker events --filter 'event=start' --filter 'event=stop' | while read event | |
do | |
container_id=`echo $event | sed 's/.*Z\ \(.*\):\ .*/\1/'` | |
echo $container_id |