Debian/Ubuntu/CentOS 网络安装/网络重装/纯净安装 一键脚本

/ 0评 / 0

[ Linux Shell ] 通用无限制在 Linux VPS 上一键全自动 dd 安装 Windows



<span class="hljs-comment">#二进制文件    Debian/Ubuntu    RedHat/CentOS</span>
<span class="hljs-attribute">iconv</span>        <span class="hljs-meta"> [libc-bin]       [glibc-common]</span>
<span class="hljs-attribute">xz</span>           <span class="hljs-meta"> [xz-utils]       [xz]</span>
<span class="hljs-attribute">awk</span>          <span class="hljs-meta"> [gawk]           [gawk]</span>
<span class="hljs-attribute">sed</span>          <span class="hljs-meta"> [sed]            [sed]</span>
<span class="hljs-attribute">file</span>         <span class="hljs-meta"> [file]           [file]</span>
<span class="hljs-attribute">grep</span>         <span class="hljs-meta"> [grep]           [grep]</span>
<span class="hljs-attribute">openssl</span>      <span class="hljs-meta"> [openssl]        [openssl]</span>
<span class="hljs-attribute">cpio</span>         <span class="hljs-meta"> [cpio]           [cpio]</span>
<span class="hljs-attribute">gzip</span>         <span class="hljs-meta"> [gzip]           [gzip]</span>
<span class="hljs-attribute">cat</span>,cut..    <span class="hljs-meta"> [coreutils]      [coreutils]</span>

<span class="hljs-meta">#</span><span class="bash">Debian/Ubuntu:</span>
apt-get install -y xz-utils openssl gawk file
<span class="hljs-meta">
#</span><span class="bash">RedHat/CentOS:</span>
yum install -y xz openssl gawk file
<span class="hljs-meta">#</span><span class="bash">Debian/Ubuntu:</span>
apt-get update
<span class="hljs-meta">
#</span><span class="bash">RedHat/CentOS:</span>
yum update

<span class="hljs-attribute">bash</span> <(wget --<span class="hljs-literal">no</span>-check-certificate -qO- <span class="hljs-string">'https://moeclub.org/attachment/LinuxShell/InstallNET.sh'</span>) -d <span class="hljs-number">9</span> -v <span class="hljs-number">64</span> -a

<span class="hljs-attribute">wget</span> --<span class="hljs-literal">no</span>-check-certificate -qO InstallNET.sh <span class="hljs-string">'https://moeclub.org/attachment/LinuxShell/InstallNET.sh'</span> && chmod a+x InstallNET.sh
Usage:
        bash InstallNET.sh      -d/--debian [dist-name]
                                -u/--ubuntu [dist-name]
                                -c/--centos [dist-version]
                                -v/--ver [32/i386|64/amd64]
                                --ip-addr/--ip-gate/--ip-mask
                                -apt/-yum/--mirror
                                -dd/--image
                                -a/-m
<span class="hljs-meta">
#</span><span class="bash"> dist-name: 发行版本代号</span>
<span class="hljs-meta">#</span><span class="bash"> dist-version: 发行版本号</span>
<span class="hljs-meta">#</span><span class="bash"> -apt/-yum/--mirror : 使用定义镜像</span>
<span class="hljs-meta">#</span><span class="bash"> -a/-m : 询问是否能进入VNC自行操作. -a 为不提示(一般用于全自动安装), -m 为提示.</span>

