阅读量:0
1.插⼊优盘,读取优盘数据
2.在vmware配置光盘iso⽂件,在linux系统中读取光盘⽂件
步骤一:在虚拟机上查看网络适配器的状态是否连接 步骤二:查看光盘读取情况 步骤三:查看挂载情况3.配置阿⾥云yum仓库
(1)官方搜索 (2)在官方文件找到centos7 (3)回到虚拟机使用weget下载 (4)清除缓存,然后生成缓存 (5)查看仓库状态4.配置清华镜像仓库
(1)编辑新的配置文件(2)清除yum缓存
(3)在yum makecache 之前必须有自己的仓库不然不成功
就像这样:
(4)有了仓库之后就OK了
5.配置腾讯镜像仓库
(1)下载腾讯云的 yum 源配置文件(2)清除 yum 缓存:
(3)更新 yum 缓存:
(4)验证
6.⾃建仓库 包含 net-tools bash-completion nginx tree等包
(1)配置文件定义软件包缓存路径vim /etc/yum.conf[main] [main] cachedir=/var/cache/yum/$basearch/$releasever #修改为1 keepcache=1 debuglevel=2 logfile=/var/log/yum.log exactarch=1 obsoletes=1 gpgcheck=1 plugins=1 installonly_limit=5 bugtracker_url=http://bugs.centos.org/set_project.php? project_id=23&ref=http://bugs.centos.org/bug_report_page.php? category=yum distroverpkg=centos-release(2)先卸载nginx,再安装nginx
卸载nginx yum -y remove nginx
重新安装nginx yum -y install nginx查找安装包
[root@localhost ~]# find /var/cache/ -name "*tree*" -type f /var/cache/yum/x86_64/7/os/packages/tree-1.6.0-10.el7.x86_64.rpm [root@localhost ~]# find /var/cache/ -name "*nginx*" -type f /var/cache/yum/x86_64/7/nginx-stable/packages/nginx-1.26.1- 2.el7.ngx.x86_64.rpm只下载不安装
[root@localhost ~]# yum install --downloadonly --downloaddir=./soft samba安装createrepo制作仓库的软件
[root@localhost ~]# yum -y install createrepo 已加载插件:fastestmirror Loading mirror speeds from cached hostfile 正在解决依赖关系 --> 正在检查事务 ---> 软件包 createrepo.noarch.0.0.9.9-28.el7 将被 安装 --> 正在处理依赖关系 python-deltarpm,它被软件包 createrepo-0.9.9- 28.el7.noarch 需要 --> 正在处理依赖关系 libxml2-python,它被软件包 createrepo-0.9.9- 28.el7.noarch 需要 --> 正在处理依赖关系 deltarpm,它被软件包 createrepo-0.9.9-28.el7.noarch 需要 --> 正在检查事务 ---> 软件包 deltarpm.x86_64.0.3.6-3.el7 将被 安装 ---> 软件包 libxml2-python.x86_64.0.2.9.1-6.el7_9.6 将被 安装 ---> 软件包 python-deltarpm.x86_64.0.3.6-3.el7 将被 安装 --> 解决依赖关系完成把soft⽂件夹做成⼀个本地的⾃建仓库
[root@localhost ~]# createrepo soft/ Spawning worker 0 with 19 pkgs Workers FinishedSaving Primary metadata Saving file lists metadata Saving other metadata Generating sqlite DBs Sqlite DBs complete[root@localhost ~]# ls folder mysqlcommunity-libs-8.4.1-1.el7.aarch64.rpm mysql84-community-release-el7-1.noarch.rpm mysql-community-libs-compat-8.4.1-1.el7.aarch64.rpm mysql-community-client-8.4.1-1.el7.aarch64.rpm mysql-community-server-8.4.1-1.el7.aarch64.rpm mysql-community-client-plugins-8.4.1-1.el7.aarch64.rpm mysql-community-server-debug-8.4.1-1.el7.aarch64.rpm mysql-community-common-8.4.1-1.el7.aarch64.rpm rpm-4.16.1.3- 25.el9.src.rpm mysql-community-devel-8.4.1-1.el7.aarch64.rpm rpmbuild mysql-community-embedded-compat-8.4.1-1.el7.aarch64.rpm soft mysql-community-icu-data-files-8.4.1-1.el7.aarch64.rp3.在/etc/yum.repos.d/下创建soft.repo
vim /etc/yum.repos.d/soft.repo [soft] name=soft_local gpgcheck=0 baseurl=file:///root/soft enable=1清理缓存 [root@localhost soft]# yum clean all 已加载插件:fastestmirror 正在清理软件源: soft Cleaning up list of fastest mirrors Other repos take up 748 M of disk space (use --verbose for details)
创建缓存[root@localhost soft]# yum makecache 已加载插件:fastestmirror Determining fastest mirrors soft | 2.9 kB 00:00:00 (1/3): soft/filelists_db | 6.6 kB 00:00:00 (2/3): soft/other_db | 10 kB 00:00:00 (3/3): soft/primary_db | 33 kB 00:00:00
元数据缓存已建⽴# 再次安装samba [root@localhost soft]# yum -y install samba 已加载插件:fastestmirror Loading mirror speeds from cached hostfile 正在解决依赖关系 --> 正在检查事务 ---> 软件包 samba.x86_64.0.4.10.16-25.el7_9 将被 安装 --> 正在处理依赖关系 samba-libs = 4.10.16-25.el7_9,它被软件包 samba-4.10.16- 25.el7_9.x86_64 需要 --> 正在处理依赖关系 samba-common-tools = 4.10.16-25.el7_9,它被软件包 samba- 4.10.16-25.el7_9.x86_64 需要 --> 正在处理依赖关系 samba-common-libs = 4.10.16-25.el7_9,它被软件包 samba- 4.10.16-25.el7_9.x86_64 需要 --> 正在处理依赖关系 samba-common = 4.10.16-25.el7_9,它被软件包 samba- 4.10.16-25.el7_9.x86_64 需要 --> 正在处理依赖关系 samba-common = 4.10.16-25.el7_9,它被软件包 samba- 4.10.16-25.el7_9.x86_64 需要 --> 正在处理依赖关系 samba-client-libs = 4.10.16-25.el7_9,它被软件包 samba- 4.10.16-25.el7_9.x86_64 需要 --> 正在处理依赖关系 libwbclient = 4.10.16-25.el7_9,它被软件包 samba- 4.10.16-25.el7_9.x86_64 需要下载不安装以下指令
yum install --downloadonly --downloaddir=./soft tree
yum install --downloadonly --downloaddir=./soft net-tools
yum install --downloadonly --downloaddir=./soft bash-completion
yum install --downloadonly --downloaddir=./soft nginx [root@ddnn soft]# ls
bash-completion-2.1-8.el7.noarch.rpm
net-tools-2.0-0.25.20131004git.el7.x86_64.rpm
nginx-1.26.1-2.el7.ngx.x86_64.rpm