百度360必应搜狗淘宝本站头条
当前位置:网站首页 > 技术文章 > 正文

定制centos7.7安装镜像默认内核5.5去除默认3.10内核

nanshan 2024-10-13 03:48 12 浏览 0 评论

镜像定制内容:

  • 定制镜像内容
  • 基于官方镜像minimal版定制
  • 禁用自带的 nouveau nvidia驱动(Linux安装显卡驱动免重启即时生效),为自动化部署脚本提供便携.

检查方式:

[root@localhost ~]# cat /etc/modprobe.d/blacklist.conf

blacklist nouveau

[root@localhost ~]#

  • 内置5.5.7-1.el7.elrepo.x86_64 内核,去除官方默认自带3.10.0-957.el7.x86_64内核.
  • 内置ntfs-3g插件(支持直接插ntfs格式的u盘拷贝)
  • 以内置以下常用命令/开发调试工具包

telnet,lrzsz,htop,iftop,git,vim,tree,wget,gcc-c++,openssl-devel,expect,rpm,ntpdate,nmap-ncat,net-tools,unzip,yum-utils,device-mapper-persistent-data,bash-completion,bash-completion-extras,libcurl,openssl,ncurses-devel,gcc,kernel-ml,kernel-ml-devel,kernel-ml-headers,kernel-ml-tools-libs,kernel-ml-tool,kernel-ml-tools-libs-devel

优化Centos系统

  1. 更换yum源默认为 阿里源,增加docker-ce国内源CentOS-Base.repo docker-ce.repo epel.repo
  2. /etc/rc.local默认给执行权限
  3. 优化sshd----------->>> UseDNS no
  4. 关闭firewalld防火墙
  5. 关闭Selinux开机自启
  6. 默认开启命令行tab键补齐功能
  7. 内核参数优化如下


准备环境

yum install  createrepo  genisoimage   -y

第一:准备完整的安装镜像CentOS-7,挂载到虚拟机,并同时创建一个用于编辑存放的目录centos7

	mkdir -p /home/centos7
	mount /dev/cdrom /mnt
	
	cd /mnt && ls -l

第二:复制光盘文件到可编辑目录centos7