<span class="hljs-meta">#</span><span class="bash">使用默认镜像全自动安装</span>
bash InstallNET.sh -d 8 -v 64 -a
<span class="hljs-meta">
#</span><span class="bash">使用自定义镜像全自动安装</span>
bash InstallNET.sh -c 6.10 -v 64 -a --mirror 'http://mirror.centos.org/centos'
<span class="hljs-meta">
#</span><span class="bash"> 以下示例中,将X.X.X.X替换为自己的网络参数.</span>
<span class="hljs-meta">#</span><span class="bash"> --ip-addr :IP Address/IP地址</span>
<span class="hljs-meta">#</span><span class="bash"> --ip-gate :Gateway   /网关</span>
<span class="hljs-meta">#</span><span class="bash"> --ip-mask :Netmask   /子网掩码</span>
<span class="hljs-meta">
#</span><span class="bash">使用自定义镜像全自动安装</span>
<span class="hljs-meta">#</span><span class="bash">bash InstallNET.sh -u 9 -v 64 -a --mirror <span class="hljs-string">'http://mirrors.ustc.edu.cn/debian/'</span></span>
<span class="hljs-meta">
#</span><span class="bash">使用自定义镜像自定义网络参数全自动安装</span>
<span class="hljs-meta">#</span><span class="bash">bash InstallNET.sh -u 16.04 -v 64 -a --ip-addr x.x.x.x --ip-gate x.x.x.x --ip-mask x.x.x.x --mirror <span class="hljs-string">'http://archive.ubuntu.com/ubuntu'</span></span>
<span class="hljs-meta">
#</span><span class="bash">使用自定义网络参数全自动dd方式安装</span>
<span class="hljs-meta">#</span><span class="bash">bash InstallNET.sh --ip-addr x.x.x.x --ip-gate x.x.x.x --ip-mask x.x.x.x -dd <span class="hljs-string">'https://moeclub.org/onedrive/IMAGE/Windows/win7emb_x86.tar.gz'</span></span>
<span class="hljs-meta">
#</span><span class="bash">使用自定义网络参数全自动dd方式安装存储在谷歌网盘中的镜像(调用文件ID的方式)</span>
<span class="hljs-meta">#</span><span class="bash">bash InstallNET.sh --ip-addr x.x.x.x --ip-gate x.x.x.x --ip-mask x.x.x.x -dd <span class="hljs-string">"https://image.moeclub.org/GoogleDrive/1cqVl2wSGx92UTdhOxU9pW3wJgmvZMT_J"</span></span>
<span class="hljs-meta">
#</span><span class="bash">使用自定义网络参数全自动dd方式安装存储在谷歌网盘中的镜像</span>
<span class="hljs-meta">#</span><span class="bash">bash InstallNET.sh --ip-addr x.x.x.x --ip-gate x.x.x.x --ip-mask x.x.x.x -dd <span class="hljs-string">"https://image.moeclub.org/GoogleDrive/1cqVl2wSGx92UTdhOxU9pW3wJgmvZMT_J"</span></span>
<span class="hljs-meta">
#</span><span class="bash">国内推荐使用USTC源</span>
<span class="hljs-meta">#</span><span class="bash">--mirror <span class="hljs-string">'http://mirrors.ustc.edu.cn/debian/'</span></span>


<span class="hljs-comment"># 推荐使用带有 /GoogleDrive/</span><span class="hljs-comment"> 链接, 速度更快.</span>
<span class="hljs-comment"># 当然也可以使用自己GoogleDrive中储存的镜像,使用方式:</span>
  <span class="hljs-symbol">https:</span>/<span class="hljs-regexp">/image.moeclub.org/</span>GoogleDrive/

<span class="hljs-comment"># win7emb_x86.tar.gz:</span>
  <span class="hljs-symbol">https:</span>/<span class="hljs-regexp">/image.moeclub.org/</span>GoogleDrive/<span class="hljs-number">1</span>srhylymTjYS-Ky8uLw4R6LCWfAo1F3s7 
  <span class="hljs-symbol">https:</span>/<span class="hljs-regexp">/moeclub.org/onedrive</span><span class="hljs-regexp">/IMAGE/</span>Windows/win7emb_x86.tar.gz

<span class="hljs-comment"># win8.1emb_x64.tar.gz:</span>
  <span class="hljs-symbol">https:</span>/<span class="hljs-regexp">/image.moeclub.org/</span>GoogleDrive/<span class="hljs-number">1</span>cqVl2wSGx92UTdhOxU9pW3wJgmvZMT_J
  <span class="hljs-symbol">https:</span>/<span class="hljs-regexp">/moeclub.org/onedrive</span><span class="hljs-regexp">/IMAGE/</span>Windows/win8.<span class="hljs-number">1</span>emb_x64.tar.gz

<span class="hljs-comment"># win10ltsc_x64.tar.gz:</span>
  <span class="hljs-symbol">https:</span>/<span class="hljs-regexp">/image.moeclub.org/</span>GoogleDrive/<span class="hljs-number">1</span>OVA3t-ZI2arkM4E4gKvofcBN9aoVdneh
  <span class="hljs-symbol">https:</span>/<span class="hljs-regexp">/moeclub.org/onedrive</span><span class="hljs-regexp">/IMAGE/</span>Windows/win10ltsc_x64.tar.gz

Administrator

Vicer

在你的机器上全新安装,如果你有VNC,可以看到全部过程. 在dd安装镜像的过程中,不会走进度条(进度条一直显示为

0%

Starting up the partitioner

                          使用谷歌网盘中储存的镜像: [无限制大小] 获取谷歌网盘文件临时直接下载链接

如果看到 "

Starting graphical installation

VNC Viewer

IP地址:端口

1

5901

声明:

  1. 各种形式的翻译或转载需注明作者及本文地址.
  2. 使用该脚本造成的任何直接损失或间接损失,萌咖不负任何责任.

 

发表评论