Linux 常用工具
YUM
yum init system
create local repo yum
centos 7 init system
FTP
How to Install and Configure vsftpd on CentOS 6
vsftp install on centos 7
Email
aliyun ecs install email
postfix smtp on centos
centos 6 postfix smpt test
GIT
gogs install centos6
git command example
git format markdown
HTTP Web
apache exampe
h5ai web php file server
apache vhosgts code debug
Nginx Web
nginx install from source
nginx set directory autoindex
autoindex with h5ai web
nginx install pugin ngx-fancyindex
proxy internal vhost to web
dynamic and static by nginx
proxy directory second by nginx
nginx proxy gogs web
jenkns proxy from nginx
ssl certify by nginx
nginx threads fix to 9x
NTP
linux install ntp use asia date
VNC
vnc remote desktop
x11vnc on centos6
Firewall
iptables on centos 7
centos7 firewalld config
Kernel
centos kernel packages
kernel update to 3.10 on centos 6
SYSCTL 内核配置参数分析
NFS
centos6 install nfs servers
mount nfs to linux
mount nfs on centos 6
centos6 nfs verify permissions
SSH
ssh keygen rsa to client
ssh config diffent
Network
centos 7 config net-tool debug ifconfig
debug network card up or down
Samba
samba install on centos 6
samba config example
VIM
VIM using example
本文档使用 MrDoc 发布
-
+
首页
debug network card up or down
# debug network card --- ## 一、 打开gnome-terminal ## 二、 切换成root 身份 ## 三、关闭NetworkManager 服务,NetworkManager 服务会干扰网络配置,必须把它关闭 # /etc/init.d/NetworkManager stop # service NetworkManager stop # chkconfig NetworkManager off ## 四、 确定网卡的名字,用以下命令列出所有的网卡,名字形如ethX的就是我们将要操作的网卡 [root@mob ~]# ifconfig -a ```bash eth0 Link encap:Ethernet HWaddr 08:00:27:69:90:F2 inet addr:10.81.234.228 Bcast:10.81.235.255 Mask:255.255.254.0 inet6 addr: fe80::a00:27ff:fe69:90f2/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:35764 errors:0 dropped:0 overruns:0 frame:0 TX packets:648 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:3632415 (3.4 MiB) TX bytes:68171 (66.5 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:8 errors:0 dropped:0 overruns:0 frame:0 TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:480 (480.0 b) TX bytes:480 (480.0 b) ``` ## 五、确认OK,以eth0 为例 # ifconfig eth0 up # mii-tool eth0 eth0: no autonegotiation, 100baseTx-FD, link ok # ←- 网线已经连好 [root@www ~]# [root@www ~]# mii-tool lo SIOCGMIIPHY on 'lo' failed: Operation not supported # ←- 网线没有连好 ## 六、 确认启动 动态取: ```bash DEVICE=eth0 HWADDR=08:00:27:69:90:F2 TYPE=Ethernet UUID=b57f9cf7-7ac7-4b56-b305-259c5d6e7909 ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=dhcp ``` 静态取: ```bash DEVICE=eth0 ←- 网卡名字 BOOTPROTO=static ←- 使用固定IP NM_CONTROLLED=no ONBOOT=yes ←- 自动启动 TYPE=Ethernet IPADDR=10.81.234.230 ←- IP 地址 NETMASK=255.255.0.0 ←- 子网掩码 GATEWAY=10.81.234.2 ←- 默认网关 DNS1=10.81.238.100 ←- DNS 服务器 ``` ## 七、 重启网络服务: # service network restart ## 八、 测试 测试是否能够连通网关 [root@www ~]# ping www.baidu.com ```bash PING www.a.shifen.com (103.235.46.39) 56(84) bytes of data. 64 bytes from 103.235.46.39: icmp_seq=1 ttl=44 time=115 ms 64 bytes from 103.235.46.39: icmp_seq=2 ttl=44 time=115 ms — www.a.shifen.com ping statistics — 2 packets transmitted, 2 received, 0% packet loss, time 1689ms rtt min/avg/max/mdev = 115.268/115.328/115.388/0.060 ms ``` ## 如果无法ping 通,请再次检查网线是否连接好 # mii-tool eth0 eth0: negotiated 100baseTx-FD flow-control, link ok ←- 网线已经连好 # mii-tool eth0 eth0: no link ←- 网线没有连好
Bobby
2021年12月21日 03:12
分享文档
收藏文档
阅读
166
上一篇
下一篇
微信扫一扫
复制链接
手机扫一扫进行分享
复制链接
关于 MrDoc
觅思文档MrDoc
是
州的先生
开发并开源的在线文档系统,其适合作为个人和小型团队的云笔记、文档和知识库管理工具。
如果觅思文档给你或你的团队带来了帮助,欢迎对作者进行一些打赏捐助,这将有力支持作者持续投入精力更新和维护觅思文档,感谢你的捐助!
>>>捐助鸣谢列表
微信
支付宝
QQ
PayPal
Markdown文件
分享
链接
类型
密码
更新密码