五天学redhat系列之---安装篇(下)
框架: PXE+kickstart+DHCP+DNS(可选)+NFS(可选)+FTP
实验环境:
pxe server | 192.168.0.1(RHEL6.2) | client(裸机) |
dhcp server | 192.168.0.1 | dhcp client |
ftp server |
192.168.0.1 /var/ftp/pub/RHEL6.2 |
|
kickstart |
192.168.0.1 /var/ftp/pub/RHEL6.2/ks.cfg |
|
nfs server (可选) |
192.168.0.1 /var/ftp/pub <world> /var/ftp/pub/RHEL6.2 <world> |
服务器端:配置
DHCP:动态分配ip地址,方便管理局域网的主机。可以分配主机地址,dns,网关等信息。
安装:
dhcp-4.1.1-25.P1.el6.x86_64
dhcp-common-4.1.1-25.P1.el6.x86_64
[root@kikupotter ~]# yum -y install dhcp //没有安装的运行这条命令
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Setting up Install Process
Package 12:dhcp-4.1.1-25.P1.el6.x86_64 already installed and latest version
Nothing to do
配置:指定网段192.168.0.1 dns 192.168.0.1与 pxelinux.0 路径。
[root@kikupotter dhcp]# vim dhcpd.conf
ddns-update-style none;
subnet 192.168.0.0 netmask 255.255.255.0 {
class "virtual" {
match if substring (hardware, 1, 3) = 00:16:3e;
}
option subnet-mask 255.255.255.0;
option routers 192.168.0.254;
option domain-name "218.85.157.99";
option domain-name-servers 218.85.157.99;
default-lease-time 21600;
max-lease-time 43200;
range 192.168.0.3 192.168.0.15;
# Assign IPs 61-80 to Xen domUs
next-server 192.168.0.1;
filename "pxelinux.0";
}
或者运行以下命令:
ddns-update-style none;
subnet 192.168.0.0 netmask 255.255.255.0 {
class "virtual" {
match if substring (hardware, 1, 3) = 00:16:3e;
}
option subnet-mask 255.255.255.0;
option routers 192.168.0.254;
option domain-name "218.85.157.99";
option domain-name-servers 218.85.157.99;
default-lease-time 21600;
max-lease-time 43200;
range 192.168.0.3 192.168.0.15;
# Assign IPs 61-80 to Xen domUs
next-server 192.168.0.1;
filename "pxelinux.0";
}
EOF
重启或者启动服务,加入开机运行。
Shutting down dhcpd:
[ OK ]
Startingdhcpd: [ OK ]
[root@kikupotter ~]# chkconfig dhcpd on
[root@kikupotter ~]# chkconfig --list | grep dhcpd
dhcpd 0:关闭 1:关闭 2:启用 3:启用 4:启用 5:启用 6:关闭
dhcpd6 0:关闭 1:关闭 2:关闭 3:关闭 4:关闭 5:关闭 6:关闭
安装FTP:
vsftpd-2.2.2-6.el6_0.1.x86_64
[root@kikupotter ~]# yum -y install vsftpd //未安装则运行此条命令
配置FTP:
一般不需要配置。然后将光盘的内容拷贝的/var/ftp/pub下面。
我是将整个内容放在pub下的HREL6.2的目录内,这个目录是自己定义了。
/var/ftp/pub/RHEL6.2
[root@kikupotter RHEL6.2]# ls //光盘的内容
EFI RELEASE-NOTES-as-IN.html RELEASE-NOTES-pt-BR.html
EULA RELEASE-NOTES-bn-IN.html RELEASE-NOTES-ru-RU.html
EXAMPLE-CA-CERT RELEASE-NOTES-de-DE.html RELEASE-NOTES-si-LK.html
example-ca.crt RELEASE-NOTES-en-US.html RELEASE-NOTES-ta-IN.html
GPL RELEASE-NOTES-es-ES.html RELEASE-NOTES-te-IN.html
HighAvailability RELEASE-NOTES-fr-FR.html RELEASE-NOTES-zh-CN.html
p_w_picpaths RELEASE-NOTES-gu-IN.html RELEASE-NOTES-zh-TW.html
isolinux RELEASE-NOTES-hi-IN.html repodata
ks.cfg RELEASE-NOTES-it-IT.html ResilientStorage
ks.cfg~ RELEASE-NOTES-ja-JP.html RPM-GPG-KEY-redhat-beta
LoadBalancer RELEASE-NOTES-kn-IN.html RPM-GPG-KEY-redhat-release
lost+found RELEASE-NOTES-ko-KR.html ScalableFileSystem
media.repo RELEASE-NOTES-ml-IN.html Server
my-ca.crt RELEASE-NOTES-mr-IN.html TRANS.TBL
Packages RELEASE-NOTES-or-IN.html
README RELEASE-NOTES-pa-IN.html
启动或者重启FTP服务,加入开机启动
Shutting down vsftpd: [ OK ]
Starting vsftpd for vsftpd: [ OK ]
[root@kikupotter ~]# chkconfig vsftpd on
[root@kikupotter ~]# chkconfig --list | grep vsftpd
vsftpd 0:关闭 1:关闭 2:启用 3:启用 4:启用 5:启用 6:关闭
安装kickstart
pykickstart-1.74.6-1.el6.noarch
system-config-kickstart-2.8.6.4-1.el6.noarch
[root@kikupotter ~]# yum -y install system-config-kickstart
运行kickstart 编写第一个ks.cfg文件。
或者运行!
#platform=x86, AMD64, or Intel EM64T
#version=DEVEL
# Firewall configuration
firewall --disabled
# Install OS instead of upgrade
install
# Use NFS installation media
nfs --server=192.168.0.1 --dir=/var/ftp/pub/centos_6.3_final
# Root password
rootpw --iscrypted $1$1mOtsVK8$ypiScxGkTE32g8Q9lQzIt0
# System authorization information
auth --useshadow --passalgo=sha512
# Use text mode install
text
# Run the Setup Agent on first boot
firstboot --enable
# System keyboard
keyboard us
# System language
lang en_US
# SELinux configuration
selinux --enforcing
# Installation logging level
logging --level=info
# Reboot after installation
reboot
# System timezone
timezone Asia/Shanghai
# Network information
network --bootproto=dhcp --device=eth0 --onboot=on
# System bootloader configuration
bootloader --location=mbr --password="redhat" --iscrypted
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel
# Disk partitioning information
part /boot --fstype="ext4" --size=100
part / --fstype="ext4" --grow --size=25000
part swap --fstype="swap" --size=2048
part /usr --fstype="ext4" --size=50000
part /var --fstype="ext4" --size=50000
%packages
@base
@basic-desktop
@chinese-support
@desktop-platform
@fonts
@ftp-server
@general-desktop
@graphical-admin-tools
@graphics
@input-methods
@internet-browser
@legacy-x
@nfs-file-server
@remote-desktop-clients
@x11
%end
EOF
安装TFTP服务。
xinetd-2.3.14-33.el6.x86_64
[root@kikupotter ~]# rpm -qa |grep tftp
tftp-server-0.49-7.el6.x86_64
tftp-0.49-7.el6.x86_64
[root@kikupotter ~]# yum -y install xinetd tftp
配置TFTP
或者运行一下命令
# default: off
# description: The tftp server serves files using the trivial file transfer \
# protocol. The tftp protocol is often used to boot diskless \
# workstations, download configuration files to network-aware printers, \
# and to start the installation process for some operating systems.
service tftp
{
disable = no
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
per_source = 11
cps = 100 2
flags = IPv4
}
EOF
启动TFTP服务
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
[root@kikupotter ~]# chkconfig xinetd on
[root@kikupotter ~]# chkconfig tftp on
[root@kikupotter ~]# chkconfig --list | grep tftp
tftp: 启用
配置PXE启动源。
[root@kikupotter ~]# rpm -qa | grep syslinux
syslinux-4.02-4.el6.x86_64
[root@kikupotter ~]# cd /usr/share/syslinux/
[root@kikupotter syslinux]# cp chain.c32 mboot.c32 menu.c32 pxelinux.0 memdisk /tftpboot/
[root@kikupotter p_w_picpaths]# pwd
/var/ftp/pub/RHEL6.2/p_w_picpaths
[root@kikupotter p_w_picpaths]# ls
efiboot.img install.img pxeboot TRANS.TBL
efidisk.img product.img README
[root@kikupotter p_w_picpaths]# cd pxeboot/
[root@kikupotter pxeboot]# ls
initrd.img TRANS.TBL vmlinuz
[root@kikupotter pxeboot]# cp * /tftpboot/
[root@kikupotter tftpboot]# ls
chain.c32 mboot.c32 menu.c32
initrd.img TRANS.TBL vmlinuz
memdisk pxelinux.0 TRANS.TBL
[root@kikupotter tftpboot]# mkdir pxelinux.cfg
[root@kikupotter tftpboot]# cd pxelinux.cfg、
// 配置提示接界面,default 文件
prompt 0
timeout 300
ONTIMEOUT local
MENU TITLE PXE Menu
LABEL redhat 6.2 x86_64
MENU LABEL redhat 6.2 x86_64
KERNEL vmlinuz //
APPEND initrd=initrd.img ksdevice=eth0 network ks=ftp://192.168.0.1/pub/RHEL6.2/ks.cfg //指定ks路径。
那整个服务器就配置好了。
下面进入测试阶段:
- 启动裸设备,bios设置成从网络启动。
- 客户端获取ip,TFTP下载pxeliunx.0文件
- 客户端读取default文件,我们选择安装redhat 6.2.
- 则根据default记录的信息,现将内核初始化系统载入内存。先完成启动过程。
- 然后启动安装程序,安装程序会下载下载ks文件,并且进行读取看看是否有错,确认无误ks文件进行安装。
终于完成一个安装系列了。那五天的第一天就完成redhat的系统安装。分别从初级,中级,较高级的角度安装linux。
接下来马上要着手的是管理系列,敬请期待。
转载于:https://blog.51cto.com/kikupotter/1039820
五天学redhat系列之---安装篇(下)相关推荐
- 五天学redhat系列之---文件系统管理
套用文档的一段话开头:文件系统是牵涉到文件与目录在计算机中的存储.一个文件系统可以有不同的格式--称作文件系统类型.这些格式决定着记录到文件以及目录内的信息.有些文件系统类型会记录多余的信息,而有一些 ...
- RedHat 系列 Linux 安装后,建立嵌入式开发环境
RedHat 系列 Linux 安装后,建立嵌入式开发环境 from:https://segmentfault.com/a/1190000005881355 做开发的时候,经常为了某系列的项目,专门就 ...
- Saltstack系列之一——安装篇
最近,和暴雪中国区带技术的一个人聊了不少,他们在测试salt,不过目前用的是puppet,服务器数量也快要1000多台.那为什么他们会去考虑测试salt.另谋他法呢,肯定是有salt一定优势的. 其实 ...
- 五分钟学会python_关于五分钟学Python系列视频
Up主记得我们父母辈考大学的时候,外语,尤其是英语,是一个非常火爆的专业.那个时候会英语的人相对比较少,因此能掌握流利的英文听说读写的学生可以算是稀缺人才.现在虽然英语专业人才仍然有很大市场,但是整体 ...
- Tekton系列之安装篇【一】
微信公众号:运维开发故事,作者:乔克 大家好,我是乔克.从今天开始会给大家带来Tekton的系列文章,主要是自己学习总结,同时也希望对想了解Tekton的朋友有点用处. 今天主要分享安装以及简单使用, ...
- 手把手教你学AltiumDesigner之入门安装篇
学好AD,请多加练习!!! 学好AD,请多加练习!!! 学好AD,请多加练习!!! 注: 1.AltiumDesigner又简称AD,下文都以AD作为软件名称. 2.文章以AD软件的安装开始,手把手教 ...
- 深度学习核心技术精讲100篇(十五)-搜索引擎Indri系列之安装及使用
前言 Indri是Lemur项目衍生的一个基于语言模型的新的搜索引擎,由University of Massachusetts和Carnegie Mellon University合作开发. 安装 下 ...
- 五十、Maven系列:安装和配置Maven镜像
@Author:Runsen @Date:2020/6/11 人生最重要的不是所站的位置,而是内心所朝的方向.只要我在每篇博文中写得自己体会,修炼身心:在每天的不断重复学习中,耐住寂寞,练就真功,不畏 ...
- linux嵌入式开发位置,RedHat 系列 Linux 安装后,建立嵌入式开发环境
做开发的时候,经常为了某系列的项目,专门就搞一个虚拟机,安装RHEL.Fedora.CentOS之类的进行开发.因为是虚拟机,也经常使用root账户就直接上了. 这里记录一下使用RHEL系列虚拟机,安 ...
- xunsearch php实例,xunsearch系列(一)安装篇
先来了解一下什么是全文检索(全文搜索)? 全文检索是指计算机索引程序通过扫描文章中的每一个词,对每一个词建立一个索引,指明该词在文章中出现的次数和位置,当用户查询时,检索程序就根据事先建立的索引进行查 ...
最新文章
- cisco路由器灌IOS
- 除了Postman之外,居然还有个Postwoman...
- 我的Java后端书架 (2016年暖冬4.0版)
- 用keras作CNN卷积网络书本分类(书本、非书本)
- 如何从手机或PC将游戏下载到PlayStation 4
- TFS创建团队项目(三)
- strlen() Bug
- 「mac版」支持flash的浏览器,谷歌浏览器Chrome、火狐浏览器Firefox
- 数据隐私和数据分享_对数据隐私持开放态度
- 设计模式 C++简单工厂模式
- 单位阶跃信号是周期信号吗_直流散热风扇的信号你知道如何控制吗?
- 19【推荐系统4】DeeoCrossing
- 安川机器人报错_安川机器人报错代码:原点位置数据修改
- 需求分析——系统建模方法
- pip install使用豆瓣库
- 大数据挖掘课程案例资源介绍
- 支付宝余额提现收手续费了
- 王者荣耀服务器维护费用,王者荣耀服务器全线崩溃!事后只补偿100铭文!网友:卸载了...
- Google谷歌拼音自动升级小秘密(解迷谷歌拼音输入法自动升级)
- 腾讯文档服务器,腾讯内部培训资料服务器硬件介绍-20210712081429.ppt-原创力文档...
热门文章
- 【Landsat 8】介绍
- keras中无法用save保存模型的问题
- 无人机技术在精细建模中的应用(PPT)
- 摄影测量学——航摄像片的内、外方位元素和像点空间直角坐标变换与中心投影构像方程
- php . 和..,?php?和??
- 乐源机器人没电提醒吗_云迹讲解机器人,你的专属机器人服务专家
- 怎样输出矩阵乘积C语言,c语言矩阵相乘
- 我是如何通过思维系统实现年薪50万的?
- asp和php漏洞,ASP_实例分析ASP上传漏洞入侵实战及扩展,【上传漏洞欺骗技术】 - phpStudy...
- python写透视挂_python – OpenCV透视变换给出了意想不到的结果