# 徐欣業專題第一週筆記(2022/09/22~2022/09/29)
[](https://hackmd.io/kQSkhJocRDutmKHitnSdhA)
[TOC]
- [x] VM(Virtual Machine)
- [x] github
- [x] docker
- [x] heroku
- [x] NGRoK
- [x] linode
- [x] DB
### Virtual Machine(VM)虛擬機器
- What is VM?
- a software computer used as emulation of an actual physical computer
- can run multi-tenant on on physical computer
- 
- VM
- hypervisor
- VMware vSphere
- Microsoft Hyper-V
- OS(operating system)
- Ubuntu
- Linux system
- open source
- VirtualBox
- work on Windows, Linux
- Virtual Machine compare to Physical Servers
- stable
- easy to find the problem
- VMs are independ to each other, so that if one of the VM get destroy.
- problem can be remove easier than physical computer
- build a new VM and restore the entire VM at a DR site
- easy to manage
- recovery process can be very fast, because we don't need to restore the physical computer.
- can Customize system size
- cheaper
- because most of the physical system have a lot of resource isn't use, VM can take care of the underutilized system.
- not easy to control.?
- need profassional skill to control.
- easy to remove server data to different server.
- physical server environment need move to another location,is more difficult.
- need to build up the same environment step by step as the original one.
- reference
- [Physical Servers vs. Virtual Machines: Key Differences and Similarities
](https://www.nakivo.com/blog/physical-servers-vs-virtual-machines-key-differences-similarities/)
- [Virtual Machine | 虛擬機器](https://www.gigabyte.com/tw/Glossary/virtual-machine)
### GitHub & Git
- Distributed Version Control System(分散式版本控制系統)
- repository(資料庫)
- History
- can tell the user when the code get change, and what change between two code.
- can check all the document(code, picture,...)
- can change what you want to public immediately
- can storage multi-version's project in one list.
- multi-person collaboration
- provide Cloud storage save our project
- compare to centralized Version Control System(集中式版本控制)
- diversify risk, everybody have there own code in there own device


- how to use
- Create a new repository
- set owner name
- Repository name
- Description
- reference
- [Git和Github簡介](https://www.leunghoyin.hk/git-github-intro)
- [A list of commonly used Git commands](https://github.com/joshnh/Git-Commands)
- [Git Bash 基本操作](http://yhhuang1966.blogspot.com/2020/01/git-git-bash.html)
- [git/.COMMIT_EDITMSG.swp](https://www.itdaan.com/tw/81e9e8f6ca1f8cbe318fb984bab7d6a4)
- [git commit 时出现:please enter the commit message for your changes](https://zhuanlan.zhihu.com/p/133331582)
- [Git-解讀git status的訊息,了解工作資料夾的版控狀態](https://ithelp.ithome.com.tw/articles/10211789)
- [Git – GitHub 出現](http://jsnwork.kiiuo.com/archives/3147/git-github-%E5%87%BA%E7%8F%BE-%E3%80%8Cplease-make-sure-you-have-the-correct-access-rights-and-the-repository-exists-%E3%80%8D/)
- [error: src refspec xxx does not match](https://blog.csdn.net/u014361280/article/details/109703556)
### Docker
- software platfrom
- Build, test, and deploy applications quickly
- packages software into standardlized units called containers
- let user easy to transplant to other deivice
- provide flexable cloud sevice
- How it work
- Docker container
- Dockerfile
- A order that contain how to build the Docker image
- 
- Docker image
- Docker container's blueprint
- Contain Docker file and code, code version
- Docker ignore: will not be upload
- 
- Docker vs VM
- 
- Docker
- Take up less resources
- High resource utilization
- Share resource
- run fast
- VM
- when user develop in different OS or version, VM need to install all the OS and version
- waste a lot of time
- OS operating needs lots of time and complexity
- Refernce
- [什麼是 Docker](https://aws.amazon.com/tw/docker/)
- [Docker vs VM](https://geekflare.com/docker-vs-virtual-machine/)
- [Docker download](https://docs.docker.com/desktop/install/windows-install/)
### Database(DB)
- organized collection of structured information, or data, typically stored electronically in a computer system, usually control by database management system(DBMS).
- data can then be easily accessed, managed, modified, updated, controlled, and organized.
- structured query language(SQL)
- SQL is a programming language used by nearly all relational databases to query, manipulate, and define data, and to provide access control.
- Reference
- [What is a Database](https://www.oracle.com/database/what-is-database/#:~:text=A%20database%20is%20an%20organized,database%20management%20system%20(DBMS).)
### Linode
- Virtual Private Server(VPS)
- uses virtualization software to partition physical servers into multiple virtual servers each having the ability to run its own Operating System (OS) and applications.
- Kernel-based Virtual Machine (KVM)
- let user easy to use one device to switch and control multi-devices.
- save space and cost savings...
- provide different Linux system for user
- ex. Alpine、Arch Linux、Centos、Debian、Fedora、Gentoo、Slackware、Ubuntu、openSUSE
- didn't provide windows, need to prepare for itself.
- refernce
- [KVM](https://www.aten.com/tw/zh/reasources/feature-articles/what-is-a-kvm-switch/)
- [VPS](https://fullforms.com/VPS#:~:text=What%20does%20VPS%20mean%3F,System%20(OS)%20and%20applications.)
- [Linode](https://www.kjnotes.com/other/106)
## LineBot
### heroku
- PaaS(platform as a service)
- online computing services
- provide platform-based service
- User don't need to manage and control online platform-based
- User only need take care of app.
- a platform that allow user to public online
- heroku have provide Dyno to let the user run faster
- Dyno: virtual machine,
- need $$$
- AWS(Amazon Web Services)
### ngrok
- Reverse Proxy(反向代理伺服器)
- Used as a proxy on the server side
- Clients only knows proxy's IP
- Clients can use reverse server to access resources on different back-end servers
- public localhost server



- refernce
- [Heroku vs ngrok](https://stackshare.io/stackups/heroku-vs-ngrok)
- [NGROK](https://www.newton.com.tw/wiki/ngrok/13986278)
- [反向代理](https://zh.wikipedia.org/zh-tw/%E5%8F%8D%E5%90%91%E4%BB%A3%E7%90%86)
- [ngrok 不求人:自己搭一個窮人版的 ngrok 服務](https://5xruby.tw/posts/easy-ngrok-by-nginx-ssh-tunnel)
- [不做怎麼知道系列](https://ithelp.ithome.com.tw/articles/10230149)