• 新安装SuSE后,配置IP相关参数


    配置IP,网关,DNS等相关信息

     /etc/sysconfig/network/

    suse-linux:~ # cd /etc/sysconfig/network/
    suse-linux:/etc/sysconfig/network # ll
    total 60
    -rw-r--r-- 1 root root 9692 Nov 24 04:30 config
    -rw-r--r-- 1 root root 11495 Nov 24 04:30 dhcp
    drwxr-xr-x 1 root root 40 Nov 24 04:30 if-down.d
    drwxr-xr-x 1 root root 66 Nov 24 04:30 if-up.d
    -rw-r--r-- 1 root root 206 Nov 30 21:45 ifcfg-eth0   (配置IP,子网掩码)
    -rw------- 1 root root 147 Nov 24 04:30 ifcfg-lo
    -rw-r--r-- 1 root root 21738 Oct 14 2016 ifcfg.template
    drwx------ 1 root root 0 Jun 27 2017 providers
    drwxr-xr-x 1 root root 206 Nov 24 04:30 scripts

    配置网关

    suse-linux:/etc/sysconfig/network # vim ifroute-eth0 # 这个文件需要自己创建
    default 192.168.10.2 - eth0

    配置DNS

    suse-linux:/etc/sysconfig/network # cat /etc/resolv.conf
    # Note: Manual change of this file disables netconfig too, but
    # may get lost when this file contains comments or empty lines
    # only, the netconfig settings are same with settings in this
    # file and in case of a "netconfig update -f" call.
    #
    ### Please remove (at least) this line when you modify the file!
    nameserver 192.168.10.2

    suse-linux:~ # systemctl restart network
    suse-linux:~ # ping www.baidu.com -w 1

    SSH

    suse-linux:~ # vim /etc/ssh/sshd_config # 下面两项打开注释,改为yes即可
    PermitRootLogin yes # 允许root用户登录
    PasswordAuthentication yes # 开启密码验证
    suse-linux:~ # systemctl restart sshd

    关闭防火墙(注意命令中的大小写敏感)

    'suse里面的防火墙名称是SuSEfirewall2,和centos不一样'
    suse-linux:~ # systemctl disbale SuSEfirewall2 --now
    suse-linux:~ # systemctl status SuSEfirewall2
    ● SuSEfirewall2.service - SuSEfirewall2 phase 2
    Loaded: loaded (/usr/lib/systemd/system/SuSEfirewall2.service; disabled; vendor preset: disabled)
    Active: inactive (dead)

  • 相关阅读:
    oracle数据库表导出
    oracle-11G转10G
    ORACLE-创建用户和表空间
    idea 自定义toString
    springboot整合 mybatis.generator
    Linux mysql8.0.11安装
    助教工作:关于如何使用python+excel快捷生成千帆竞发图
    升级MySQL至最新版本
    Zabbix与Zabbix-agent2部署
    Yarn 的使用
  • 原文地址:https://www.cnblogs.com/yujianadu/p/16363252.html
Copyright © 2020-2023  润新知