zoukankan      html  css  js  c++  java
  • cobbler 更换dns和dhcp服务器为dnsmasq

    1) 需要配置/etc/cobbler/module.conf, 把manage_dns和manage_dhcp改为manage_dnsmasq

    2) 重启cobbler和dnsmasq服务,dnsmasq总是不成功,原因是之前提供dns服务和dhcp服务的named和dhcpd进程还在占用着相应的端口

    如果查看systemctl status dnsmasq,有如下的错误:

    dnsmasq: failed to create listening socket: Address already in use

    经过sudo netstat -nlp | grep 53                 #(注意必须价sudo,否则看不到进程的名字,也就是这个错误:No info could be read for "-p": geteuid()=1000 but you should be root.)

    得到

    tcp        0      0 10.108.125.112:53       0.0.0.0:*               LISTEN      53348/named  

    于是通过ps查到named进程kill掉。

    再重启dnsmasq时又遇到如下错误:

    dnsmasq: failed to bind DHCP server socket: Address already in use

    同理,这是dhcpd进程占用了端口,kill掉,再重启dnsmasq一般就可以了。

    (ps,如果不能成功pxe boot镜像,那就用sudo cobbler check检查以下问题,然后解决一下就可以了,一般是需要enable并start rsyncd服务)

    贡献dnsmasq.template文件:(我用本机做了dhcp服务的代理。)

    # Cobbler generated configuration file for dnsmasq
    # $date 
    #
    
    # resolve.conf .. ?
    #
    enable-tftp
    tftp-root=/var/lib/tftpboot
    tftp-no-blocksize
    log-dhcp
    log-facility=/var/log/dnsmasq
    #no-poll
    #enable-dbus
    read-ethers
    addn-hosts = /var/lib/cobbler/cobbler_hosts
    
    #dhcp-range=192.168.1.5,192.168.1.200
    #dhcp-range=10.108.124.100,10.108.124.250,255.255.252.0
    dhcp-range=10.108.125.112,proxy
    #dhcp-ignore=tag:!known
    #dhcp-option=3,$next_server
    #dhcp-lease-max=1000
    #dhcp-authoritative
    dhcp-option=vendor:PXEClient,6,2b
    pxe-service=X86PC, "Boot from network", pxelinux
    dhcp-boot=pxelinux.0
    dhcp-boot=net:normalarch,pxelinux.0
    dhcp-boot=net:ia64,$elilo
    
    $insert_cobbler_system_definitions
    

      

  • 相关阅读:
    数据库基础之锁(2. 幻读理解)
    数据库基础之锁(3. 避免幻读对事务并发性的影响)
    数据库基础之锁(4. 多版本并发控制MVCC原理详解)
    同步、异步与阻塞非阻塞
    C++基础之Lambda表达式
    C++基础之static的二三事
    个人总结 —— 事事满怀热情
    第三次结对作业:需求建模练习
    第二次结对作业
    第一次结对作业
  • 原文地址:https://www.cnblogs.com/pinganzi/p/5283433.html
Copyright © 2011-2022 走看看