当前位置: 首页 > news >正文

网站定制建网站定制建设设英文网站后台维护

网站定制建网站定制建设设,英文网站后台维护,做平面免费接单网站,凡科网的网站免费的可以用吗PXE简介 PXE(Preboot eXecution Environment)是一种在计算机启动时使用网络接口从远程服务器获取操作系统安装和启动信息的技术。通过PXE,计算机可以从局域网中的PXE服务器上下载操作系统安装文件,并进行自动化的操作系统部署或故…

PXE简介

PXE(Preboot eXecution Environment)是一种在计算机启动时使用网络接口从远程服务器获取操作系统安装和启动信息的技术。通过PXE,计算机可以从局域网中的PXE服务器上下载操作系统安装文件,并进行自动化的操作系统部署或故障排除。由Intel公司开发的PXE网络引导技术工作在Client/Server模式,可以同时装配多台机器,安装系统、配置各种服务,同时不需要光盘、U 盘等安装介质实现远程连接。

kickstart自动安装脚本的作用

在企业中安装多台操作系统时面临的问题

当安装Linux操作系统时,安装过程会需要回答很多关于设定的问题,这些问题必须手动选择,否则无法进行安装。当只安装1台Linux系统,手动选择设定工作量比较轻松;当安装多台Linux,这些设定需要重复多次,这些重复动作是效率低下的操作

如何解决以上问题?

用文件来记录所有安装过程中问题的答案,并让所有需要安装的主机自动读取

以上解决方案中记录系统安装过程中所有问题答案的文件叫kickstart脚本

实验环境:

  • RHEL7主机
  • 开启主机图形
  • 配置网络可用
  • 关闭VMware DHCP功能
  • 软件仓库能正常工作

如果安装的时候安装了图形界面则输入init 5将图形界面打开;若是没有安装图形界面,则可以使用yum install group "Server with GUI" -y命令下载安装图形界面。
在这里插入图片描述
在这里插入图片描述
/root/anaconda-ks.cfg此文件是在系统安装好之后自动生成的,这个文件记录了系统在安装过程中的所有设定。

  1. 安装图形化生成kickstart自动安装脚本的工具
[root@www ~]# yum install system-config-kickstart -y
  1. 启动图形制作工具
[root@www ~]# system-config-kickstart
  1. 按照图示更改配置
    在这里插入图片描述
    在这里插入图片描述
    在这里插入图片描述
    安装源选择HTTP通过网络分享安装源,现在我们没有网络分享安装源,所以需要自己搭建
  • 下载httpd,并启动
[root@www ~]# yum install httpd -y
[root@www ~]# systemctl enable --now httpd
  • 创建一个符号链接(软链接),在 /var/www/html/ 目录下创建一个指向 /rhel7/ 目录的软链接。通过创建这个软链接,当访问 /var/www/html/ 时,实际上会访问到 /rhel7/ 的内容
[root@www ~]# ln -s /rhel7/ /var/www/html/
[root@www ~]# cd /var/www/html/
[root@www html]# ls
rhel7

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

根据自己的网卡配置,图示为ens33,而我自己的是eth0。
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
上图为安装后运行的脚本,可以根据自己的需要写运行脚本。
在这里插入图片描述
在这里插入图片描述
我修改了文件名称为ks1.cfg
4. 编辑ks1.cfg文件

[root@www ~]# vim ks1.cfg 

在这里插入图片描述
在这里插入图片描述

修改完检查是否有语法错误

[root@www ~]# ksvalidator ks.cfg 
  1. 将此自动化安装脚本共享出去
[root@www ~]# cp ks1.cfg /var/www/html/

进入网页进行测试
在这里插入图片描述
6. 安装并搭建DHCP服务

安装DHCP服务器为其他服务器提供分配ip的功能

