cobbler安装centos7

cobbler安装centos7

1.cobbler安装centos7

关闭防火墙和selinux,然后重启
[root@localhost ~]# systemctl disable --now firewalld.service 
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@localhost ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config 
[root@localhost ~]# reboot

//下载epel-release源和相关软件
[root@localhost ~]# yum -y install epel-release
[root@localhost ~]# yum -y install httpd dhcp-* tftp xinetd pykickstart
//开启cobbler仓库,下载cobbler
[root@localhost ~]# yum -y install module enable cobbler
[root@localhost ~]# yum -y install cobbler cobbler-web

//启动httpd、cobbler服务并设置开机自启
[root@localhost ~]# systemctl enable --now httpd.service 
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
[root@localhost ~]# systemctl enable --now cobblerd.service 
Created symlink from /etc/systemd/system/multi-user.target.wants/cobblerd.service to /usr/lib/systemd/system/cobblerd.service.
[root@localhost ~]# ss -anltu
Netid  State      Recv-Q Send-Q    Local Address:Port                   Peer Address:Port              
udp    UNCONN     0      0                     *:68                                *:*                  
tcp    LISTEN     0      128                   *:22                                *:*                  
tcp    LISTEN     0      100           127.0.0.1:25                                *:*                  
tcp    LISTEN     0      5             127.0.0.1:25151                             *:*                  
tcp    LISTEN     0      128                [::]:80                             [::]:*                  
tcp    LISTEN     0      128                [::]:22                             [::]:*                  
tcp    LISTEN     0      100               [::1]:25                             [::]:*                  
tcp    LISTEN     0      128                [::]:443                            [::]:*                 

//更改配置文件IP为本机IP
[root@localhost ~]# sed -i 's/^server:.*/server: 192.168.237.131/g' /etc/cobbler/settings 
[root@localhost ~]# sed -i 's/^next_server:.*/next_server: 192.168.237.131/g' /etc/cobbler/settings 

//生成加密密码替换到配置文件中
[root@localhost ~]# openssl passwd -1
Password: 
Verifying - Password: 
$1$sR6svS4Z$KyyERbkBKwqXaU82PPsYJ.
[root@localhost ~]# sed -Ei 's/(default_password_crypted:).*/\1 "$1$sR6svS4Z$KyyERbkBKwqXaU82PPsYJ."/g' /etc/cobbler/settings 
//同步设置
[root@localhost ~]# cobbler sync

//启动rsync服务并开机自启
[root@localhost ~]# systemctl enable --now rsyncd
Created symlink from /etc/systemd/system/multi-user.target.wants/rsyncd.service to /usr/lib/systemd/system/rsyncd.service.

//重启cobbler服务,配置tftp
[root@localhost ~]# systemctl restart cobblerd.service
[root@localhost ~]# tail -14 /etc/xinetd.d/tftp
service tftp
{
        disable                 = no
        socket_type             = dgram
        protocol                = udp
        wait                    = yes
        user                    = root
        server                  = /usr/sbin/in.tftpd
        server_args             = -B 1380 -v -s /var/lib/tftpboot
        per_source              = 11
        cps                     = 100 2
        flags                   = IPv4
}

//执行检查环境命令
[root@localhost ~]# cobbler check
The following are potential configuration items that you may want to fix:

1 : Some network boot-loaders are miss
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值