cp -rfv /mnt/* /home/centos7	

第三:编辑bios引导文件

[root@localhost ~]# cat  /home/centos7/isolinux/isolinux.cfg
default vesamenu.c32
timeout 600

display 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 CentOS 7
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 line

label linux
  menu label ^Install CentOS 7.7 ( Kernel-5.5.7-1)
  kernel vmlinuz
  append initrd=initrd.img inst.stage2=hd:LABEL=CentOS7 quiet

label check
  menu label Test this ^media & install CentOS 7
  menu default
  kernel vmlinuz
  append initrd=initrd.img inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 rd.live.check quiet

menu separator # insert an empty line

# utilities submenu
menu begin ^Troubleshooting
  menu title Troubleshooting

label vesa
  menu indent count 5
  menu label Install CentOS 7 in ^basic graphics mode
  text help
	Try this option out if you're having trouble installing
	CentOS 7.
  endtext
  kernel vmlinuz
  append initrd=initrd.img inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 xdriver=vesa nomodeset quiet

label rescue
  menu indent count 5
  menu label ^Rescue a CentOS system
  text help
	If the system will not boot, this lets you access files
	and edit config files to try to get it booting again.
  endtext
  kernel vmlinuz
  append initrd=initrd.img inst.stage2=hd:LABEL=CentOS\x207\x20x86_64 rescue quiet

label memtest
  menu label Run a ^memory test
  text help
	If your system is having issues, a problem with your
	system's memory may be the cause. Use this utility to
	see if the memory is working correctly.
  endtext
  kernel memtest

menu separator # insert an empty line

label local
  menu label Boot from ^local drive
  localboot 0xffff

menu separator # insert an empty line
menu separator # insert an empty line

label returntomain
  menu label Return to ^main menu
  menu exit

menu end
[root@localhost ~]#


第四:编辑EFI引导文件/home/centos7/EFI/BOOT/grub.cfg

[root@localhost ~]# cat /home/centos7/EFI/BOOT/grub.cfg
set default="1"

function load_video {
  insmod efi_gop
  insmod efi_uga
  insmod video_bochs
  insmod video_cirrus
  insmod all_video
}

load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2

set timeout=60
### END /etc/grub.d/00_header ###

search --no-floppy --set=root -l 'CentOS 7 x86_64'

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Install CentOS 7.7( Kernel-5.5.7-1)' --class fedora --class gnu-linux --class gnu --class os {
	linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=CentOS7 quiet
	initrdefi /images/pxeboot/initrd.img
}
}
[root@localhost ~]#


第五:编辑/home/centos7/comps.xml文件增加自定义软件/5.5内核

[root@localhost ~]# cat /home/centos7/comps.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE comps PUBLIC "-//CentOS//DTD Comps info//EN" "comps.dtd">
<comps>
  <group>
    <id>core</id>
    <name>Core</name>
    <name xml:lang="af">Kern</name>
    <name xml:lang="af_ZA">Kern</name>
    <name xml:lang="am">????? ??</name>
    <name xml:lang="ar">?????</name>
    <name xml:lang="as">??????</name>
    <name xml:lang="bal">????</name>
    <name xml:lang="be">Падмурак</name>
    <name xml:lang="bg">Основа</name>
    <name xml:lang="bn">???</name>
    <name xml:lang="bn_IN">???</name>
    <name xml:lang="bs">Jezgra</name>
    <name xml:lang="ca">Nucli</name>
    <name xml:lang="cs">úplny základ</name>
    <name xml:lang="cs_CZ">úplny základ</name>
    <name xml:lang="cy">Craidd</name>
    <name xml:lang="da">Grundl?ggende</name>
    <name xml:lang="de">Kern</name>
    <name xml:lang="de_CH">Kern</name>
    <name xml:lang="el">Πυρ?να?</name>
    <name xml:lang="en_GB">Core</name>
    <name xml:lang="es">Núcleo</name>
    <name xml:lang="es_ES">Núcleo</name>
    <name xml:lang="et">Tuum</name>
    <name xml:lang="fa">???</name>
    <name xml:lang="fa_IR">???</name>
    <name xml:lang="fi">Keskeiset</name>
    <name xml:lang="fr">Core</name>
    <name xml:lang="gl">Núcleo</name>
    <name xml:lang="gu">???</name>
    <name xml:lang="he">????</name>
    <name xml:lang="hi">???</name>
    <name xml:lang="hr">Jezgra</name>
    <name xml:lang="hr_HR">Jezgra</name>
    <name xml:lang="hu">Mag</name>
    <name xml:lang="hy">????</name>
    <name xml:lang="ia">Nucleo</name>
    <name xml:lang="id">Inti</name>
    <name xml:lang="ilo">Bugas</name>
    <name xml:lang="is">Lágmarkskerfi</name>
    <name xml:lang="it">Principale</name>
    <name xml:lang="it_IT">Principale</name>
    <name xml:lang="ja">コア</name>
    <name xml:lang="ja_JP">コア</name>
    <name xml:lang="ka">??????</name>
    <name xml:lang="kn">????????</name>
    <name xml:lang="ko">??</name>
    <name xml:lang="lv">Pamatsistēma</name>
    <name xml:lang="mai">???</name>
    <name xml:lang="mk">Основни</name>
    <name xml:lang="ml">?????</name>
    <name xml:lang="mr">???</name>
    <name xml:lang="ms">Teras</name>
    <name xml:lang="ms_MY">Teras</name>
    <name xml:lang="nb">Kjerne</name>
    <name xml:lang="ne">???</name>
    <name xml:lang="nl">Kern</name>
    <name xml:lang="no">Kjerne</name>
    <name xml:lang="nso">Bogare</name>
    <name xml:lang="or">??????</name>
    <name xml:lang="pa">???</name>
    <name xml:lang="pl">Rdzeń</name>
    <name xml:lang="pt">Núcleo</name>
    <name xml:lang="pt_BR">Núcleo</name>
    <name xml:lang="ro">Nucleu</name>
    <name xml:lang="ru">Основа</name>
    <name xml:lang="ru_RU">Основа</name>
    <name xml:lang="si">?????????</name>
    <name xml:lang="sk">Jadro</name>
    <name xml:lang="sl">Jedro</name>
    <name xml:lang="sq">B?rthama</name>
    <name xml:lang="sr">Срж</name>
    <name xml:lang="sr@latin">Sr?</name>
    <name xml:lang="sr@Latn">Sr?</name>
    <name xml:lang="sv">Grund</name>
    <name xml:lang="ta">????</name>
    <name xml:lang="ta_IN">????</name>
    <name xml:lang="te">?????????</name>
    <name xml:lang="tg">Система</name>
    <name xml:lang="th">???????</name>
    <name xml:lang="tr">?ekirdek</name>
    <name xml:lang="uk">Основа</name>
    <name xml:lang="uk_UA">Основа</name>
    <name xml:lang="ur">????</name>
    <name xml:lang="vi">L?i</name>
    <name xml:lang="zh">核心</name>
    <name xml:lang="zh_CN">核心</name>
    <name xml:lang="zh_TW">核心</name>
    <name xml:lang="zu">Okuyikhona</name>
    <description>Smallest possible installation.</description>
    <description xml:lang="as">??????? ???????</description>
    <description xml:lang="bn">??????? ??????????</description>
    <description xml:lang="bn_IN">??????? ??????????</description>
    <description xml:lang="cs">Nejmen?í mo?ná instalace.</description>
    <description xml:lang="cs_CZ">Nejmen?í mo?ná instalace.</description>
    <description xml:lang="de">Kleinstm?gliche Installation.</description>
    <description xml:lang="de_CH">Kleinstm?gliche Installation.</description>
    <description xml:lang="es">La instalación más peque?a posible.</description>
    <description xml:lang="es_ES">La instalación más peque?a posible.</description>
    <description xml:lang="fr">Plus petite installation possible.</description>
    <description xml:lang="gu">??????? ???? ???? ??????.</description>
    <description xml:lang="hi">????? ??????? ????????.</description>
    <description xml:lang="ia">Le minime possibile installation.</description>
    <description xml:lang="it">Minima installazione possibile.</description>
    <description xml:lang="it_IT">Minima installazione possibile.</description>
    <description xml:lang="ja">最小限のインストール</description>
    <description xml:lang="ja_JP">最小限のインストール</description>
    <description xml:lang="kn">???????????? ??????????.</description>
    <description xml:lang="ko">??? ?? ??</description>
    <description xml:lang="ml">???????? ??????? ????? ???????????????.</description>
    <description xml:lang="mr">??????? ?????? ???? ???????????.</description>
    <description xml:lang="or">????????? ???????? ????????</description>
    <description xml:lang="pa">????-??? ???? ??????????</description>
    <description xml:lang="pl">Najmniejsza mo?liwa instalacja.</description>
    <description xml:lang="pt_BR">Menor instala??o possível</description>
    <description xml:lang="ru">Минимально возможная установка</description>
    <description xml:lang="ru_RU">Минимально возможная установка</description>
    <description xml:lang="sv">Minsta m?jliga installation</description>
    <description xml:lang="ta">????? ????? ?????????????????? ???????.</description>
    <description xml:lang="ta_IN">????? ????? ?????????????????? ???????.</description>
    <description xml:lang="te">???????? ???????? ????????.</description>
    <description xml:lang="uk">М?н?мально можливе встановлення.</description>
    <description xml:lang="uk_UA">М?н?мально можливе встановлення.</description>
    <description xml:lang="zh">最小型安裝。</description>
    <description xml:lang="zh_CN">最小可能安装。</description>
    <description xml:lang="zh_TW">最小型安裝。</description>
    <default>false</default>
    <uservisible>false</uservisible>
    <packagelist>
      <packagereq type="mandatory">audit</packagereq>
      <packagereq type="mandatory">basesystem</packagereq>
      <packagereq type="mandatory">bash</packagereq>
      <packagereq type="mandatory">btrfs-progs</packagereq>
      <packagereq type="mandatory">coreutils</packagereq>
      <packagereq type="mandatory">cronie</packagereq>
      <packagereq type="mandatory">curl</packagereq>
      <packagereq type="mandatory">dhclient</packagereq>
      <packagereq type="mandatory">e2fsprogs</packagereq>
      <packagereq type="mandatory">filesystem</packagereq>
      <packagereq type="mandatory">firewalld</packagereq>
      <packagereq type="mandatory">glibc</packagereq>
      <packagereq type="mandatory">hostname</packagereq>
      <packagereq type="mandatory">initscripts</packagereq>
      <packagereq type="mandatory">iproute</packagereq>
      <packagereq type="mandatory">iprutils</packagereq>
      <packagereq type="mandatory">iptables</packagereq>
      <packagereq type="mandatory">iputils</packagereq>
      <packagereq type="mandatory">irqbalance</packagereq>
      <packagereq type="mandatory">kbd</packagereq>
      <packagereq type="mandatory">kexec-tools</packagereq>
      <packagereq type="mandatory">less</packagereq>
      <packagereq type="mandatory">man-db</packagereq>
      <packagereq type="mandatory">ncurses</packagereq>
      <packagereq type="mandatory">openssh-clients</packagereq>
      <packagereq type="mandatory">openssh-server</packagereq>
      <packagereq type="mandatory">parted</packagereq>
      <packagereq type="mandatory">passwd</packagereq>
      <packagereq type="mandatory">plymouth</packagereq>
      <packagereq type="mandatory">policycoreutils</packagereq>
      <packagereq type="mandatory">procps-ng</packagereq>
      <packagereq type="mandatory">rootfiles</packagereq>
      <packagereq type="mandatory">rpm</packagereq>
      <packagereq type="mandatory">rsyslog</packagereq>
      <packagereq type="mandatory">selinux-policy-targeted</packagereq>
      <packagereq type="mandatory">setup</packagereq>
      <packagereq type="mandatory">shadow-utils</packagereq>
      <packagereq type="mandatory">sudo</packagereq>
      <packagereq type="mandatory">systemd</packagereq>
      <packagereq type="mandatory">tar</packagereq>
      <packagereq type="mandatory">tuned</packagereq>
      <packagereq type="mandatory">util-linux</packagereq>
      <packagereq type="mandatory">vim-minimal</packagereq>
      <packagereq type="mandatory">xfsprogs</packagereq>
      <packagereq type="mandatory">yum</packagereq>
      <packagereq type="default">aic94xx-firmware</packagereq>
      <packagereq type="default">alsa-firmware</packagereq>
      <packagereq type="default">biosdevname</packagereq>
      <packagereq type="default">dracut-config-rescue</packagereq>
      <packagereq type="default">ivtv-firmware</packagereq>
      <packagereq type="default">iwl100-firmware</packagereq>
      <packagereq type="default">iwl1000-firmware</packagereq>
      <packagereq type="default">iwl105-firmware</packagereq>
      <packagereq type="default">iwl135-firmware</packagereq>
      <packagereq type="default">iwl2000-firmware</packagereq>
      <packagereq type="default">iwl2030-firmware</packagereq>
      <packagereq type="default">iwl3160-firmware</packagereq>
      <packagereq type="default">iwl3945-firmware</packagereq>
      <packagereq type="default">iwl4965-firmware</packagereq>
      <packagereq type="default">iwl5000-firmware</packagereq>
      <packagereq type="default">iwl5150-firmware</packagereq>
      <packagereq type="default">iwl6000-firmware</packagereq>
      <packagereq type="default">iwl6000g2a-firmware</packagereq>
      <packagereq type="default">kernel-tools</packagereq>
      <packagereq type="default">iwl6000g2b-firmware</packagereq>
      <packagereq type="default">iwl6050-firmware</packagereq>
      <packagereq type="default">iwl7260-firmware</packagereq>
      <packagereq type="default">iwl7265-firmware</packagereq>
      <packagereq type="default">libsysfs</packagereq>
      <packagereq type="default">linux-firmware</packagereq>
      <packagereq type="default">lshw</packagereq>
      <packagereq type="default">microcode_ctl</packagereq>
      <packagereq type="default">NetworkManager</packagereq>
      <packagereq type="default">NetworkManager-team</packagereq>
      <packagereq type="default">NetworkManager-tui</packagereq>
      <packagereq type="default">postfix</packagereq>
      <packagereq type="default">sg3_utils</packagereq>
      <packagereq type="default">sg3_utils-libs</packagereq>
      <packagereq type="optional">dracut-config-generic</packagereq>
      <packagereq type="optional">dracut-fips</packagereq>
      <packagereq type="optional">dracut-fips-aesni</packagereq>
      <packagereq type="optional">dracut-network</packagereq>
      <packagereq type="optional">initial-setup</packagereq>
      <packagereq type="optional">openssh-keycat</packagereq>
      <packagereq type="optional">rdma-core</packagereq>
      <packagereq type="optional">selinux-policy-mls</packagereq>
      <packagereq type="optional">tboot</packagereq>
      <packagereq type="mandatory">lrzsz</packagereq>
      <packagereq type="mandatory">tree</packagereq>
      <packagereq type="mandatory">wget</packagereq>
      <packagereq type="mandatory">gcc-c++</packagereq>
      <packagereq type="mandatory">openssl-devel</packagereq>
      <packagereq type="mandatory">expect</packagereq>
      <packagereq type="mandatory">rpm</packagereq>
      <packagereq type="mandatory">ntpdate</packagereq>
      <packagereq type="mandatory">nmap-ncat</packagereq>
      <packagereq type="mandatory">net-tools</packagereq>
      <packagereq type="mandatory">ntfs-3g</packagereq>
      <packagereq type="mandatory">telnet</packagereq>
      <packagereq type="mandatory">ntfs-3g</packagereq>
      <packagereq type="mandatory">iotop</packagereq>
      <packagereq type="mandatory">yum-utils</packagereq>
      <packagereq type="mandatory">device-mapper-persistent-data</packagereq>
      <packagereq type="mandatory">bash-completion</packagereq>
      <packagereq type="mandatory">bash-completion-extras</packagereq>
      <packagereq type="mandatory">kernel-ml-devel</packagereq>
      <packagereq type="mandatory">kernel-ml</packagereq>
      <packagereq type="mandatory">kernel-ml-headers</packagereq>
      <packagereq type="mandatory">libcurl</packagereq>
      <packagereq type="mandatory">openssl</packagereq>
      <packagereq type="mandatory">unzip</packagereq>
      <packagereq type="mandatory">ncurses-devel</packagereq>
      <packagereq type="mandatory">htop</packagereq>
      <packagereq type="mandatory">pbzip2</packagereq>
      <packagereq type="mandatory">hdparm</packagereq>
      <packagereq type="mandatory">dmidecode</packagereq>
      <packagereq type="mandatory">pciutils</packagereq>
      <packagereq type="mandatory">iftop</packagereq>
      <packagereq type="mandatory">git</packagereq>
      <packagereq type="mandatory">centos7init</packagereq>
    </packagelist>
  </group>
<environment>
    <id>minimal</id>
    <name>Minimal Install</name>
    <name xml:lang="as">??????? ??????</name>
    <name xml:lang="cs">Minimální instalace</name>
    <name xml:lang="cs_CZ">Minimální instalace</name>
    <name xml:lang="de">Minimale Installation</name>
    <name xml:lang="de_CH">Minimale Installation</name>
    <name xml:lang="es">Instalación mínima</name>
    <name xml:lang="es_ES">Instalación mínima</name>
    <name xml:lang="fr">Installation minimale</name>
    <name xml:lang="gu">??????? ??????</name>
    <name xml:lang="hi">??????? ????????</name>
    <name xml:lang="it">Installazione minima</name>
    <name xml:lang="it_IT">Installazione minima</name>
    <name xml:lang="ja">最小限のインストール</name>
    <name xml:lang="ja_JP">最小限のインストール</name>
    <name xml:lang="kn">?????? ??????????</name>
    <name xml:lang="ko">?? ??</name>
    <name xml:lang="ml">??????? ?????? ?????????????</name>
    <name xml:lang="mr">????? ???????</name>
    <name xml:lang="or">????????? ??????</name>
    <name xml:lang="pa">??? ??? ??? ??????</name>
    <name xml:lang="pl">Minimalna instalacja</name>
    <name xml:lang="pt">Instala??es Mínimas</name>
    <name xml:lang="pt_BR">Instala??es Mínimas</name>
    <name xml:lang="ru">Минимальная установка</name>
    <name xml:lang="ru_RU">Минимальная установка</name>
    <name xml:lang="ta">??????????? ???????</name>
    <name xml:lang="ta_IN">??????????? ???????</name>
    <name xml:lang="te">?????? ????????</name>
    <name xml:lang="uk">М?н?мальна система</name>
    <name xml:lang="uk_UA">М?н?мальна система</name>
    <name xml:lang="zh">最小型安裝</name>
    <name xml:lang="zh_CN">最小安装</name>
    <name xml:lang="zh_TW">最小型安裝</name>
    <description>Basic functionality.</description>
    <description xml:lang="as">???? ?????????????</description>
    <description xml:lang="cs">Základní funkcionalita.</description>
    <description xml:lang="cs_CZ">Základní funkcionalita.</description>
    <description xml:lang="de">Grundlegende Funktionalit?t.</description>
    <description xml:lang="de_CH">Grundlegende Funktionalit?t.</description>
    <description xml:lang="es">Funcionalidad básica.</description>
    <description xml:lang="es_ES">Funcionalidad básica.</description>
    <description xml:lang="fr">Fonctionnalité de base.</description>
    <description xml:lang="gu">?????? ?????.</description>
    <description xml:lang="hi">????? ???????????????.</description>
    <description xml:lang="it">Funzione di base.</description>
    <description xml:lang="it_IT">Funzione di base.</description>
    <description xml:lang="ja">基本的な機能です。</description>
    <description xml:lang="ja_JP">基本的な機能です。</description>
    <description xml:lang="kn">?????? ???????????.</description>
    <description xml:lang="ko">???? ?????.</description>
    <description xml:lang="ml">???????? ????????????????.</description>
    <description xml:lang="mr">??? ???????????.</description>
    <description xml:lang="or">?????? ??????????????</description>
    <description xml:lang="pa">?????? ??????????</description>
    <description xml:lang="pl">Podstawowa funkcjonalno??.</description>
    <description xml:lang="pt">Fun??o básica</description>
    <description xml:lang="pt_BR">Fun??o básica</description>
    <description xml:lang="ru">Базовая функциональность.</description>
    <description xml:lang="ru_RU">Базовая функциональность.</description>
    <description xml:lang="ta">???????? ?????????.</description>
    <description xml:lang="ta_IN">???????? ?????????.</description>
    <description xml:lang="te">???????? ???????????.</description>
    <description xml:lang="uk">Основн? можливост?.</description>
    <description xml:lang="uk_UA">Основн? можливост?.</description>
    <description xml:lang="zh">基本功能。</description>
    <description xml:lang="zh_CN">基本功能。</description>
    <description xml:lang="zh_TW">基本功能。</description>
    <display_order>5</display_order>
    <grouplist>
      <groupid>core</groupid>
      <groupid>core</groupid>
    </grouplist>
    <optionlist>
      <groupid>debugging</groupid>
      <groupid>debugging</groupid>
    </optionlist>
  </environment>
  <environment>
</comps>

[root@localhost ~]#


第六:把准备好的 rpm包拷贝到/home/centos7/Packages/

提取rpm包不下载用以下命令

yum install --downloadonly    wget
find  /var/cache/  -name  "*.rpm"  -exec  \cp -av  {}  /root/kernel-5.5/  \;

\cp -rav /root/kernel-5.5/*  /home/centos7/Packages/



[root@localhost ~]# ls /root/kernel-5.5/*
/root/kernel-5.5/kernel-ml-5.5.7-1.el7.elrepo.x86_64.rpm
/root/kernel-5.5/kernel-ml-devel-5.5.7-1.el7.elrepo.x86_64.rpm
/root/kernel-5.5/kernel-ml-doc-5.5.7-1.el7.elrepo.noarch.rpm
/root/kernel-5.5/kernel-ml-headers-5.5.7-1.el7.elrepo.x86_64.rpm
/root/kernel-5.5/kernel-ml-tools-5.5.7-1.el7.elrepo.x86_64.rpm
/root/kernel-5.5/kernel-ml-tools-libs-5.5.7-1.el7.elrepo.x86_64.rpm
/root/kernel-5.5/kernel-ml-tools-libs-devel-5.5.7-1.el7.elrepo.x86_64.rpm
/root/kernel-5.5/perf-5.5.7-1.el7.elrepo.x86_64.rpm
/root/kernel-5.5/perl-5.16.3-294.el7_6.x86_64.rpm
/root/kernel-5.5/perl-Carp-1.26-244.el7.noarch.rpm
/root/kernel-5.5/perl-constant-1.27-2.el7.noarch.rpm
/root/kernel-5.5/perl-Data-Dumper-2.145-3.el7.x86_64.rpm
/root/kernel-5.5/perl-Encode-2.51-7.el7.x86_64.rpm
/root/kernel-5.5/perl-Exporter-5.68-3.el7.noarch.rpm
/root/kernel-5.5/perl-File-Path-2.09-2.el7.noarch.rpm
/root/kernel-5.5/perl-File-Temp-0.23.01-3.el7.noarch.rpm
/root/kernel-5.5/perl-Filter-1.49-3.el7.x86_64.rpm
/root/kernel-5.5/perl-Getopt-Long-2.40-3.el7.noarch.rpm
/root/kernel-5.5/perl-HTTP-Tiny-0.033-3.el7.noarch.rpm
/root/kernel-5.5/perl-libs-5.16.3-294.el7_6.x86_64.rpm
/root/kernel-5.5/perl-macros-5.16.3-294.el7_6.x86_64.rpm
/root/kernel-5.5/perl-parent-0.225-244.el7.noarch.rpm
/root/kernel-5.5/perl-PathTools-3.40-5.el7.x86_64.rpm
/root/kernel-5.5/perl-Pod-Escapes-1.04-294.el7_6.noarch.rpm
/root/kernel-5.5/perl-podlators-2.5.1-3.el7.noarch.rpm
/root/kernel-5.5/perl-Pod-Perldoc-3.20-4.el7.noarch.rpm
/root/kernel-5.5/perl-Pod-Simple-3.28-4.el7.noarch.rpm
/root/kernel-5.5/perl-Pod-Usage-1.63-3.el7.noarch.rpm
/root/kernel-5.5/perl-Scalar-List-Utils-1.27-248.el7.x86_64.rpm
/root/kernel-5.5/perl-Socket-2.010-4.el7.x86_64.rpm
/root/kernel-5.5/perl-Storable-2.45-3.el7.x86_64.rpm
/root/kernel-5.5/perl-Text-ParseWords-3.29-4.el7.noarch.rpm
/root/kernel-5.5/perl-threads-1.87-4.el7.x86_64.rpm
/root/kernel-5.5/perl-threads-shared-1.43-6.el7.x86_64.rpm
/root/kernel-5.5/perl-Time-HiRes-1.9725-3.el7.x86_64.rpm
/root/kernel-5.5/perl-Time-Local-1.2300-2.el7.noarch.rpm
/root/kernel-5.5/python-perf-5.5.7-1.el7.elrepo.x86_64.rpm
[root@localhost ~]#


第六:生成iso镜像,在当前目录下

cd /home/centos7/
createrepo  -g  comps.xml   ./
genisoimage -joliet-long -V CentOS7 -o CentOS-7.7-kernel-5.5.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -R -J -v -cache-inodes -T -eltorito-alt-boot -e images/efiboot.img -no-emul-boot /home/centos7


效果



相关推荐

实战派 | Java项目中玩转Redis6.0客户端缓存

铺垫首先介绍一下今天要使用到的工具Lettuce,它是一个可伸缩线程安全的redis客户端。多个线程可以共享同一个RedisConnection,利用nio框架Netty来高效地管理多个连接。放眼望向...

轻松掌握redis缓存穿透、击穿、雪崩问题解决方案(20230529版)

1、缓存穿透所谓缓存穿透就是非法传输了一个在数据库中不存在的条件,导致查询redis和数据库中都没有,并且有大量的请求进来,就会导致对数据库产生压力,解决这一问题的方法如下:1、使用空缓存解决对查询到...

Redis与本地缓存联手:多级缓存架构的奥秘

多级缓存(如Redis+本地缓存)是一种在系统架构中广泛应用的提高系统性能和响应速度的技术手段,它综合利用了不同类型缓存的优势,以下为你详细介绍:基本概念本地缓存:指的是在应用程序所在的服务器内...

腾讯云国际站:腾讯云服务器如何配置Redis缓存?

本文由【云老大】TG@yunlaoda360撰写一、安装Redis使用包管理器安装(推荐)在CentOS系统中,可以通过yum包管理器安装Redis:sudoyumupdate-...

Spring Boot3 整合 Redis 实现数据缓存,你做对了吗?

你是否在开发互联网大厂后端项目时,遇到过系统响应速度慢的问题?当高并发请求涌入,数据库压力剧增,响应时间拉长,用户体验直线下降。相信不少后端开发同行都被这个问题困扰过。其实,通过在SpringBo...

【Redis】Redis应用问题-缓存穿透缓存击穿、缓存雪崩及解决方案

在我们使用redis时,也会存在一些问题,导致请求直接打到数据库上,导致数据库挂掉。下面我们来说说这些问题及解决方案。1、缓存穿透1.1场景一个请求进来后,先去redis进行查找,redis存在,则...

Spring boot 整合Redis缓存你了解多少

在前一篇里面讲到了Redis缓存击穿、缓存穿透、缓存雪崩这三者区别,接下来我们讲解Springboot整合Redis中的一些知识点:之前遇到过,有的了四五年,甚至更长时间的后端Java开发,并且...

揭秘!Redis 缓存与数据库一致性问题的终极解决方案

在现代软件开发中,Redis作为一款高性能的缓存数据库,被广泛应用于提升系统的响应速度和吞吐量。然而,缓存与数据库之间的数据一致性问题,一直是开发者们面临的一大挑战。本文将深入探讨Redis缓存...

高并发下Spring Cache缓存穿透?我用Caffeine+Redis破局

一、什么是缓存穿透?缓存穿透是指查询一个根本不存在的数据,导致请求直接穿透缓存层到达数据库,可能压垮数据库的现象。在高并发场景下,这尤其危险。典型场景:恶意攻击:故意查询不存在的ID(如负数或超大数值...

Redis缓存三剑客:穿透、雪崩、击穿—手把手教你解决

缓存穿透菜小弟:我先问问什么是缓存穿透?我听说是缓存查不到,直接去查数据库了。表哥:没错。缓存穿透是指查询一个缓存中不存在且数据库中也不存在的数据,导致每次请求都直接访问数据库的行为。这种行为会让缓存...

Redis中缓存穿透问题与解决方法

缓存穿透问题概述在Redis作为缓存使用时,缓存穿透是常见问题。正常查询流程是先从Redis缓存获取数据,若有则直接使用;若没有则去数据库查询,查到后存入缓存。但当请求的数据在缓存和数据库中都...

Redis客户端缓存的几种实现方式

前言:Redis作为当今最流行的内存数据库和缓存系统,被广泛应用于各类应用场景。然而,即使Redis本身性能卓越,在高并发场景下,应用于Redis服务器之间的网络通信仍可能成为性能瓶颈。所以客户端缓存...

Nginx合集-常用功能指导

1)启动、重启以及停止nginx进入sbin目录之后,输入以下命令#启动nginx./nginx#指定配置文件启动nginx./nginx-c/usr/local/nginx/conf/n...

腾讯云国际站:腾讯云怎么提升服务器速度?

本文由【云老大】TG@yunlaoda360撰写升级服务器规格选择更高性能的CPU、内存和带宽,以提供更好的处理能力和网络性能。优化网络配置调整网络接口卡(NIC)驱动,优化TCP/IP参数...

雷霆一击服务器管理员教程

本文转载莱卡云游戏服务器雷霆一击管理员教程(搜索莱卡云面版可搜到)首先你需要给服务器设置管理员密码,默认是空的管理员密码在启动页面进行设置设置完成后你需要重启服务器才可生效加入游戏后,点击键盘左上角E...

取消回复欢迎 发表评论: