diff --git a/README.md b/README.md index 9a64fe7..5f088da 100644 --- a/README.md +++ b/README.md @@ -36,4 +36,266 @@ Something about scripts to make changes validating! ## Defects: -- Not support for Ubuntu 22.04(jammy) and further versions because Canonical has deprecated the traditions which were also applied together with Debian by forcing users to download a huge several gigabytes iso image and then load it in its' fuckin Cloud-init instead of just two simply a hundred megabytes total network boot files by PXE boot, it runs in QEMU environment and CPU hardware virtualization must be demanded but most of VPS can't handle it well at all. Canonical has developed into a mature commercial company which intends to earn more money from major partners so they discrimes their personal users intentionally who are low-end clients in their conceptions certainly despite these users were their devoted fans since always and helped Canonical to make great achieves today step by step. According to the behavior of discarding a large amount of former precious Debian installer preseed heritances, Canonical would play a role as a guilty dictator like Apple.Inc in more areas and then violate the spirit of the universal free software finally. +- Not support for Ubuntu 22.04(jammy) and further versions because Canonical has deprecated the traditions which were also applied together with Debian by forcing users to download a huge several gigabytes iso image and then load it in its' fuckin Cloud-init instead of just two simply a hundred megabytes total network boot files by PXE boot, it runs in QEMU environment and CPU hardware virtualization must be demanded but most of VPS can't handle it well at all. Canonical has developed into a mature commercial company which intends to earn more money from major partners so they discrimes their personal users intentionally who are low-end clients in their conceptions certainly despite these users were their devoted fans since always and helped Canonical to make great achieves today step by step. According to the behavior of discarding a large amount of former precious Debian installer preseed heritances, Canonical would play a role as a guilty dictator like Apple.Inc in more areas and then violate the spirit of the universal free software finally. +- For Redhat series 8, the minimum memory requirement is 2.5GB, for Redhat series 9, the minimum memory requirement is 2GB. +- Because the syntax of grub1 in Redhat series 6 is different from other Linux version of grub1 or grub2 completely, so I removed support to CentOS 6 and Oracle Linux 6. +- All system templates of GCP are not supported. + +## Download: +
wget --no-check-certificate -qO InstallNET.sh 'https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh' && chmod a+x InstallNET.sh
+ +## Dependences: +Debian series(Debian / Ubuntu): +
apt update -y
+
apt install wget -y
+Redhat series(CentOS / AlmaLinux / RockyLinux / OracleLinux / Fedora / VzLinux): +
yum update --allowerasing -y
+
yum install wget -y
+ +## Quickly start +If you need to add other parameters, version number must be assigned! +### Debian 11 +
bash InstallNET.sh -debian
+### CentOS 9 stream +
bash InstallNET.sh -centos
+### AlmaLinux 9 +
bash InstallNET.sh -almalinux
+### RockyLinux 9 +
bash InstallNET.sh -rockylinux
+### Fedora 37 +
bash InstallNET.sh -fedora
+### Ubuntu 20.04 +
bash InstallNET.sh -ubuntu
+ +## Fully useage sample +
bash InstallNET.sh -debian/ubuntu/centos/almalinux/rockylinux/fedora(os type) 11(os version) -version 64(os bit) -port "your server port" -pwd "your server password" -mirror "a valid url for linux image source" -dd/--image "dd image url" -filetype "gz or xz" -timezone "like Asia/Tokyo etc" --dhcp-static/--ip-addr 'x.x.x.x'(ip address) --ip-mask 'x.x.x.x'(subnet mask) --ip-gate 'x.x.x.x'(gateway) -firmware(Debian with hardware drivers)
+ +## Parameters detail descriptions +**-debian 9/10/11** : Debian 9 and later +
+
+ +**-centos 7/8/9-stream**: CentOS 7 and later +
+
+ +**-almalinux/alma 8/9**: AlmaLinux 8 and later +
+
+ +**-rockylinux/rocky 8/9**: RockyLinux 8 and later +
+
+ +**-fedora 34/35/36/37**: Fedora 34 and later +
+
+ +**-ubuntu 16.04/18.04/20.04**: Ubuntu from 16.04 to 20.04 +
+
+ +**-mirror "a valid DIST mirror url"**: OS install files resource, you can select one which nearest for actual location of your server to upspeed installation. +
+
+ +For Debian, official recommend mirror lists are here: +
+
https://www.debian.org/mirror/list.html
+
+ +For CentOS, official recommend mirror lists are here: +
+
https://www.centos.org/download/mirrors/
+
+ +For AlmaLinux, official recommend mirror lists are here: +
+
https://mirrors.almalinux.org/
+
+ +For RockyLinux, official recommend mirror lists are here: +
+
https://mirrors.rockylinux.org/mirrormanager/mirrors
+
+ +For Fedora, official recommend mirror lists are here: +
+
https://admin.fedoraproject.org/mirrormanager/mirrors/Fedora
+
+ +For Ubuntu, official recommend mirror lists are here: +
+
https://launchpad.net/ubuntu/+cdmirrors
+
+ +**-port ""**: you can pre-specify ssh port of system, range is 1~65535, both Redhat series or Debian series could be supported, **default is '22'**. +
+
+ +**-pwd ""**: you can pre-specify ssh password of system, both Redhat series or Debian series could be supported, **default is 'LeitboGi0ro'**. +
+
+ +**-dd/--image "DD image from a valid url"**: This parameter is for DD mode in KVM or XEN virtualization platform, current os must be Debian series, for example, if you want to DD windows, you can refer to chapter "How to install Windows?" to get more in this document. +
+
+ +**-filetype "gz/xz"**: To determine DD file type, not only ".gz"(default) but also ".xz" can be supported. +
+
+ +**-timezone "like Asia/Tokyo etc"**: It means assign timezone manually, if you are using a proxy to connect to your machine and then execute "InstallNET.sh", automatic timezone configuration may not suitable for you in this situation. +
+
+ +**-raid "0"**: Only for raid 0 disk partition, if your machine has only one hard drive, don't assign it! +
+
+ +**--dhcp-static**: Default to use DHCP to finish network configuration. If your cloud provider is a small or middle merchant, the network of your machine may be static so you need to add it. it is equal with add --ip-addr "" --ip-mask "" --ip-gate "", if you add this, don't distribute the following three items again! It must be added in the last of the command. +
+
+ +**--ip-addr "IPv4 address"**: It must be added with --ip-gate and --ip-mask together, if you have added --dhcp-static, don't assign it again! +
+
+ +**--ip-gate "IPv4 gateway"**: It must be added with --ip-addr and --ip-mask together, if you have added --dhcp-static, don't assign it again! +
+
+ +**--ip-mask "IPv4 subnet musk"**: It must be added with --ip-addr and --ip-gate together, if you have added --dhcp-static, don't assign it again! +
+
+ +**--ip-dns "IPv4 DNS server"**: This one is only for static network configuration and default is 1.0.0.1, you can also change other IPv4 dns server like 8.8.8.8, 9.9.9.9, 4.4.2.2 etc to replace it. If the network of your machine is DHCP, don't assign it! +
+
+ +**-firmware**: Specify drivers for Debian to support old hardwares, if your server location is in mainland China, program will switch to mirror of 'University of Science and Technology of China(https://mirrors.ustc.edu.cn/debian-cdimage/)' for downloading more quickly, default mirror is from http://cdimage.debian.org/cdimage/. +
+
+ +**-version 32/i386 or 64/amd64 or arm/arm64**: OS bit. Program will automatically detect and redirect the CPU architecture from your machine to new system which would be installed, if you aren't known it well, don't assign it! +
+
+ +### Advanced usage, for example Debian 11 (recommend for servers which are locating outside of mainland China) +Japan: +
+
bash InstallNET.sh -debian 11 -mirror "http://ftp.riken.jp/Linux/debian/debian/"
+HongKong: +
+
bash InstallNET.sh -debian 11 -mirror "http://ftp.hk.debian.org/debian/"
+Singapore: +
+
bash InstallNET.sh -debian 11 -mirror "http://ftp.sg.debian.org/debian/"
+South Korea: +
+
bash InstallNET.sh -debian 11 -mirror "https://ftp.jaist.ac.jp/pub/Linux/debian/"
+Taiwan: +
+
bash InstallNET.sh -debian 11 -mirror "http://ftp.tw.debian.org/debian/"
+America: +
+
bash InstallNET.sh -debian 11 -mirror "https://mirrors.ocf.berkeley.edu/debian/"
+Canada: +
+
bash InstallNET.sh -debian 11 -mirror "http://ftp.ca.debian.org/debian/"
+Britain: +
+
bash InstallNET.sh -debian 11 -mirror "http://ftp.uk.debian.org/debian/"
+Germany: +
+
bash InstallNET.sh -debian 11 -mirror "http://ftp.de.debian.org/debian/"
+France: +
+
bash InstallNET.sh -debian 11 -mirror "http://ftp.fr.debian.org/debian/"
+Netherlands: +
+
bash InstallNET.sh -debian 11 -mirror "http://ftp.nl.debian.org/debian/"
+Russia: +
+
bash InstallNET.sh -debian 11 -mirror "http://ftp.ru.debian.org/debian/"
+Australia: +
+
bash InstallNET.sh -debian 11 -mirror "http://ftp.au.debian.org/debian/"
+ +## Default configurations +### Time zone +Depends on the geo-location of guest's IP(automode) or "Asia/Tokyo"(if the format of the input parameter is incorrect or it's not supported by current operating system in manual mode) +### Default user name +root +### Default password +LeitboGi0ro +### Default port +22 +
+
+If you didn't assign any other ssh password or port, after system installation, you must change password(LeitboGi0ro) and ssh port(22) immediately to prevent unauthorized access! +
+
+ +## How to install Windows? +Notice: Microsoft products and services—including images, text, and software downloads (the "content")—are owned either by Microsoft Corporation or by third parties who have granted Microsoft permission to use the content. Microsoft cannot grant you permission for content that is owned by third parties. You may only copy, modify, distribute, display, license, or sell the content if you are granted explicit permission within the End-User License Agreement (EULA) or license terms that accompany the content or are provided in the following guidelines. For more information, consult your copyright attorney. +
+
+"installNET.sh" doesn't provide any third-part activation service for Windows, this function is only help you to research, evaluate related features of Windows. "installNET.sh" is not responsible or liable if someone cause any illegal circumstance. +### Servers based on KVM or XEN virtualization, Debian series only: +
bash InstallNET.sh -dd "DD image download URL"
+### Servers based on physical hardware, Intel network adapter, kimsufi etc: +Change netboot to rescue mode, receive mail, get temporary username and password, log into linux, execute: +
wget -O- "DD download URL" | xzcat | dd of=/dev/sda
+### Available Windows DD images: +#### Windows Server series from TeddySun(https://teddysun.com/): +Username: Administrator +
+Password: Teddysun.com +
+- Windows Server 2022 Datacenter + +Chinese: https://dl.lamp.sh/vhd/zh-cn_win2022.xz +
+English: https://dl.lamp.sh/vhd/en-us_win2022.xz +
+Japanese: https://dl.lamp.sh/vhd/ja-jp_win2022.xz +
+- Windows Server 2019 Datacenter + +Chinese: https://dl.lamp.sh/vhd/cn_win2019.xz +
+English: https://dl.lamp.sh/vhd/en_win2019.xz +
+Japanese: https://dl.lamp.sh/vhd/ja_win2019.xz +
+- Windows Server 2012 R2 Datacenter + +Chinese: https://dl.lamp.sh/vhd/cn_win2012r2.xz +
+English: https://dl.lamp.sh/vhd/en_win2012r2.xz +
+Japanese: https://dl.lamp.sh/vhd/ja_win2012r2.xz +___ + +# .bashrc +.bashrc is a script file system which contains a series of configurations for the terminal session. when the user logs in. The file itself includes highlight settingup for different files. +how to use? +## Delete default .bashrc +
rm -rf ~/.bashrc
+## Download .bashrc and reboot your system +
wget --no-check-certificate -qO ~/.bashrc 'https://raw.githubusercontent.com/leitbogioro/Tools/master/.bashrc' && chmod a+x .bashrc
+
+
reboot
+ +# GroupPolicy import and export +This ".bat" script can only run in Windows. Although only one group-policy rule in Windows can be exported at a time and not support a global one and also have no GUI entrance to import another backuped group policy which exported from another computer. It can help you import or export GroupPolicy conveniently. +## Attentions +