小男孩‘自慰网亚洲一区二区,亚洲一级在线播放毛片,亚洲中文字幕av每天更新,黄aⅴ永久免费无码,91成人午夜在线精品,色网站免费在线观看,亚洲欧洲wwwww在线观看

分享

CentOS 7 配置網(wǎng)卡

 rongq2007 2019-08-14

VM安裝了一個Linux系統(tǒng)CentOS,但是安裝后發(fā)現(xiàn)ping www.baidu.com 報錯 。查了一下發(fā)現(xiàn)需要配置網(wǎng)卡。

1.首先需要進入目錄 /etc/sysconfig/network-scripts

這里我的centos的 iso版本是:CentOS-7-x86_64-DVD-1708.iso。進入目錄之后可以看到有個ifcfg-ens33的文件。我們需要對這個文件做些修改。

2.vi ifcfg-ens33

這里主要需要修改幾個地方。

a.由于我要配置的靜態(tài)的IP,所以BOOTPROTO=static。

b.ONBOOT=yes。默認為no,開啟網(wǎng)絡連接。 

d.IPADDR,NETMASK,GATEWAY,DNS1,DNS2參考修改

7.重啟network service

service network restart.

8.測試ping

ping www.baidu.com

注:這里我VM里面的網(wǎng)卡配置的橋接方式。

centos7的網(wǎng)卡重啟方法

1、centos6的網(wǎng)卡重啟方法:service network restart
      
centos7的網(wǎng)卡重啟方法:systemctl restart network

2關閉防火墻并設置開機不啟動

查看防火墻狀態(tài):systemctl status firewalld.service
關閉:systemctl stop firewalld
開啟:systemctl start firewalld
開機自動關閉:systemctl disable firewalld
開機自動啟動:systemctl enable firewalld
查看開機是否啟動:chkconfig --list|grep network(RHLE6)

firewalld 基本使用
啟動: systemctl start firewalld
查看狀態(tài): systemctl status firewalld
停止: systemctl disable firewalld
禁用: systemctl stop firewalld

centos6

關閉虛擬機防火墻:

關閉命令:  service iptables stop

永久關閉防火墻:chkconfig iptables off

兩個命令同時運行,運行完成后查看防火墻關閉狀態(tài)

service iptables status

1 關閉防火墻-----service iptables stop 

2 啟動防火墻-----service iptables start 

3 重啟防火墻-----service iptables restart 

4 查看防火墻狀態(tài)--service iptables status 

5 永久關閉防火墻--chkconfig iptables off 

6 永久關閉后啟用--chkconfig iptables on

 ———————————————— 

SELinux

  • 臨時關閉SELinux 
    setenforce 0

  • 臨時打開SELinux 
    setenforce 1

  • 查看SELinux狀態(tài) 
    getenforce

  • 開機關閉SELinux 
    編輯/etc/selinux/config文件,如下圖,將SELINUX的值設置為disabled。下次開機SELinux就不會啟動了。

  安裝vim

yum install -y vim*

Vim 的全局配置一般在 /etc/vim/vimrc 或者 /etc/vimrc

VIM配置入門

centos7 Mariadb5.5升級到Mariadb10.2

    本站是提供個人知識管理的網(wǎng)絡存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權內(nèi)容,請點擊一鍵舉報。
    轉藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多