zoukankan      html  css  js  c++  java
  • 部署centos6

    • 挂载镜像和导入镜像
    mount /dev/cdrom /media
    ll /media/
    cobbler import --path=/media --name=centos6.5--arch=x86_64
    cobbler distro list 
    说明:cobber把镜像导入到该目录下:/var/www/cobbler/ks_mirror/
    
    • 配置centos6的ks文件
    cd /var/lib/cobbler/kickstarts
    vim centos6.ks
    

    centos6.ks文件内容如下

    install
    text
    keyboard us
    lang en_US
    timezone Asia/ShangHai
    rootpw --iscrypted $default_password_crypted
    auth --useshadow --enablemd5firewall --disabled
    selinux --disabled
    url --url=$tree
    zerombr
    bootloader --location=mbr
    clearpart --all --initlabel
    part /boot --fstype=ext4 --size=500
    part swap --size=1024
    part / --fstype=ext4 --grow --size=200
    $yum_repo_stanza
    $SNIPPET('network_config')
    skipx
    firstboot --disable
    reboot
    %pre
    $SNIPPET('log_ks_pre')
    $SNIPPET('kickstart_start')
    $SNIPPET('pre_install_network_config')
    # Enable installation monitoring
    $SNIPPET('pre_anamon')
    %end
    %packages
    $SNIPPET('func_install_if_enabled')
    @core
    @base
    wget
    lftp
    %end
    %post --nochroot
    $SNIPPET('log_ks_post_nochroot')
    %end
    %post
    $SNIPPET('log_ks_post')
    # Start yum configuration
    $yum_config_stanza
    # End yum configuration
    $SNIPPET('post_install_kernel_options')$SNIPPET('post_install_network_config')
    $SNIPPET('func_register_if_enabled')
    $SNIPPET('download_config_files')
    $SNIPPET('koan_environment')
    $SNIPPET('redhat_register')
    $SNIPPET('cobbler_register')
    # Enable post-install boot notification
    $SNIPPET('post_anamon')
    # Start final steps
    $SNIPPET('kickstart_done')
    # End final steps
    sed -ri "/^#UseDNS/cUseDNS no" /etc/ssh/sshd_config
    sed -ri "/^GSSAPIAuthentication/cGSSAPIAuthentication no" /etc/ssh/sshd_config
    %end
    
    • 镜像和ks文件关联
    cobbler profile list                    //查看导入的镜像名称,profile包含ks文件和镜像
    cobbler profile edit --name=centos6.5-x86_64 --kickstart=/var/lib/cobbler/kickstarts/centos6.ks 
    cobbler profile report
    
    • 检测ks文件语法
    cobbler validateks
    
  • 相关阅读:
    Android 自定义android控件EditText边框背景
    Android安全问题 静音拍照与被拍
    Android 自绘TextView解决提前换行问题,支持图文混排
    Android EditText属性
    Android invalidate()自动清屏,屏幕刷新
    Cocos2d-x 3.0final 终结者系列教程12-Vector&map&value
    思维方式--SMART原则
    从.net复制源代码中国农历阵列,必要做日历
    POJ 3071-Football(可能性dp)
    mongodb group包(最具体的、最受欢迎、最容易理解的解释)
  • 原文地址:https://www.cnblogs.com/lovelinux199075/p/9010619.html
Copyright © 2011-2022 走看看