分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 运营维护

第三方http网络yum仓库

发布时间:2023-09-06 01:27责任编辑:沈小雨关键词:http
关闭防火墙执行如下操作

1安装http服务包

[root@centos7 ~]#yum -y install httpd       httpd包有依赖性 使用yum安装

[root@centos7 ~]#rpm -ql httpd

……

/usr/lib/systemd/system/httpd.service

……

/var/www/html

[root@centos7 ~]#systemctl start httpd.service

[root@centos7 ~]#systemctl enable httpd.service

[root@centos7 ~]#ss -tnl

State      Recv-Q Send-Q          Local Address:Port                         Peer Address:Port             

LISTEN     0      5               192.168.122.1:53                                      *:*                 

LISTEN     0      128                         *:22                                      *:*                 

LISTEN     0      128                 127.0.0.1:631                                     *:*                 

LISTEN     0      128                        :::80                                     :::*                  80端口打开

LISTEN     0      32                         :::21                                     :::*                 

LISTEN     0      128                        :::22                                     :::*   

[root@centos7 ~]#vim /var/www/html/index.html

[root@centos7 ~]#cat /var/www/html/index.html

<h1>hello,world</h1>

2准备第三方rpm相关包

[root@centos7 html]#mkdir app

 [root@centos7 html]cd app

[root@centos7 app]#cp -rf /run/media/root/CentOS\ 7\ x86_64/Packages/* .  

[root@centos7 app]#createrepo /var/www/html/app    在app下创建repodata元数据文件包

Spawning worker 0 with 683 pkgs

Spawning worker 1 with 683 pkgs

Spawning worker 2 with 683 pkgs

Spawning worker 3 with 682 pkgs

3搭建客户端

[root@centos7 app]#vim /etc/yum.repos.d/html.repo

[centos-html]

name=repulic

baseurl=http://172.18.254.154/app              仓库路径为repodata的所在目录          

gpgcheck=0


第三方http网络yum仓库

原文地址:http://blog.51cto.com/13157015/2044478

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved