Google Compute Engine
Google Compute Engine是GCP的VM類服務。
範例
關閉GCE的自動建立帳號以及SSH key機制:
echo -e '[Daemons]\naccounts_daemon = false' | sudo tee /etc/default/instance_configs.cfg; sudo reboot
所有在staff群組的人都可以無限制sudo:
echo "%staff ALL = (ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/group-staff
安裝gcloud
指令:
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list; curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo tee /usr/share/keyrings/cloud.google.gpg; sudo apt update; sudo apt install -y google-cloud-cli; sudo apt clean