zoukankan      html  css  js  c++  java
  • cobbler服务器

    数据库保存了那些信息
     
    1.用户评论
    2.保存了网页连接信息
    3.保存了网页文章
    4.保存了网页文章的分类信息
    5.用户注册信息
    6. 其他的一些组件信息
     
    那些信息没被保存在数据库
     
    1. 图片
    2. 视频
     
    部署cobbler服务器
     
    1.准备环境
    使用nat或者仅主机模式,不要使用桥接模式,方式获取的IP不是自己的
     2. 配置yum源 挂载光盘
    [root@zxw ~]# mount /dev/cdrom /mnt
    [epel]
    name=epel
    enabled=1
    gpgcheck=0
    baseurl=https://mirrors.aliyun.com/epel/7/x86_64/
    [centos]
    name=centos base
    enabled=1
    gpgcheck=0
    baseurl=http://mirrors.163.com/centos/7/os/x86_64/
    Yum clean all
    Yum repolist
     3,下载相关的软件
    [root@zxw ~]# yum install httpd cobbler tftp-server xinetd syslinux dhcp pykickstart -y
     
    4.启动tftp服务
    [root@zxw ~]# vim /etc/xinetd.d/tftp
    disable = no
    [root@zxw ~]# systemctl restart xinetd
    5. 配置dhcp服务
    [root@zxw 】 vim /etc/dhcp/dhcpd.conf
    末行:r usr/share/doc/dhcp*/dhcpd.conf.example
    1 subnet 192.168.126.0 netmask 255.255.255.0 {
    2 range 192.168.126.10 192.168.126.30;
    3 default-lease-time 600;
    4 max-lease-time 7200;
    5 filename "pxelinux.0";
    6 }
    网卡必须在网段之内
    ~
    [root@zxw ~]# systemctl restart dhcpd
     
     6. 启动httpd
    [root@zxw ~]# systemctl restart httpd
     7. 启动cobbler
    [root@zxw ~]# systemctl restart cobblerd
     8.cobbler检测
    [root@ken ~]# cobbler check
     
    9. 修改提示信息
     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.
    server: 192.168.126.10
    把server指定的本地IP改为提供cobbler服务的IP地址
    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.
    next_server: 192.168.126.10
    把next_server指定的本地IP改为提供cobbler服务的IP地址
     4 : enable and start rsyncd.service with systemctl
    [root@zxw ~]# systemctl restart rsyncd
    [root@zxw ~]# systemctl enable rsyncd
    Created symlink from /etc/systemd/system/multi-user.target.wants/rsyncd.service to /usr/lib/systemd/system/rsyncd.service

    6 : 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  
    [root@zxw ~]# openssl passwd -1 -salt '123' '123'
    $1$123$nE5gIYTYiF1PIXVOFjQaW/
    default_password_crypted: "$1$123$nE5gIYTYiF1PIXVOFjQaW/
    "


    10. 重启cobbler并在此检测
     [root@zxw ~]# systemctl restart cobblerd
    [root@zxw ~]# cobbler check

    1 : 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.
    2 : debmirror package is not installed, it will be required to manage debian deployments and repositories
    3 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them

    11.同步
     [root@zxw ~]# cobbler sync
    *** TASK COMPLETE ***


    12. 导入镜像
    [root@zxw ~]# cobbler import --path=/mnt --name="centos7"
    *** TASK COMPLETE ***
     
    13.查看生成的distro
     [root@zxw ~]# cobbler distro list
    centos7-x86_64
    14.查看生成的profile
    [root@zxw ~]# cobbler profile list
    centos7-x86_64
    15.准备kickstart文件
    [root@zxw ~]#ls
    anaconda-ks.cfg
    [root@zxw ~]# cp anaconda-ks.cfg /var/lib/cobbler/kickstarts/ks.cfg

     16.编辑kickstart文件
    [root@zxw ~]# vim /var/lib/cobbler/kickstarts/ks.cfg
    # Use CDROM installation media
    Cdrom 修改
    # Use graphical install
    url --url=http://192.168.126.10/cobbler/ks_mirror/centos7/

    路径查看
    ls /var/www/cobbler/ks_mirror/centos7/
    17.制作自己的profile
    [root@zxw yum.repos.d]# cobbler profile add --distro=centos7-x86_64 --kickstart=/var/lib/cobbler/kickstarts/ks.cfg --name="cent7_zxw" 

    18. 删除默认的profile
    cobbler profile remove --name=centos7-x86_64

    [root@zxw yum.repos.d]# cobbler profile list



    ofile list
    cent7_zxw
     添加网卡配置
    19.开启客户端进行验证

     
    注意:
    1.客户端模式需要与服务器模式一致
    2. 内存最少3个G
     
     
    cobbler实现单台服务器提供安装不同操作系统
    [root@zxw ~]# mount /dev/cdrom /mnt
    [epel]
    name=epel
    enabled=1
    gpgcheck=0
    baseurl=https://mirrors.aliyun.com/epel/7/x86_64/
    [centos]
    name=centos base
    enabled=1
    gpgcheck=0
    baseurl=http://mirrors.163.com/centos/7/os/x86_64/
    Yum clean all
    Yum repolist
     3,下载相关的软件
    [root@zxw ~]# yum install httpd cobbler tftp-server xinetd syslinux dhcp pykickstart -y
     
    4.启动tftp服务
    [root@zxw ~]# vim /etc/xinetd.d/tftp
    disable = no
    [root@zxw ~]# systemctl restart sshd
    5. 配置dhcp服务
    [root@zxw /usr/share/doc/dhcp*/dhcpd.conf.example
    末行:r usr/share/doc/dhcp*/dhcpd.conf.example
    1 subnet 192.168.126.0 netmask 255.255.255.0 {
    2 range 192.168.126.10 192.168.126.30;
    3 default-lease-time 600;
    4 max-lease-time 7200;
    5 filename "pxelinux.0";
    6 }
    ~
    [root@zxw ~]# systemctl restart dhcpd
     

    第二步:开启所有相关的服务
    [root@ken ~]# systemctl restart httpd cobblerd xinetd dhcpd
     
    第三步:在linux系统中挂载光盘
    [root@ken ~]# mount /dev/cdrom /mnt
    mount: /dev/sr0 is write-protected, mounting read-only
     
    第四步:导入一个新的镜像
    [root@ken ~]# cobbler import –path=/mnt –name=”centos7.3″
    task started: 2019-05-24_192206_import
    task started (id=Media import, time=Fri May 24 19:22:06 2019)
    Found a candidate signature: breed=redhat, version=rhel6
    Found a candidate signature: breed=redhat, version=rhel7
    Found a matching signature: breed=redhat, version=rhel7
    Adding distros from path /var/www/cobbler/ks_mirror/centos7.3:
    creating new distro: centos7.3-x86_64
    trying symlink: /var/www/cobbler/ks_mirror/centos7.3 -> /var/www/cobbler/links/centos7.3-x86_64
    creating new profile: centos7.3-x86_64
    associating repos
    checking for rsync repo(s)
    checking for rhn repo(s)
    checking for yum repo(s)
    starting descent into /var/www/cobbler/ks_mirror/centos7.3 for centos7.3-x86_64
    processing repo at : /var/www/cobbler/ks_mirror/centos7.3
    need to process repo/comps: /var/www/cobbler/ks_mirror/centos7.3
    looking for /var/www/cobbler/ks_mirror/centos7.3/repodata/*comps*.xml
    Keeping repodata as-is :/var/www/cobbler/ks_mirror/centos7.3/repodata
    *** TASK COMPLETE ***
     
    第四步:查看生成的distro
    [root@ken ~]# cobbler distro list
    centos7-x86_64
    centos7.3-x86_64
     
    第五步:制作profile
    [root@ken ~]# cobbler profile add –distro=centos7.3-x86_64 –kickstart=/var/lib/cobbler/kickstarts/ks.cfg –name=”centos7.3_ken”
     
    第六步: 删除默认的profile
    [root@ken ~]# cobbler profile list
    cent7_ken
    centos7.3-x86_64
    centos7.3_ken
    [root@ken ~]# cobbler profile remove –name=centos7.3-x86_64
    [root@ken ~]# cobbler profile list
    cent7_ken
    centos7.3_ken
     
    第七步:开启客户端进行验证

     

     

  • 相关阅读:
    mysql 练习
    linux 常用软件安装-目录
    Python 三大神器
    Mysql 数据库安装配置
    Mysql数据库入门
    maven的安装与基本使用
    分布式事务
    分布式锁
    springcloud学习笔记
    springboot入门使用
  • 原文地址:https://www.cnblogs.com/itzhao/p/11249425.html
Copyright © 2011-2022 走看看