本地yum仓库
自制YUM仓库
YUM仓库配置文件
[base]
name=CentOS-$releasever - Base - mirrors.aliyun.com
baseurl=http://mirrors.aliyun.com/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
YUM仓库类型
http:// 端口:80
https:// 端口:443
ftp:// 端口:21
file:// 没有端口(本地协议)
本地YUM仓库(file://)
1)创建仓库的命令
- createrepo
2)还要有rpm包
- 网站获取
- 镜像获取
- yum源获取
3)yum源的配置文件
[root@localhost ~]
mount: /dev/sr0 is write-protected, mounting read-only
[root@localhost ~]
[root@localhost ~]
[root@localhost ~]
Spawning worker 0 with 4021 pkgs
Workers Finished
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete
[root@localhost ~]
drwxr-xr-x 2 root root 4096 Apr 25 10:10 /local_yum_repo/repodata/
[root@localhost ~]
[root@localhost ~]
[zls_local]
name=Local Repository By zls
baseurl=file:///local_yum_repo
gpgcheck=0
enabled=1
[root@localhost ~]
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
base_local
| 2.9 kB 00:00:00
base_local/primary_db
| 3.1 MB 00:00:00
repo id repo name status
base_local Local Repository By base enabled: 4,02
远程yum仓库
1)创建仓库的命令
- createrepo
2)还要有rpm包
- 网站获取
- 镜像获取
- yum源获取
3)yum源的配置文件
[root@localhost ~]
[root@localhost ~]
mount: /dev/sr0 is write-protected, mounting read-only
[root@localhost ~]
[root@localhost ~]
如果没有netstat 命令,则需要安装
[root@localhost ~]
[root@localhost ~]
[root@localhost ~]
tcp6 0 0 :::21 :::* LISTEN 7763/vsftpd
ftp://IP
[root@localhost ~]
[root@localhost ~]
[root@localhost ~]
[root@localhost ~]
drwxr-xr-x 2 root root 6 Apr 25 11:13 base
drwxr-xr-x 2 root root 6 Apr 25 11:13 epel
[root@localhost ~]
[root@localhost ~]
[root@localhost pub]
Spawning worker 0 with 4021 pkgs
Workers Finished
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete
[root@localhost pub]
Spawning worker 0 with 2 pkgs
Workers Finished
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete
[root@localhost pub]
[base_local]
name=this is hjx de base
baseurl=ftp://var/ftb/pub/base
gpgcheck=0
enabled=1
[root@localhost pub]
[repo_local]
name=this is hjx de base
baseurl=ftp://var/ftb/pub/repo
gpgcheck=0
enabled=1
[root@localhost ~]
[root@localhost ~]
[root@localhost ~]
作业
✓ 17:37:57 root@localhost.localdomain,10.0.0.167:~
[root@localhost ~]
[root@localhost ~]
[root@localhost pub]
mount: /dev/sr0 is write-protected, mounting read-only
[root@localhost pub]
[root@localhost pub]
[root@localhost pub]
Spawning worker 0 with 4021 pkgs
Workers Finished
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete
[root@localhost pub]
Spawning worker 0 with 2 pkgs
Workers Finished
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete
[root@localhost pub]
[base_local]
name=this is hjx de base
baseurl=ftp://var/ftb/pub/base
gpgcheck=0
enabled=1
[root@localhost pub]
[repo_local]
name=this is hjx de base
baseurl=ftp://var/ftb/pub/repo
gpgcheck=0
enabled=1
[root@localhost ~]
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 【自荐】一款简洁、开源的在线白板工具 Drawnix
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
· Docker 太简单,K8s 太复杂?w7panel 让容器管理更轻松!