CentOS 7 最小安装 功能扩展

首先,我们使用centos一般使用yum安装文件,其条件:

1:必须能接入互联网;(设置ip

2:有yum功能插件。(可手动下载安装)

注:没有ifconfig可以用ip addr和ip link可以查看,使用ifconfig:

需要安装“net-tools”,执行下命令,会报错:

扩展功能:

网络:net-tools 

编辑器[option]:vim

编译器:c/c++: gcc /gcc-c++

[root@localhost ~]#  yum install -y net-tools

One of the configured repositories failed (未知),
 and yum doesn't have enough cached data to continue. At this point the only
 safe thing yum can do is fail. There are a few ways to work "fix" this:
 ....
 Cannot find a valid baseurl for repo: base/7/x86_64

解决:

在域名服务器配置中,添加一个8.8.8.8(或者其他),就解决了:
# vi /etc/resolv.conf  
add:
#Generated by NetworkManager  
nameserver 8.8.8.8  


之后,yum使用正常。

yum更新失败问题解决:Linux使用错误小结(CentOS)- yum更新软件失败

安装vim,编辑文本:

[root@localhost ~]#  yum -y  install vim*

vim安装问题失败: Linux使用错误小结(CentOS)- vim安装问题: Error: Nothing to do

安装GCC软件套件,C语言编写程序运行:

[root@localhost sshpass-1.05]# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/home/install-files/sshpass-1.05':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details

[root@localhost ~]# yum install gcc

[root@localhost ~]# yum -y install gcc-c++
[root@Master scripts]# yum install -y perl-Module-Install.noarch

设置ip错误1:

CentOS Linux解决Device eth0 does not seem to be present

Bringing up interface eth0:  Device eth0 does not seem to be present,delaying initialization.

解决:

cd /etc/udev/rules.d/70-persistent-net.rules
记录eth1网卡的mac地址00:0c:29:50:bd:17
cd //etc/sysconfig/network-scripts/ifcfg-eth0
将 DEVICE="eth0"  改成  DEVICE="eth1"  ,
将 HWADDR="00:0c:29:8f:89:97" 改成上面的mac地址  HWADDR="00:0c:29:50:bd:17"
重启网络: service network restart


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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值