Howto pxe install centos: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
nmcli con del Wired\ connection\ 1 | nmcli con del Wired\ connection\ 1 | ||
nmcli con add con-name eth0 ipv4.method manual type ethernet ifname eth0 ipv4.addresses 192.168.1.24/24 ipv4.gateway 192.168.1.24 ipv4.dns 4.2.2.1,4.2.2.2 autoconnect yes | nmcli con add con-name eth0 ipv4.method manual type ethernet ifname eth0 ipv4.addresses 192.168.1.24/24 ipv4.gateway 192.168.1.24 ipv4.dns 4.2.2.1,4.2.2.2 autoconnect yes | ||
create dhcpd config file | create dhcpd config file '''/etc/dhcp/dhcpd.conf''': | ||
Allow booting; | Allow booting; | ||
Allow bootp; | Allow bootp; |
Revision as of 23:27, 15 October 2020
first we install the following packages:
yum install xinetd dhcp vsftpd syslinux syslinux-tftpboot bind-chroot system-config-kickstart tftp tftp-server -y
configure your network ip address as static:
nmcli con del eth0 nmcli con del Wired\ connection\ 1 nmcli con add con-name eth0 ipv4.method manual type ethernet ifname eth0 ipv4.addresses 192.168.1.24/24 ipv4.gateway 192.168.1.24 ipv4.dns 4.2.2.1,4.2.2.2 autoconnect yes
create dhcpd config file /etc/dhcp/dhcpd.conf:
Allow booting; Allow bootp; authoritative; # Subnet definition subnet 192.168.1.0 netmask 255.255.255.0 { # Parameters for the local subnet option routers 192.168.1.254; option subnet-mask 255.255.255.0; option domain-name "example.com"; option domain-name-servers 192.168.1.254; default-lease-time 21600; max-lease-time 43200; # Client IP range range dynamic-bootp 192.168.1.100 192.168.1.200; filename "pxelinux.0"; next-server 192.168.1.24; }
configure tftp service edit /etc/xinetd.d/tftp: service tftp
{ socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -s /var/lib/tftpboot disable = no per_source = 11 cps = 100 2 flags = IPv4 }