阿里云YUM源配置

阿里云YUM源配置

今天,打开我的Centos7系统,美滋滋要搭建一波LAMP环境。一把梭哈。
yum -y install httpd mariadb mariadb-server php php-mysql
奈何,
报错
百度之,应该是要配个YUM源了。

1.备份原有yum源

虽说,原有不给力,但是好歹之后有个恢复正常的东西。备份一下
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak

2.根据自己系统下载yum源

使用wget命令即可完成下载。
为Centos6下载:
wget -P /etc/yum.repo.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
为Centos7下载:
wget -P /etc/yum.repo.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

3.重新加载yum

yum clean all
yum makecache

0x00.

repo文件是yum源的配置文件,repo定义了从何处下载及安装,定义了多个软件仓库的细节内容。

rpm常用命令

rpm -aq httpd* 	//查询所有关于httpd的安装包
rpm -aqi httpd* 	//查询所有httpd安装包的相关详细信息
rpm -qf `which httpd` //查询某文件的安装包
-------------------------------------------------------------------
[root@Anu /]#  rpm -aq httpd*
httpd-2.4.6-93.el7.centos.x86_64
httpd-tools-2.4.6-93.el7.centos.x86_64
------------------------------------------------------------------
[root@Anu /]#  rpm -aqi httpd*
Name        : httpd
Version     : 2.4.6
Release     : 93.el7.centos
Architecture: x86_64
Install Date: 2020年08月26日 星期三 09时44分21秒
Group       : XXX
Size        : 9821040
License     :XXX
Signature   : XXXX
Source RPM  : httpd-2.4.6-93.el7.centos.src.rpm
Build Date  : XXXX
Build Host  : x86-01.bsys.centos.org
Relocations : (not relocatable)
Packager    : CentOS BuildSystem <http://bugs.centos.org>
Vendor      : CentOS
URL         : http://httpd.apache.org/
Summary     : Apache HTTP Server
Description :
The Apache HTTP Server is a powerful, efficient, and extensible
web server.

------------------------------------------------------------------
Name        : httpd-tools
Version     : 2.4.6
Release     : 93.el7.centos
Architecture: x86_64
Install Date: XXXX
Group       :XXXXXX
Size        : 172471
License     : ASL 2.0
Signature   : XXXXXX
Source RPM  : httpd-2.4.6-93.el7.centos.src.rpm
Build Date  : XXXXXXXX
Build Host  : x86-01.bsys.centos.org
Relocations : (not relocatable)
Packager    : CentOS BuildSystem <http://bugs.centos.org>
Vendor      : CentOS
URL         : http://httpd.apache.org/
Summary     : Tools for use with the Apache HTTP Server
Description :
The httpd-tools package contains tools which can be used with
the Apache HTTP Server.

[root@Anu /]# rpm -qf `which httpd`
httpd-2.4.6-93.el7.centos.x86_64

期间发现网络总是不通
解决方法将网卡删掉:

//centos7 安装后发现会多出来一个IP地址,网卡是virbr0
1.关闭:
ifconfig virbr0 down

2.删除:
brctl delbr virbr0

3.删除服务,virbr0是由libvirtd服务创建:
systemctl disable libvirtd

  • 5
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值