[root@www ~]# yum install dhcpd -y
# 生成配置文件
[root@www ~]# \cp -f /usr/share/doc/dhcp*/dhcpd.conf.example /etc/dhcp/dhcpd.conf# 编写/etc/dhcp/dhcpd.conf配置文件
[root@www ~]# cat /etc/dhcp/dhcpd.conf 
# dhcpd.conf
#
# Sample configuration file for ISC dhcpd
## option definitions common to all supported networks...
option domain-name "wwwl.org"; #公司域名
option domain-name-servers 114.114.114.114;#对外分发的dns地址default-lease-time 600;
max-lease-time 7200;# Use this to enble / disable dynamic dns updates globally.
#ddns-update-style none;# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
#authoritative;# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;# No service will be given on this subnet, but declaring it helps the 
# DHCP server to understand the network topology.#subnet 10.152.187.0 netmask 255.255.255.0 {
#}# This is a very basic subnet declaration.subnet 172.25.254.0 netmask 255.255.255.0 {range 172.25.254.30 172.25.254.40;#地址池option routers 172.25.254.2;#网关next-server 172.25.254.133;#下一个服务器filename "pxelinux.0";#在next-server上读取的文件
}#重启DHCP
[root@www ~]# systemctl restart dhcpd
[root@www ~]# systemctl enable --now dhcpd
  1. 测试安装
    在这里插入图片描述
    此处的网址根据自己的写,我配置的为ks=http://172.25.254.133/ks1.cfg

在这里插入图片描述
8. 搭建PXE网络安装环境实现服务器自动部署

# 环境需要最基本的程序
[root@www ~]# yum install syslinux.x86
# 共享pxelinux.0数据文件的网络服务
[root@www ~]# yum install tftp-server.x86_64 -y
# tftp服务自启并立即启动
[root@www ~]# systemctl enable --now tftp 
# 将镜像中引导 Linux 系统的文件复制到该目录下
[root@www ~]# cp -p /rhel7/isolinux/* /var/lib/tftpboot/  
# pxelinux 的主要引导文件复制到这里
[root@www ~]# cp -p /usr/share/syslinux/pxelinux.0 /var/lib/tftpboot/ 
[root@www ~]# cd /var/lib/tftpboot/
[root@www tftpboot]# mkdir pxelinux.cfg
# 将该配置文件复制到pxelinux.cfg/default中
[root@www tftpboot]# cp isolinux.cfg pxelinux.cfg/default[root@www tftpboot]# vim /var/lib/tftpboot/pxelinux.cfg/default
default vesamenu.c32
timeout 30 #设置超时时间3sdisplay boot.msg# Clear the screen when exiting the menu, instead of leaving the menu displayed.
# For vesamenu, this means the graphical background is still displayed without
# the menu itself for as long as the screen remains in graphics mode.
menu clear
menu background splash.png
menu title Red Hat Enterprise Linux 7.9
menu vshift 8
menu rows 18
menu margin 8
#menu hidden
menu helpmsgrow 15
menu tabmsgrow 13# Border Area
menu color border * #00000000 #00000000 none# Selected item
menu color sel 0 #ffffffff #00000000 none# Title bar
menu color title 0 #ff7ba3d0 #00000000 none# Press [Tab] message
menu color tabmsg 0 #ff3a6496 #00000000 none# Unselected menu item
menu color unsel 0 #84b8ffff #00000000 none# Selected hotkey
menu color hotsel 0 #84b8ffff #00000000 none# Unselected hotkey
menu color hotkey 0 #ffffffff #00000000 none# Help text
menu color help 0 #ffffffff #00000000 none# A scrollbar of some type? Not sure.
menu color scrollbar 0 #ffffffff #ff355594 none# Timeout msg
menu color timeout 0 #ffffffff #00000000 none
menu color timeout_msg 0 #ffffffff #00000000 none# Command prompt text
menu color cmdmark 0 #84b8ffff #00000000 none
menu color cmdline 0 #ffffffff #00000000 none# Do not display the actual menu unless the user presses a key. All that is displayed is a timeout message.menu tabmsg Press Tab for full configuration options on menu items.menu separator # insert an empty line
menu separator # insert an empty linelabel linuxmenu label ^Install Red Hat Enterprise Linux hahahahahaah #设置安装时显示的字符menu default #安装时默认选择这个选项kernel vmlinuzappend initrd=initrd.img repo=http://172.25.254.133/rhel7 ks=http://172.25.254.133/ks1.cfg quiet #静默label checkmenu label Test this ^media & install Red Hat Enterprise Linux 7.9kernel vmlinuzappend initrd=initrd.img inst.stage2=hd:LABEL=RHEL-7.9\x20Server.x86_64 rd.live.check quietmenu separator # insert an empty line# utilities submenu
menu begin ^Troubleshootingmenu title Troubleshootinglabel vesamenu indent count 5menu label Install Red Hat Enterprise Linux 7.9 in ^basic graphics modetext helpTry this option out if you're having trouble installingRed Hat Enterprise Linux 7.9.endtextkernel vmlinuzappend initrd=initrd.img inst.stage2=hd:LABEL=RHEL-7.9\x20Server.x86_64 xdriver=vesa nomodeset quietlabel rescuemenu indent count 5menu label ^Rescue a Red Hat Enterprise Linux systemtext helpIf the system will not boot, this lets you access filesand edit config files to try to get it booting again.endtextkernel vmlinuzappend initrd=initrd.img inst.stage2=hd:LABEL=RHEL-7.9\x20Server.x86_64 rescue quietlabel memtestmenu label Run a ^memory testtext helpIf your system is having issues, a problem with yoursystem's memory may be the cause. Use this utility tosee if the memory is working correctly.endtextkernel memtestmenu separator # insert an empty linelabel localmenu label Boot from ^local drivelocalboot 0xffffmenu separator # insert an empty line
menu separator # insert an empty linelabel returntomainmenu label Return to ^main menumenu exitmenu end

