Scenarios
- VPS provider has limited OS templates
- VPS provider's template has some software or services we don't need
- VPS provider doesn't support OS reinstallation
- VPS provider's OS templates can't install certain software
Test Info
The systems below have been tested
- Debian: 9, 10, 11;
- Ubuntu: 18.04, 20.04;
The platform below have been tested
- Oracle
- Do
- Azure
One-Key Script
Default example「use Debian 11 as an example」
bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/MoeClub/Note/master/InstallNET.sh') -d 11 -v 64 -a
default username:root
; default password:MoeClub.org
support config
- -a:auto
- -d:debian
- -u:ubuntu
- -p:define root password
- -port:define ssh port
- --ip-addr:define IP address
- --ip-gate:define IP gateway
- --ip-mask:define netmask
Detailed example
# install net-tools
apt-get install net-tools
# check IP address
ifconfig -a
# check IP gateway and netmask
route -n
# use Ubuntu 20.04 as an example
bash <(wget --no-check-certificate -qO- 'https://raw.githubusercontent.com/MoeClub/Note/master/InstallNET.sh') -u 20.04 -v 64 -a --ip-addr 194.87.xxx.xxx(change to the IP you got) --ip-gate 194.87.xxx.xxx(change to the gateway you got) --ip-mask 255.255.xxx.xxx(change to the netmask you got) -p "your root password" -port "your ssh port"
Disclaimer
One-key network reinstallation script has certain risks. Please make sure to backup your data before proceeding. Because there are many VPS providers and the default systems are variable, the script above can't guarantee success。
Reference
- InstallNET.sh
- Script Autor:Vicer