说明:
<代码> #鞋匠部署不在详细说明
# Ubuntu版本:18.04.3及19.10
#测试机器:kvm虚拟机
#测试ip: 192.168.3.63
#使用vnc进行连接操作
#鞋匠服务器IP 192.168.2.56请修改成自己的鞋匠服务器地址代码>
鞋匠发行版添加Ubuntu最新系统支持
<代码> cp/var/lib/cobbler/distro_signatures。json/var/lib/cobbler/distro_signatures.json.bak
vi/var/lib/cobbler/distro_signatures.json
“仿生”:{
“签名”:“距离”,“.disk”,
:“version_file发布| mini-info”,
:“version_file_regex代号:仿生| Ubuntu 18.04”,
:“kernel_arch linux-headers - (. *) \ \ . deb”,
“kernel_arch_regex”:空,
“supported_arches”:“i386”、“amd64”,
“supported_repo_breeds”:“恰当的”,
“kernel_file”:“linux (. *)”,
:“initrd_file initrd (. *) \ \ . gz”,
“isolinux_ok”:假的,
:“default_kickstart/var/lib/补鞋匠/启动/sample.seed”,
“kernel_options”:“”,
“kernel_options_post”:“”,
“boot_files”: []
},
"宇宙":{
“签名”:“距离”,“.disk”,
:“version_file发布| mini-info”,
:“version_file_regex代号:宇宙| Ubuntu 18.10”,
:“kernel_arch linux-headers - (. *) \ \ . deb”,
“kernel_arch_regex”:空,
“supported_arches”:“i386”、“amd64”,
“supported_repo_breeds”:“恰当的”,
“kernel_file”:“linux (. *)”,
:“initrd_file initrd (. *) \ \ . gz”,
“isolinux_ok”:假的,
:“default_kickstart/var/lib/补鞋匠/启动/sample.seed”,
“kernel_options”:“”,
“kernel_options_post”:“”,
“boot_files”: []
},
“迪斯科”:{
“签名”:“距离”,“.disk”,
:“version_file发布| mini-info”,
“version_file_regex”:“代号:迪斯科| Ubuntu 19.04”,
:“kernel_arch linux-headers - (. *) \ \ . deb”,
“kernel_arch_regex”:空,
“supported_arches”:“i386”、“amd64”,
“supported_repo_breeds”:“恰当的”,
“kernel_file”:“linux (. *)”,
:“initrd_file initrd (. *) \ \ . gz”,
“isolinux_ok”:假的,
:“default_kickstart/var/lib/补鞋匠/启动/sample.seed”,
“kernel_options”:“”,
“kernel_options_post”:“”,
“boot_files”: []
},
"集团":{
“签名”:“距离”,“.disk”,
:“version_file发布| mini-info”,
:“version_file_regex代号:集团| Ubuntu 19.10”,
:“kernel_arch linux-headers - (. *) \ \ . deb”,
“kernel_arch_regex”:空,
“supported_arches”:“i386”、“amd64”,
“supported_repo_breeds”:“恰当的”,
“kernel_file”:“linux (. *)”,
:“initrd_file initrd (. *) \ \ . gz”,
“isolinux_ok”:假的,
:“default_kickstart/var/lib/补鞋匠/启动/sample.seed”,
“kernel_options”:“”,
“kernel_options_post”:“”,
“boot_files”: []
}
}#这个括号一定要曾在旧的可能在16号版本左右记得一定要放到ubuntu标签里面
#保存
#重启cobblerd
服务cobblerd重启代码>
下载Ubuntu 18.04.3及19.10
<代码> #下载目录/tmp
cd/tmp
wget https://mirror.tuna.tsinghua.edu.cn/ubuntu-cdimage/releases/18.04.3/release/ubuntu-18.04.3-server-amd64.iso
wget https://mirror.tuna.tsinghua.edu.cn/ubuntu amd64.iso——cdimage/releases/19.10/release/ubuntu - 19.10服务器
#说明住版本跟桌面版本导入重启鞋匠会出错代码>
挂载下载完成iso
<代码> mkdir - p/mnt/{ubuntu18, ubuntu19}
mount - t iso9660 - r - o ro、循环/tmp/ubuntu-18.04.3-server-amd64。iso/mnt/ubuntu18
mount - t iso9660 - r - o ro、循环/tmp/ubuntu - 19.10 -服务器- amd64。iso/mnt/ubuntu19 代码>
创建种子自动安装脚本及初始化系统设置脚本壳文件
<代码> #创建ubuntu18043.seed
cd/var/lib/cobbler/kickstarts
vi ubuntu18043.seed
#主要基于/GRUB_CMDLINE_LINUX=癱group_enable=内存swapaccount=1”/?etc/default/grub
# update-grub
恰当的更新是
systemctl停止ufw.service
systemctl禁用ufw.service
rm射频/root/ubuntu18.sh
#创建ubuntu19.sh
vi ubuntu19.sh
# !/bin/bash
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #设置配置# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# ulimit设置
回声\ \ !/bin/bash祝辞祝辞/etc/rc.local
echo " ulimit -SHn 1024000”在祝辞/etc/rc.local
猫在祝辞/etc/security/limits.参看& lt; & lt;EOF
*软nofile 1024000
*硬nofile 1024000
*软nproc 1024000
*硬nproc 1024000
EOF
#设置最大服务流程
猫在祝辞/etc/systemd/system.参看& lt; & lt;EOF
DefaultLimitNOFILE=1024000
DefaultLimitNPROC=1024000
EOF
#设置最大用户进程
#设置ssh
sed - i ' s/# PermitRootLogin prohibit-password/PermitRootLogin是的“/etc/ssh/sshd_config
sed - i ' s/#常是的/常没有”/etc/ssh/sshd_config
# sed - i ' s/# # PermitRootLogin PermitRootLogin yes/no/'/etc/ssh/sshd_config
systemctl重新启动sshd
# sysctl设置
真正的在/etc/sysctl.conf
猫在祝辞/etc/sysctl.参看& lt; & lt;EOF
net.ipv4。ip_forward=0
net.ipv4.conf.default.rp_filter=1
net.ipv4.conf.default.accept_source_route=0
内核。sysrq=0
内核。core_uses_pid=1
net.ipv4。tcp_syncookies=1
fs。file-max=1024000
fs。nr_open=1024000
vm。swappiness=0
vm。max_map_count=2048000
vm。overcommit_memory=1
内核。sem=5010 641280 5010 128
内核。pid_max=4194303
内核。msgmnb=65536
内核。msgmax=65536
内核。shmmax=68719476736
内核。shmall=4294967296
net.ipv4。tcp_max_tw_buckets=6000
net.ipv4。tcp_sack=1
net.ipv4。tcp_window_scaling=1
net.ipv4。tcp_mem=786432 1697152 1945728
net.ipv4。tcp_rmem=4096 87380 16777216
net.ipv4。tcp_wmem=4096 65536 16777216
net.core。wmem_default=8388608
net.core。rmem_default=8388608
net.core。rmem_max=16777216
net.core。wmem_max=16777216
net.core.netdev_max_backlog=2048000
net.core。somaxconn=65535
net.ipv4。tcp_max_orphans=3276800
net.ipv4。null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null