乡下人产国偷v产偷v自拍,国产午夜片在线观看,婷婷成人亚洲综合国产麻豆,久久综合给合久久狠狠狠9

  • <output id="e9wm2"></output>
    <s id="e9wm2"><nobr id="e9wm2"><ins id="e9wm2"></ins></nobr></s>

    • 分享

      通過網(wǎng)絡(luò)安裝Linux(CentOS)系統(tǒng)的方法

       ldjsld 2015-11-20

      一、原理

      無光驅(qū)、軟驅(qū)的一臺服務(wù)器,想要安裝Linux系統(tǒng)。我們需要通過網(wǎng)卡的PXE協(xié)議,引導(dǎo)之后安裝Linux。流程:機(jī)器啟動-網(wǎng)卡引導(dǎo)-通過DHCP獲得IP地址-通過tftp獲得最基礎(chǔ)的內(nèi)核文件,使用該內(nèi)核文件啟動機(jī)器-啟動之后可以對安裝程序配置,選擇使用http、ftp、nfs方式遠(yuǎn)程獲得安裝所需要的軟件包。

      顯然,網(wǎng)絡(luò)安裝是必須配置服務(wù)器端的。我們的服務(wù)端需要提供以下服務(wù):

      DHCP

      TFTP

      HTTP(FTP,NFS)

      二、服務(wù)配置

      1、DHCP

      配置文件:

      option domain-name "mydomain";

      ddns-update-style none;

      default-lease-time 600;

      max-lease-time 7200;

      server-name "bootserver";

      subnet 192.168.123.0 netmask 255.255.255.0 {

      range 192.168.123.200 192.168.123.201;

      deny unknown-clients;

      }

      host MyP5 {

      filename "pxelinux.0";

      server-name "bootserver";

      hardware ethernet ae:32:20:00:b0:02;

      fixed-address 192.168.123.90;

      }

      這是復(fù)制來的配置文件,稍微解釋一下:

      filename 后面是tftp目錄下的文件,pxelinux.0 則是 syslinux 包內(nèi)的文件。默認(rèn) pxelinux.0 可能在 /usr/lib/syslinux 目錄下,必須將其復(fù)制到 tftp 目錄下。

      host MyP5 下出現(xiàn)的:

      hardware ethernet ae:32:20:00:b0:02;

      fixed-address 192.168.123.90;

      為客戶機(jī)(需要安裝系統(tǒng)的機(jī)器)的 MAC 地址和所分配的IP地址。

      2、TFTP

      由于必須支持TSIZE協(xié)議,所以不能安裝最原始的TFTP包。我選擇使用 tftp-hpa 。

      編輯文件 /etc/xinetd.d/tftp (若沒有,則添加tftp文件)(若不存在xinetd.d,請安裝 xinetd 包)

      # default: off

      # description: The tftp server serves files using the trivial file transfer \

      # protocol. The tftp protocol is often used to boot diskless \

      # workstations, download configuration files to network-aware printers, \

      # and to start the installation process for some operating systems.

      service tftp

      {

      disable = no

      socket_type = dgram

      protocol = udp

      wait = yes

      user = root

      server = /usr/sbin/in.tftpd

      server_args = -s /tftpboot

      per_source = 11

      cps = 100 2

      flags = IPv4

      }

      這里將 /tftpboot 定義為 tftp 服務(wù)的默認(rèn)目錄,您可以自行修改。

      保存之后重啟 /etc/init.d/xinetd 服務(wù),即可開啟 tftp 服務(wù)。

      如何測試 tftp 是否成功開啟?

      在 tftp 目錄下創(chuàng)建一個(gè)文件,比如 1.txt 。

      在 Shell 中連接 tftp 服務(wù):

      tftp 127.0.0.1

      tftp>get 1.txt

      若服務(wù)成功開啟,則能看到成功下載文件的提示。并在當(dāng)前目錄下找到1.txt文件。

      接著復(fù)制光盤中 isolinux 目錄下的 vmlinuz、initrd.img 文件到 /tftpboot 目錄下。

      在 /tftpboot 中創(chuàng)建文件夾 syslinux.cfg 。syslinux.cfg 中保存了 pxelinux 的兩個(gè)配置文件:default、list。

      default:

      default linux

      label linux

      kernel vmlinuz

      append initrd=initrd.img devfs=nomount nofb ramdisk_size=9216

      你可以寫很多個(gè)label,這取決于你同時(shí)想在這臺服務(wù)器上提供多少種版本的 Linux 給客戶機(jī)安裝。一個(gè)版本一個(gè)label,當(dāng)然kernel、與initrd文件名不可以重復(fù)。

      list:

      Choose one of the following Linux distributions for your installation:

      Name Distribution Arch. Installation media

      -----------------------

      CentOS CentOS 4.4 i386 192.168.99.90:/

      你也可以添加多行,用來選擇不同的發(fā)行版本。在選擇的時(shí)候填寫Name下的內(nèi)容即可。

      三、復(fù)制光盤文件

      將光盤文件復(fù)制到對應(yīng)目錄(ftp、http、nfs),如果是使用 http 使用以下命令將多張光盤復(fù)制到一個(gè)目錄里面:

      [root@bootserver] # cp -arv /media/cdrom/* /install

      如果使用 ftp,請確??梢栽L問(可以有用戶名、密碼)。

        本站是提供個(gè)人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點(diǎn)擊一鍵舉報(bào)。
        轉(zhuǎn)藏 分享 獻(xiàn)花(0

        0條評論

        發(fā)表

        請遵守用戶 評論公約

        類似文章 更多