• cobbler装机系统部署


    1.cobbler安装

    [root@linux-node1 ~]# cp /etc/cobbler/settings{,.ori} # 备份
    # server,Cobbler服务器的IP。
    sed -i 's/server: 127.0.0.1/server: 172.16.1.121/' /etc/cobbler/settings
    # next_server,如果用Cobbler管理DHCP,修改本项,作用不解释,看kickstart。
    sed -i 's/next_server: 127.0.0.1/next_server: 172.16.1.121/' /etc/cobbler/settings
    # 用Cobbler管理DHCP
    sed -i 's/manage_dhcp: 0/manage_dhcp: 1/' /etc/cobbler/settings
    # 防止循环装系统,适用于服务器第一启动项是PXE启动。
    sed -i 's/pxe_just_once: 0/pxe_just_once: 1/' /etc/cobbler/settings
    # 设置新装系统的默认root密码123456。下面的命令来源于提示6。random-phrase-here为干扰码,可以自行设定。
    [root@linux-node1 ~]# openssl passwd -1 -salt 'oldboy' '123456'
    $1$oldboy$Npg9Pt9k98Mlg0ZeqHAuN1
    [root@linux-node1 ~]# vim /etc/cobbler/settings 
    default_password_crypted: "$1$oldboy$Npg9Pt9k98Mlg0ZeqHAuN1" 
    # 第3个问题
    [root@linux-node1 ~]# cobbler get-loaders # 会自动从官网下载
    [root@linux-node1 ~]# cd /var/lib/cobbler/loaders/ # 下载的内容
    [root@linux-node1 loaders]# ls
    COPYING.elilo COPYING.yaboot grub-x86_64.efi menu.c32 README
    COPYING.syslinux elilo-ia64.efi grub-x86.efi pxelinux.0 yaboot
    # 第4个问题
    [root@linux-node1 ~]# vim /etc/xinetd.d/rsync
    disable = no
    [root@linux-node1 ~]# /etc/init.d/xinetd restart
    停止 xinetd: [确定]
    正在启动 xinetd: [确定]
    [root@linux-node1 ~]# /etc/init.d/cobblerd restart
    Stopping cobbler daemon: [确定]
    Starting cobbler daemon: [确定]
    [root@linux-node1 ~]# cobbler check
    The following are potential configuration items that you may want to fix:
    1 : debmirror package is not installed, it will be required to manage debian deployments and repositories # 和debian系统相关,不需要
    2 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them # fence设备相关,不需要
    Restart cobblerd and then run 'cobbler sync' to apply changes

    cobbler ks文件

    install
    url --url=$tree
    cdrom
    graphical
    firstboot --enable
    ignoredisk --only-use=sda
    lang zh_US.UTF-8
    keyboard us
    zerombr
    bootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb quiet"
    #Network information
    $SNIPPET('network_config')
    timezone --utc Asia/Shanghai
    authconfig --enableshadow --passalgo=sha512
    rootpw --iscrypted $default_password_crypted
    user --groups=wheel --name=ljs --gecos="ljs"
    ljspw --iscrypted $default_password_crypted
    xconfig --startxonboot
    clearpart --all --initlabel
    part /boot --fstype xfs --size 1024
    part swap --size 1024
    part / --fstype xfs --size 1 --grow
    firstboot --disable
    services --disabled="chronyd"
    selinux --disabled
    firewall --disabled
    logging --level=info
    reboot
    
    %pre
    $SNIPPET('log_ks_pre')
    $SNIPPET('kickstart_start')
    $SNIPPET('pre_install_network_config')
    # Enable installation monitoring
    $SNIPPET('pre_anamon')
    %end
    
    %packages
    @^gnome-desktop-environment
    @base
    @compat-libraries
    @core
    @desktop-debugging
    @development
    @dial-up
    @directory-client
    @fonts
    @gnome-desktop
    @guest-agents
    @guest-desktop-agents
    @input-methods
    @internet-browser
    @java-platform
    @multimedia
    @network-file-system-client
    @networkmanager-submodules
    @print-client
    @x11
    
    tree
    nmap
    sysstat
    lrzsz
    dos2unix
    telnet
    iptraf
    ncurses-devel
    openssl-devel
    zlib-devel
    OpenIPMI-tools
    screen
    %end
    
    %post
    systemctl disable postfix.service
    %end
    View Code

    2.centos7 安装cobbler

    yum -y install epel-release 
    cd /etc/yum.repos.d/ ; wget http://mirrors.163.com/.help/CentOS7-Base-163.repo ; cd
    yum -y install cobbler cobbler-web dhcp httpd xinetd fence-agents pykickstart
    cat /etc/cobbler/settings
    
    sed -i 's/server: 127.0.0.1/server: 172.16.1.121/' /etc/cobbler/settings
    sed -i 's/next_server: 127.0.0.1/next_server: 172.16.1.121/' /etc/cobbler/settings
    sed -i 's/manage_dhcp: 0/manage_dhcp: 1/' /etc/cobbler/settings
    sed -i 's/manage_rsync: 0/manage_rsync: 1/' /etc/cobbler/settings
    openssl passwd -1 -salt "任意字符" “密码”
    openssl passwd -1 -salt "cobbler" "centos"
    $1$cobbler$DWL2fHTHaRTa2hj5VEuZk.
    vim /etc/cobbler/settings
    default_password_crypted: "$1$cobbler$DWL2fHTHaRTa2hj5VEuZk." 
    sed -i 's#yes#no#' /etc/xinetd.d/tftp
    cobbler get-loader
    sed -i.ori 's#192.168.1#172.16.1#g;22d;23d' /etc/cobbler/dhcp.template #只能执行一次
    systemctl start dhcpd.service
    systemctl start xinetd.service
    cobbler sync
    systemctl restart httpd.service
    systemctl restart cobblerd.service
  • 相关阅读:
    闭区间上的连续函数必定是一致连续的
    利用开区间覆盖的约简给出$\bf{Lindelöf}$覆盖定理的一个新证明
    $\mathbf{R}^n$中的紧集是闭有界集
    $\mathbf{R}^n$中的紧集是闭有界集
    陶哲轩实分析 习题10.2.7 导函数有界的函数一致连续
    $\mathbf{R}$上的离散点集是至多可数集
    利用开区间覆盖的约简给出$\bf{Lindelöf}$覆盖定理的一个新证明
    闭区间上的连续函数必定是一致连续的
    $\mathbf{R}$上的离散点集是至多可数集
    利用开区间覆盖的约简给出有限覆盖定理的一个新证明
  • 原文地址:https://www.cnblogs.com/lijiansheng/p/10855692.html
Copyright © 2020-2023  润新知