部署Centos7
- 挂载和导入镜像
mount /dev/cdrom /media
ll /media/
cobbler import --path=/media --name=centos7.4 --arch=x86_64
cobbler distro list //查看镜像列表
说明:cobber把镜像导入到该目录下:/var/www/cobbler/ks_mirror/
- 配置centos7的ks文件
cd /var/lib/cobbler/kickstarts
vim centos7.ks
install
text
keyboard us
lang en_US
timezone Asia/ShangHai
rootpw --iscrypted $default_password_crypted
auth --useshadow --enablemd5
firewall --disabled
selinux --disabled
url --url=$tree
zerombr
bootloader --location=mbr
clearpart --all --initlabel
part /boot --fstype=xfs --size=200
part swap --size=1024
part / --fstype=xfs --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')
@^minimal
@core
wget
lftp
vim-enhanced
bash-completion
%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/c\UseDNS no" /etc/ssh/sshd_config
sed -ri "/^GSSAPIAuthentication/c\GSSAPIAuthentication no" /etc/ssh/sshd_config
systemctl enable httpd
%end
- 镜像和ks文件关联
cobbler profile list //查看导入的镜像名称,profile包含ks文件和镜像
cobbler profile edit --name=centos7.4-x86_64 --kickstart=/var/lib/cobbler/kickstarts/centos7.ks
cobbler profile report
- 修改C7的网卡为eth0,可以省略
cobbler profile edit --name=centos7.4-x86_64 --kopts='net.ifnames=0 biosdevname=0'
- 检测ks文件是否有语法错误
cobbler validateks
- 额外知识:添加一个profile
cp centos7.ks centos7-webserver.ks
cobbler profile add --name=centos7.4-web-server-x86_64 --distro="centos7.4-x86_64" --kickstart=/var/lib/cobbler/kickstarts/centos7.ks --kopts='net.ifnames=0 biosdevname=0'
cobbler profile report
- 报错:虚拟机上安装报错:no space left on device,
解决方案虚拟内存不足,调整内存到2G
部署Centos7的更多相关文章
- 完整部署CentOS7.2+OpenStack+kvm 云平台环境(3)--为虚拟机指定固定ip
之前在测试环境(centos7.2)上部署了openstack云平台(完整部署CentOS7.2+OpenStack+kvm 云平台环境(1)--基础环境搭建),openstack在neutron组网 ...
- asp.net core 2.1 部署 centos7
asp.net core 2.1 部署 centos7 Kestrel 非常适合从 ASP.NET Core 提供动态内容. 但是,Web 服务功能不像服务器(如 IIS.Apache 或 Nginx ...
- 完整部署CentOS7.2+OpenStack+kvm 云平台环境(2)--云硬盘等后续配置
继上一篇博客介绍了完整部署CentOS7.2+OpenStack+kvm 云平台环境(1)--基础环境搭建,本篇继续讲述后续部分的内容 1 虚拟机相关1.1 虚拟机位置介绍 openstack上创建的 ...
- 在docker中部署centos7镜像
本篇文章参考自: https://www.cnblogs.com/linjj/p/5606911.html https://blog.csdn.net/u012767761/article/detai ...
- .net core 2.2 部署CentOS7(5)部署.net core mvc
目录: .net core 2.2 部署CentOS7(1)安装虚拟机 .net core 2.2 部署CentOS7(2)给虚拟机安装CentOS7 .net core 2.2 部署CentOS7( ...
- .net core 2.2 部署CentOS7(4)CentOS7下载并安装.NET SDK(软件开发工具包)
目录: .net core 2.2 部署CentOS7(1)安装虚拟机 .net core 2.2 部署CentOS7(2)给虚拟机安装CentOS7 .net core 2.2 部署CentOS7( ...
- .net core 2.2 部署CentOS7(3)安装Xshell操控CentOS7
目录: .net core 2.2 部署CentOS7(1)安装虚拟机 .net core 2.2 部署CentOS7(2)给虚拟机安装CentOS7 .net core 2.2 部署CentOS7( ...
- .net core 2.2 部署CentOS7(2)给虚拟机安装CentOS7
目录: .net core 2.2 部署CentOS7(1)安装虚拟机 .net core 2.2 部署CentOS7(2)给虚拟机安装CentOS7 .net core 2.2 部署CentOS7( ...
- .net core 2.2 部署CentOS7(1)安装虚拟机
目录: .net core 2.2 部署CentOS7(1)安装虚拟机 .net core 2.2 部署CentOS7(2)给虚拟机安装CentOS7 .net core 2.2 部署CentOS7( ...
- asp.net core2.1 部署centos7/linux系统 -- 安装部署(一)
原文:asp.net core2.1 部署centos7/linux系统 -- 安装部署(一) 1.安装dotnet sdk(添加产品秘钥与yum源) 添加yum源:sudo rpm -Uvh htt ...
随机推荐
- opencv学习笔记二
1,读取照片(imread()) 2,处理照片(cvtcolor()) 3,命名窗口(namewindow()) 4,显示照片(imshow()) 5,保存照片(imwrite()) #include ...
- 使用 Rational AppScan 保证 Web 应用的安全性,第 2 部分: 使用 Rational AppScan 应对 Web 应用攻击
1 当前 Web 安全现状 互联网的发展历史也可以说是攻击与防护不断交织发展的过程.目前,全球因特网用户已达 13.5 亿,用户利用网络进行购物.银行转账支付和各种软件下载,企业用户更是依赖于互联网构 ...
- MongoDB入门(7)- SpringDataMongoDB
入门 本文介绍如何应用SpringDataMongoDB操作实体和数据库,本文只介绍最基本的例子,复杂的例子在后面的文章中介绍. SpringDataMongoDB简介 SpringDataMongo ...
- ASP.NET和ASP的区别是什么
分析: ASP与ASP.NET是Microsoft公司在Web应用程序开发上的两项重要技术. ASP与ASP.NET区别如下: (1)开发语言不同:ASP的开发语言仅局限于使用non-type脚本语言 ...
- Linux中 设置apache,mysql 开机启动
linux开启启动的程序一般放在/etc/rc.d/init.d/里面,/etc/init.d/是其软连接 mysql设为linux服务 cp /usr/local/mysql5/share/mysq ...
- Java应用调试利器——BTrace教程
http://www.jianshu.com/p/26f19095d396 背景 生产环境中可能出现各种问题,但是这些问题又不是程序error导致的,可能是逻辑性错误,这时候需要获取程序运行时的数据信 ...
- Spring基础使用(一)--------IOC、Bean的XML方式装配
基础 1.xml文件基础格式: <?xml version="1.0" encoding="UTF-8" ?> <beans xmlns=&q ...
- JQGrid 导出Excel 获取筛选条件
需求描述:页面加载后,进行相关数据搜索,要求点击导出按钮后 下载Excel文件. 思路:希望在点击[导出Excel]按钮时,获取到表格搜索时的filters内容. 在百度.api.jqgrid.js ...
- 大话Spring Cloud
研究了一段时间Spring Boot了准备向Spring Cloud进发,公司架构和项目也全面拥抱了Spring Cloud.在使用了一段时间后发现Spring Cloud从技术架构上降低了对大型系统 ...
- c语言中的输入
先打个白条有时间在写 c语言中输入一行回车之后,以空格为单位进行的分割