zoukankan      html  css  js  c++  java
  • linux系统的初化始配置

    一:网络配置

    临时生效:

    第一种:ifconfig eno16777736(网卡名) 192.168.100.137 netmask 255.255.255.0 up(开启网卡)
    第二种:ifconfig eno16777736(网卡名) 192.168.100.137/24 up(开启网卡)

    网络配置永久生效:

    第一步:打开网卡配置文件:

    [root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eno16777736 

    配置文件改完后保存退出。

    systemctl  restart network.service

    二:主机名的修改

    临时生效:hostname jw37

    永久生效:vi /etc/hostname

    修改配置文件后保存退出。

     三.关闭firewalld和selinux

    临时生效:

    firewalld

    [root@37jw ~]# systemctl stop firewalld.service   #立即生效但是开机时仍会启动

    selinux是一种安全子系统它能控制程序只能访问特定文件。

    [root@37jw ~]# setenforce 0   #0 :转成 permissive 宽容模式
    [root@37jw ~]# getenforce     #查看Selinux的模式
    Permissive 
    [root@37jw ~]# setenforce 1   #1:转成enforcing强制模式
    [root@37jw ~]# getenforce  
    Enforcing

    永久生效:

    firewalld

    [root@37jw ~]# systemctl disable firewalld.service   #开机时不会再自动启动,但是当前的状态仍然开启.

    selinux

    [root@37jw ~]# vi /etc/selinux/config

        将SELINUX=enforcing 改为 SELINUX=disabled

        {(SELINUX=enforcing     <==调整 enforcing|disabled|permissive

        SELINUXTYPE=targeted  <==目前仅有 targeted 与 strict)

        enforcing:强制模式,代表 SELinux 运作中,且已经正确的开始限制 domain/type 了;

      permissive:宽容模式:代表 SELinux 运作中,不过仅会有警告讯息并不会实际限制 domain/type 的存取。
                 这种模式可以运来作为 SELinux 的 debug 之用;
      disabled:关闭,SELinux 并没有实际运作。}
  • 相关阅读:
    ASP设计常见问题及解答精要
    网页脚本加密解密
    有关表格边框的css样式表语法说明
    彻底搞定 Grub
    三千年来振奋过中国人的29句口号(是中国人就看看!)
    在Unix/Linux上令(java)JVM支持中文输出
    windows xp 下eclipse3.0.2+eclipseme+j2me wireless tooltik开发环境的配置
    在网页上显示公式
    Oracle认证考试详细介绍
    算法和数据结构排序快速排序
  • 原文地址:https://www.cnblogs.com/zxbdbk/p/5971264.html
Copyright © 2011-2022 走看看