zoukankan      html  css  js  c++  java
  • ubuntu装cobbler

     安装cobbler

    1、Cobbler 2.9新增uefi支持
    2、Cobbler 2.9依赖syslinux 6.x版本支持

     1 apt-get install apache2 libapache2-mod-wsgi python-cheetah python-netaddr python-simplejson python-urlgrabber python-yaml python-django make gcc git automake python-pip
     2 apt-get install tftpd-hpa
     3 apt-get install nasm uuid-dev
     4 wget https://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-6.03.tar.gz
     5 tar zxfv syslinux-6.03.tar.gz
     6 cd syslinux-6.03
     7 pip3 install future distro coverage
     8 make && make install
     9 git clone https://github.com/cobbler/cobbler.git
    10 cd cobbler
    11 pip3 install future distro coverage netaddr simplejson pyyaml Cheetah3
    12 make
    13 make install
    14 ln -s /etc/apache2/conf-available/cobbler.conf /etc/apache2/conf-enabled/
    root@ubuntu_18_1:/etc/apache2# cp mods-available/proxy_http.load mods-enabled/
    root@ubuntu_18_1:/etc/apache2# cp mods-available/proxy.load mods-enabled/ 15 systemctl start apache2.service 16 pip3 install netaddr simplejson pyyaml Cheetah3 17 cp /etc/cobbler/cobblerd.service /lib/systemd/system/cobbler.service 18 systemctl start cobbler

    1.apache启动报错:Invalid command 'ProxyRequests', perhaps misspelled or defined by a module not included in the server configuration

    解决方法:必须禁用代理模块。使用以下命令启用它

    # a2enmod proxy

    2.通过cobbler命令进行环境监测,问题如下:

    [root@linux-cobbler ~]# cobbler check
    4.1 : The 'server' field in /etc/cobbler/settings must be set to something other than localhost, or kickstarting features will not work.  This should be a resolvable hostname or IP for the boot server as reachable by all machines that will use it.
    解决办法:
    # sed -i 's/server: 127.0.0.1/server: 192.168.56.11/' /etc/cobbler/settings #改为本机的IP地址
    或通过vim 打开/etc/cobbler/settings进行修改
    4.2 : For PXE to be functional, the 'next_server' field in /etc/cobbler/settings must be set to something other than 127.0.0.1, and should match the IP of the boot server on the PXE network.
    解决办法:
    # sed -i 's/next_server: 127.0.0.1/next_server: 192.168.56.11/' /etc/cobbler/settings #改为本机的IP地址
    或通过vim 更改为本机IP地址
    4.3 : change 'disable' to 'no' in /etc/xinetd.d/tftp
    解决办法:
    # vim /etc/xinetd.d/tftp
    将disable = yes 改为disable = no
    # systemctl  restart xinetd
    4.4 : some network boot-loaders are missing from /var/lib/cobbler/loaders, you may run 'cobbler get-loaders' to download them, or, if you only want to handle x86/x86_64 netbooting, you may ensure that you have installed a *recent* version of the syslinux package installed and can ignore this message entirely.  Files in this directory, should you want to support all architectures, should include pxelinux.0, menu.c32, elilo.efi, and yaboot. The 'cobbler get-loaders' command is the easiest way to resolve these requirements.
    解决办法:
    # cobbler get-loaders #会下载相关的启动文件 
    4.5 : enable and start rsyncd.service with systemctl
    解决办法:
    # systemctl  enable rsyncd && systemctl  start rsyncd
    
    4.6 : debmirror package is not installed, it will be required to manage debian deployments and repositories  #安装debmirror 包
    # yum install debmirror
    vim /etc/debmirror.conf #将23和25行注释掉
    28 #@dists="sid";
    30 #@arches="i386";
    
    4.7 : The default password used by the sample templates for newly installed machines (default_password_crypted in /etc/cobbler/settings) is still set to 'cobbler' and should be changed, try: "openssl passwd -1 -salt 'random-phrase-here' 'your-password-here'" to generate new one
    解决办法:
    # openssl passwd -1 -salt "随机短语"  "密码"
    # openssl passwd -1 -salt 'suijishu' '123456'
    $1$suijishu$pCi13H6xgVMoQBkitx4rg/  #将生成的密码添加到到/etc/cobbler/settings
    # vim /etc/cobbler/settings  #替换默认密码
    101 default_password_crypted: "$1$suijishu$pCi13H6xgVMoQBkitx4rg/"
    [root@linux-node1 ~]# systemctl  restart cobblerd  #更改配置文件要重启服务
    
    4.8 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them   #fence设备,电源管理
    # yum install cman  fence-agents 
    4.9:重启cobblerd再次检查: [root@linux-cobbler ~]# systemctl  restart cobblerd
    [root@linux-cobbler ~]# cobbler check
    No configuration problems found.  All systems go. #确认检查没有遇到任何问题,如果有问题按照提示处理
    a2enmod rewrite
    a2enmod proxy
    a2enmod python
    a2enmod proxy_http
    a2enmod proxy_connect
    a2enmod wsgi
    a2enmod version
    cobbler check错误 xmlrpc.client.ProtocolError:

     

     

    cobbler相关组件

    #httpd 和cobbler-web 提供cobbler的web管理界面

    #dhcp 提供IP地址分配服务

    #xinetd 是一个超级守护进程,管理无法开机启动的服务如tftp开机启动

    其中cobbelr是最核心的安装包,期安装后的主要目录如下:

    /etc/cobbler                   # cobbler的主配置文件目录,保存了与cobbler相关的配置文件
    /etc/cobbler/settings         # cobble服务的默认主配置文件
    /etc/cobbler/dhcp.template    # DHCP服务的配置模板,打开DHCP管理后可以根据此文件生成dhcpd.conf文件
    /etc/cobbler/tftpd.template  # tftp服务的配置模板
    /etc/cobbler/rsync.template # rsync服务的配置模板
    /etc/cobbler/iso              # iso模板配置文件目录
    /etc/cobbler/pxe              # pxe模板文件目录
    /etc/cobbler/power            # 电源的配置文件目录
    /etc/cobbler/users.conf       # Web服务授权配置文件
    /etc/cobbler/users.digest     # web访问的用户名密码配置文件
    /etc/cobbler/dnsmasq.template # DNS服务的配置模板
    /etc/cobbler/modules.conf     # Cobbler模块配置文件
    /var/lib/cobbler               # Cobbler数据目录
    /var/lib/cobbler/config       # 配置文件
    /var/lib/cobbler/kickstarts  # 默认存放kickstart文件
    /var/lib/cobbler/loaders      # 存放的各种引导程序
    /var/www/cobbler               # 系统安装镜像目录
    /var/www/cobbler/ks_mirror    # 导入的系统镜像列表
    /var/www/cobbler/images       # 导入的系统镜像启动文件
    /var/www/cobbler/repo_mirror  # yum源存储目录
    /var/log/cobbler               # 日志目录
    /var/log/cobbler/install.log  # 客户端系统安装日志
    /var/log/cobbler/cobbler.log  # cobbler日志 
  • 相关阅读:
    web服务webserver
    java:Comparator比较器
    6递归
    5.二分查找 = 折半查找
    4.线性查找 = 顺序查找
    3选择排序
    2.冒泡排序----还是不懂,先记录下来
    1交换算法
    调试篇
    sql表合并,统计计算,生成总计
  • 原文地址:https://www.cnblogs.com/-xuan/p/11493585.html
Copyright © 2011-2022 走看看