首页 > 编程知识 正文

升级不成功是否开启tftp服务器,tftp服务器怎么用

时间:2023-05-03 13:48:02 阅读:117746 作者:4801

可以通过在线下载tftp-server和xinetd获取rpm安装软件包,也可以从现有的CentOs系统获取脱机安装软件包。

在此,它用于从现有CentOs系统检索rpm软件包。

将yum配置文件/etc/yum.conf更改为

[main]#缓存路径cachedir=/var/cache/yum/$ basearch/$ releasever #如果原始值为0,则表示删除软件包;如果为1,则表示下载后不删除。 在此将其称为1 keep cache=1debug level=2log file=/var/log/yum.logexactarch=1obsoletes=1gpg check=1plugins=1install ons category=yumdistroverpkg=centos-release # thisisthedefault, ifyoumakethisbiggeryumwon ' tseeifthemetadata # isnewerontheremoteandsoyou ' ll ' gain ' thebandwidthofnothavingto # downloadthenewmetadataand ' pay ' foritbyumnothavingcorrect # information.# itis esp.important,to have correct metadata, fordistributionslike # fedorawhichdon ' tkeepoldpackagesaround.if you don ' tlikethischecking # interuptingyourcommandlineusagesaged manuallycheckthemetadataonceanhour (yum-updatesdwilldothis ) # metadata _ expire=90m # putyourreposhereorinseparatefilestefileshire

yum clean allyum makecache然后通过yum下载tftp-server和新ted。 下载完成后,可以在系统的相应目录中找到rpm软件包。 以我的系统为例,我是CentOs7 X86。 因此,我的目录是/var/cache/yum/xache。

yum install-y TFTP-serveryuminstall-yx inted安装tptp-server将检索到的rpm软件包放在需要脱机安装的服务器上,然后进行脱机安装

安装yum local install-y TFTP-serveryumlocalinstall-y xinetd后,将xinetd设置为打开并自行启动

复盖或更改systemctlenablexinetd.service TFTP配置文件/etc/xinetd.d/tftp。 内容如下

# default : off # description : thetftpserverservesfilesusingthetrivialfiletransfer# protocol.thetftprotocolisoftenter #workstations,downloadconfigurationfilestonetwork-aware打印机# andtostarttheinstallationprocessforsomeoperatingsystems 在此变更为“否”。 即,tftp服务器# server_args tftp文件夹service TFTP { socket _ type=dgram protocol=UDP wait=yesuser=root server=/usr /

将systemctlrestartxinetd.service selinux设置为永久模式

在setenforce 0中,可以使用getenforce命令显示SeLinux的状态。 此外,在替换配置文件/etc/sysconfig/selinux并重新启动后也会生效。 配置文件的内容如下

# thisfilecontrolsthestateofselinuxonthesystem.# selinux=cantakeoneofthesethreevalues 3360 # enforcing-selinuxsecuritypolypolue permissive-selinuxprintswarningsinsteadofenforcing.# disabled-noselinuxpolicyisloaded.selinux=permissive # selinux tynux targeted-targetedprocessesareprotected,# minimum-modificationoftargetedpolicy.onlyselectedprocessesareprotected.# ml

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。