linux安装后需要进行的一些基本设置

修改网络:

在终端中输入:vi /etc/sysconfig/network-scripts/ifcfg-ens33

 

 然后重启网络服务:systemctl restart network.service

更新该Liunx系统的内核版本:

  yum update

关闭防火墙

  1:查看防火状态

      systemctl status firewalld

      service  iptables status

  2:暂时关闭防火墙

      systemctl stop firewalld

      service  iptables stop

  3:永久关闭防火墙

      systemctl disable firewalld (我用的这个)

      chkconfig iptables off

  4:重启防火墙

      systemctl enable firewalld

      service iptables restart  

  5:永久关闭后重启

      chkconfig iptables on

关闭selinux

  1.使用 vi /etc/sysconfig/selinux。

  2.将 SELINUX=enforcing 改为 SELINUX=disabled 。3.修改完成后,重启计算机reboot或init6。

安装net-tools:

  yum install -y net-tools  不然无法使用ifconfig命令

安装wget:

  yum install -y wget  

安装vim

  yum install -y vim-enhanced

换源

  如同windows的软件管家,我们需要安装软件就要从软件管家下载后安装。linux也同样需要软件源,但是linux自带的源地址在国外,我们从国外的服务器连接很慢,所以在我们一般拿到linux进行工作的时候一般第一步要替换默认的源

  先进入源的目录   # cd /etc/yum.repos.d

  备份一下官方源   # mv CentOS-Base.repo CentOS-Base.repo.bak 

  将阿里源文件下载下来  # wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 

  重建源数据缓存 

    1. yum clean all # 清除缓存
    2. yum makecache

安装lrzsz

  yum install -y lrzsz

原文地址:https://www.cnblogs.com/liuyanan/p/12002235.html