标签:deb import 防火墙 hang nss tin 挂载 kickstart max
cat /etc/redhat-release setenforce 0
getenforce //得到的结果需要是:Permissive
sed -i "s#SELINUX=enforcing#SELINUX=disabled#g" /etc/selinux/config setenforce 0 reboot
关闭防火墙:
systemctl stop firewalld
开机不启用防火墙:
systemctl disable firewalld
yum -y install wget
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo yum -y install cobbler cobbler-web pykickstart httpd dhcp tftp xinetd
systemctl start httpd
systemctl start cobblerd
systemctl enable httpd
systemctl enable cobblerd
netstat -lntup //查看已经启动的端口
cobbler check
vim /etc/cobbler/settings
sed -i "s#server: 127.0.0.1#server: `ip addr|grep inet|grep brd|awk ‘{ print $2 }‘|awk -F/ ‘{ print $1 }‘`#g" /etc/cobbler/settings
vim /etc/xinetd.d/tftp
sed -i ‘14s/^.*$/ disable = no/‘ /etc/xinetd.d/tftp
cobbler get-loaders
systemctl start rsyncd.service
systemctl enable rsyncd.service
systemctl status rsyncd.service
systemctl restart xinetd
systemctl enable xinetd
openssl passwd -1 -salt ‘cobbler‘ ‘cobbler‘
sed -i ‘s#default_password_crypted: "$1$mF86/UHC$WvcIcX2t6crBz2onWxyac."#default_password_crypted: "$1$cobbler$M6SE55xZodWc9.vAKLJs6."#g‘ /etc/cobbler/settings
yum -y install fence-agents debmirror
systemctl restart cobblerd
sed -i ‘s/@dists=\"sid\";/#@dists=\"sid\";/g‘ /etc/debmirror.conf sed -i ‘s/@arches=\"i386\";/#@arches=\"i386\";/g‘ /etc/debmirror.conf
reboot
systemctl restart cobblerd
systemctl restart httpd
cobbler check
vim /etc/cobbler/settings
sed -i ‘s#manage_dhcp: 0#manage_dhcp: 1#g‘ /etc/cobbler/settings
vim /etc/cobbler/dhcp.template
subnet 192.168.2.0 netmask 255.255.255.0 { option routers 192.168.2.1; option domain-name-servers 8.8.8.8; option subnet-mask 255.255.255.0; range dynamic-bootp 192.168.2.100 192.168.2.254; default-lease-time 21600; max-lease-time 43200; next-server $next_server;
mount /dev/cdrom /mnt/
cobbler import --path=/mnt/ --name=CentOS-7-x86-64 --arch=x86_64
vim /var/lib/cobbler/kickstarts/centos7-x86-64.cfg
lang en_US keyboard us timezone Asia/Shanghai rootpw --iscrypted $default_password_crypted text install url --url=$tree bootloader --location=mbr zerombr clearpart --all --initlabel part /boot --fstype xfs --size 1024 --ondisk sda part swap --size 16384 --ondisk sda part / --fstype xfs --size 1 --grow --ondisk sda auth --useshadow --enablemd5 $SNIPPET(‘network_config‘) reboot firewall --disabled selinux --disabled skipx %pre $SNIPPET(‘log_ks_pre‘) $SNIPPET(‘kickstart_start‘) $SNIPPET(‘pre_install_network_config‘) $SNIPPET(‘pre_anamon‘) %end %packages @base @core sysstat iptraf ntp lrzsz ncurses-devel openssl-devel zlib-devel OpenIPMI-tools tree nmap screen %end %post systemctl disable postfix.service %end
cobbler profile edit --name=CentOS-7-64-x86_64 --kickstart=/var/lib/cobbler/kickstarts/centos7-x86-64.cfg
cobbler profile report
cobbler profile edit --name=CentOS-7-64-x86_64 --kickstart=/var/lib/cobbler/kickstarts/centos7-x86-64.cfg
umount /dev/cdrom
mount /dev/cdrom /mnt/
cobbler import --path=/mnt/ --name=CentOS-6-x86_64 --arch=x86_64
vim /var/lib/cobbler/kickstarts/centos6-x86_64.cfg
auth --useshadow --enablemd5 bootloader --location=mbr clearpart --all --initlabel part /boot --fstype ext4 --size 1024 --ondisk sda part swap --size 1 --grow --ondisk sda part / --fstype ext4 --size 1 --grow --ondisk sda text firewall --disable firstboot --disable keyboard us lang en_US url --url=$tree $yum_repo_stanza $SNIPPET(‘network_config‘) reboot rootpw --iscrypted $default_password_crypted selinux --disabled skipx timezone Asia/Shanghai install zerombr %packages @base @compat-libraries @debugging @development tree nmap sysstat lrzsz dos2unix telnet %pre $SNIPPET(‘log_ks_pre‘) $SNIPPET(‘kickstart_start‘) $SNIPPET(‘pre_install_network_config‘) $SNIPPET(‘pre_anamon‘) %post %end
cobbler profile list
CentOS-6-64-x86_64 CentOS-7-64-x86_64
所以下面的--name=后面应该写入CentOS-6-64-x86_64
cobbler profile edit --name=CentOS-6-64-x86_64 --kickstart=/var/lib/cobbler/kickstarts/centos6-x86_64.cfg
标签:deb import 防火墙 hang nss tin 挂载 kickstart max
原文地址:https://www.cnblogs.com/sdrbg/p/10561987.html