2016年4月28日 星期四

PXE Boot on CentOS 7

http://www.unixmen.com/install-pxe-server-and-configure-pxe-client-on-centos-7/


Essentially you follow the article "Install PXE Server And Configure PXE Client On CentOS 7" of the link about to setup a PXE network.


A few thing to note.
1.
You may see below
curl: (22) The requested URL returned error: 403 Forbidden
Warning: Download 'http://192.16.1.150/centos7_x64/LiveOS/squashfs.img' failed!

So, using this will be working
[root@pxe centos7_x64]# vi /etc/httpd/conf.d/pxeboot.conf
Alias /centos7_x64 /var/lib/tftpboot/centos7_x64/
<Directory /var/lib/tftpboot/centos7_x64>
    Options Indexes FollowSymLinks
    AllowOverride none
    Require all granted
</Directory>
<Directory />
    Options Indexes FollowSymLinks
    AllowOverride none
    Require all granted
</Directory>

2. DCHP ARGS

vi /etc/sysconfig/dhcpd
# WARNING: This file is NOT used anymore.

# If you are here to restrict what interfaces should dhcpd listen on,
# be aware that dhcpd listens *only* on interfaces for which it finds subnet
# declaration in dhcpd.conf. It means that explicitly enumerating interfaces
# also on command line should not be required in most cases.

# If you still insist on adding some command line options,
# copy dhcpd.service from /lib/systemd/system to /etc/systemd/system and modify
# it there.
# https://fedoraproject.org/wiki/Systemd#How_do_I_customize_a_unit_file.2F_add_a_custom_unit_file.3F

DHCPDARGS=enp0s8

# example:
# $ cp /usr/lib/systemd/system/dhcpd.service /etc/systemd/system/
# $ vi /etc/systemd/system/dhcpd.service
# $ ExecStart=/usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf -user dhcpd -group dhcpd --no-pid <your_interface_name(s)>
# $ systemctl --system daemon-reload
# $ systemctl restart dhcpd.service



3. When setting the dchp server, you may not be able to restarat the dhcpd service.
You need to add a subnet section accoridng to http://linux.vbird.org/linux_server/0340dhcp.php#theory

subnet 192.168.100.0 netmask 255.255.255.0 {
    range 192.168.100.101 192.168.100.200;  <==分配的 IP 範圍

    # 3. 關於固定的 IP 啊!
    host win7 {
        hardware ethernet    08:00:27:11:EB:C2; <==用戶端網卡 MAC
        fixed-address        192.168.100.30;    <==給予固定的 IP
    }
}

沒有留言:

張貼留言

2023 Promox on Morefine N6000 16GB 512GB

2023 Promox on Morefine N6000 16GB 512GB Software Etcher 100MB (not but can be rufus-4.3.exe 1.4MB) Proxmox VE 7.4 ISO Installer (1st ISO re...