新建虚拟机进行安装

在这里插入图片描述
选择打开电源时进入固件
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
默认会选择第一个,不用自己手动选,等待3s自动安装
在这里插入图片描述
安装完成后记得关机再选择打开电源时进入固件,将启动方式更改成默认的方式:Hard Drive 即硬盘启动方式。不然会进入无限安装
在这里插入图片描述

http://www.yayakq.cn/news/472387/

相关文章:

  • php源码项目 门户网站开发网站信息化建设建议书
  • 企业网站四种类型包装设计效果图
  • ICP备案和实际网站不是一个名字新建站点的步骤
  • 网站建设市场需求大做网站php需要几个人
  • 简述网站开发的几个步骤制作一个静态网站的步骤
  • asp怎么做网站适配做网站那家比较好
  • 佛山响应式网站开发首页定制
  • 刚注册公司怎么做网站网站 数据报表如何做
  • wordpress查询数据库页面seo网站推广佛山
  • 企业网站建设的几种形式网站开发是什么职位
  • 国外做网站卖东西要什么条件北京小程序开发电话
  • 聚豪云免费虚拟主机重庆网络seo公司
  • 怎么发布php网站深圳网站建设选云聚达
  • 宜昌教育云网站建设公司图标设计大全免费 logo
  • 网站开发讲座心得体会网站开发资料
  • 什么建站程序好收录wordpress分类页标题
  • 网站建设与运营及营销服务制作海报
  • 做水暖的网站网站备案填写要求
  • 电商网站上信息资源的特点包括wordpress手机显示不出主题
  • 如何提高网站浏览量山东最近出现大量感染病
  • 学做网站学什么语言wordpress 一键置顶
  • 常平网站建设公司自建网站如何盈利
  • 全国最新网站备案查询wordpress自动空格
  • 基础网站建设素材沈阳高端网站建设公司
  • 什么是网络建站如何做网站容易收录
  • 网站建设公司选择标准做服装招聘的网站有哪些内容
  • 长沙网站建设企业网站建设与运营策划书
  • 自适应网站制作方案做logo的著名网站
  • 如何快速做企业网站包括商城seo兼职网
  • 做网站不实名认证可以吗石家庄网站建设汉狮怎么样