How to set up minimal Redhat 7.3 - [2]configuration of Network

Question :
I have just setup on RHEL 7.0/CentOS 7.0 minimal server installation but I noticeifconfig andnetstatcommand not found. How to make those command available ?


Solution :
By default, ifconfig and netstat utility is not installed on RHEL 7.0/CentOS 7.0 minimal server installation. You need to installnet-tools utilitymanually, this include ifconfig and netstat command.


# ifconfig
-bash: ifconfig: command not found


1. Run installation command :
# yum install net-tools -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.biz.net.id
 * extras: mirror.smartmedia.net.id
 * updates: centos.biz.net.id
Resolving Dependencies
--> Running transaction check
---> Package net-tools.x86_64 0:2.0-0.17.20131004git.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
====================================================================================================
 Package              Arch              Version                               Repository       Size
====================================================================================================
Installing:
 net-tools            x86_64            2.0-0.17.20131004git.el7              base            304 k
Transaction Summary
====================================================================================================
Install  1 Package
Total download size: 304 k
Installed size: 917 k
Downloading packages:
warning: /var/cache/yum/x86_64/7/base/packages/net-tools-2.0-0.17.20131004git.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Public key for net-tools-2.0-0.17.20131004git.el7.x86_64.rpm is not installed
net-tools-2.0-0.17.20131004git.el7.x86_64.rpm                                | 304 kB  00:00:10
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Importing GPG key 0xF4A80EB5:
 Userid     : "CentOS-7 Key (CentOS 7 Official Signing Key) "
 Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
 Package    : centos-release-7-0.1406.el7.centos.2.3.x86_64 (@anaconda)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : net-tools-2.0-0.17.20131004git.el7.x86_64                                        1/1
  Verifying  : net-tools-2.0-0.17.20131004git.el7.x86_64                                        1/1
Installed:
  net-tools.x86_64 0:2.0-0.17.20131004git.el7
Complete!


2. Try ifconfig command :
# ifconfig
ens160: flags=4163  mtu 1500
        inet 192.168.0.18  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::20c:29ff:feba:3efe  prefixlen 64  scopeid 0x20
        ether 00:0c:29:ba:3e:fe  txqueuelen 1000  (Ethernet)
        RX packets 10357  bytes 9459534 (9.0 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 8239  bytes 2341646 (2.2 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
lo: flags=73  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10
        loop  txqueuelen 0  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


3. Try netstat command :
# netstat -plunt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1919/master
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1318/sshd
tcp6       0      0 ::1:25                  :::*                    LISTEN      1919/master
tcp6       0      0 :::22                   :::*                    LISTEN      1318/sshd
udp        0      0 0.0.0.0:47445           0.0.0.0:*                           572/avahi-daemon: r
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           572/avahi


4. Try get the ip of network by DHCP

in client node:

# dhclient

# ifconfig



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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值