linux - 简单配置

  • 修改主机名:vim /etc/sysconfig/network
  • 修改网卡配置(静态):vim /etc/sysconfig/network-scripts/ifcfg-eth0

    DEVICE=eth0
    TYPE=Ethernet
    ONBOOT=yes
    NM_CONTROLLED=yes
    BOOTPROTO=static
    IPADDR=10.10.10.150
    NETMASK=255.255.255.0
    GATEWAY=10.10.10.2
    DNS1=114.114.114.114

  • 关闭防火墙:service iptables stop
  • 关闭f防火墙开机自启:chkconfig iptables off
  • 关闭selinux:vim /etc/seliunx/config SELINUX=disabled
  • 以命令行方式启动系统:vim /etc/inttab  id:3:initdefault:
  • 查看行号::set nu
  • 文件立即生效:source /etc/profile
  • 解压文件:tar -zxvf xxx -C xxx
  • 配置环境变量:vim /etc/profile
  • 配置域名IP映射:vim /etc/hosts
  • 复制文件到另一台服务器:scp file_name user_name@remote_ip:file_path
  • 复制文件夹到另一台服务器:scp -r file_name user_name@remote_ip:file_path
  • 同步时间:ntpdate -u ntp.api.bz

 

posted @ 2020-02-03 16:11  杨凯凡  阅读(87)  评论(0)    收藏  举报