我是靠谱客的博主 忧伤镜子,这篇文章主要介绍Centos8搭建本地yum源搭建yum,现在分享给大家,希望可以做个参考。

搭建yum

Centos8

先添加Centos6.7.8的光盘

搭建yum可用使用http,ftp,htps

复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
12:20:02 root@Centos8[ ~]#dnf repolist //查看yum的所有的库 CentOS-8 - AppStream 1.5 kB/s | 4.3 kB 00:02 CentOS-8 - Base 1.4 kB/s | 3.9 kB 00:02 CentOS-8 - Extras 601 B/s | 1.5 kB 00:02 repo id repo name status AppStream //库名称 CentOS-8 - AppStream 5,089 //包的数量 BaseOS CentOS-8 - Base 2,843 extras CentOS-8 - Extras

下载httpd软件

yum不支持并行

复制代码
1
2
[12:22:53 root@Centos8[ ~]#dnf install -y httpd

禁用sellinux

复制代码
1
2
[12:41:48 root@Centos8[ ~]#setenforce 0 //临时禁用
复制代码
1
2
3
[19:52:26 root@Centos8[ ~]#vim /etc/selinux/config [19:55:19 root@Centos8[ ~]#

禁用防火墙

复制代码
1
2
3
4
5
6
7
[12:32:56 root@Centos8[ ~]#systemctl enable --now httpd Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service. [12:33:18 root@Centos8[ ~]#systemctl disable --now firewalld Removed /etc/systemd/system/multi-user.target.wants/firewalld.service. Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service. [12:36:43 root@Centos8[ ~]#
复制代码
1
2
3
[19:56:17 root@Centos8[ ~]#iptables -F //强制关闭防火墙 [19:56:23 root@Centos8[ ~]#iptables -vnL //查看

创建文件夹

复制代码
1
2
3
4
[12:43:53 root@Centos8[ html]#mkdir centos/{6,7}/os/x86_64 -pv //创建centos6,7的文件夹-pv创建多个文件并显示过程 [12:47:30 root@Centos8[ html]#mkdir centos/8/ -pv

启动httpd

复制代码
1
2
3
4
[19:58:15 root@Centos8[ ~]#systemctl enable --now httpd //启动命令 Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service. [20:00:18 root@Centos8[ ~]#

挂载光盘

复制代码
1
2
3
4
5
6
[12:51:59 root@Centos8[ ~]# mount /dev/sr0 /var/www/html/centos/6/os/x86_64/ mount: /var/www/html/centos/6/os/x86_64: WARNING: device write-protected, mounted read-only. [12:52:28 root@Centos8[ ~]# mount /dev/sr2 /var/www/html/centos/7/os/x86_64/ mount: /var/www/html/centos/7/os/x86_64: WARNING: device write-protected, mounted read-only. [12:53:48 root@Centos8[ ~]# mount /dev/sr1 /var/www/html/centos/8

最后

以上就是忧伤镜子最近收集整理的关于Centos8搭建本地yum源搭建yum的全部内容,更多相关Centos8搭建本地yum源搭建yum内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(92)

评论列表共有 0 条评论

立即
投稿
返回
顶部