-
Modify volume on AWS
-
Type the following command to list our block devices:
lsblk- Type the following command:
| package main | |
| import ( | |
| "fmt" | |
| ) | |
| func main() { | |
| sl := []string{"zero", "one", "two", "one", "zero", "three", "five", "four", "five"} | |
| duplicateIndex := []int{} |
| cat access.log | awk '{print $1}' | sort -n | uniq -c | sort -nr | head -20 |
Modify volume on AWS
Type the following command to list our block devices:
lsblk| ```bash | |
| echo "alias python=python3" >> ~/.bash_aliases | |
| source ~/.bash_aliases | |
| ``` | |
| ```bash | |
| sudo apt install python3-pip | |
| ``` |
| ```sh | |
| hostnamectl set-hostname newName | |
| ``` |
| Uninstall old versions | |
| ``` | |
| sudo apt-get remove docker docker-engine docker.io containerd runc | |
| ``` | |
| ```bash | |
| sudo apt-get update | |
| sudo apt-get install \ |
| ### Step 1 - nginx-proxy | |
| Start **nginx-proxy** with the three additional volumes declared: | |
| ```shell | |
| $ docker run --detach \ | |
| --name nginx-proxy \ | |
| --publish 80:80 \ | |
| --publish 443:443 \ | |
| --volume /etc/nginx/certs \ |
| Linux add new user | |
| ```bash | |
| sudo adduser username | |
| ``` | |
| Add the new user to `sudo` group | |
| ``` | |
| sudo usermod -aG sudo username |
| Open your terminal and type as | |
| ```sh | |
| lsof -i :8000 | |
| ``` | |
| For example, with port 8000 (python3 -m http.server): | |
| ```sh | |
| $ lsof -i :8000 |