• Linux服务器常用工具


    一、Ubuntu18版本 服务器

    1)替换源。将原有的源注释掉

    vi /etc/apt/sources.list 
    
    
    deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
    
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
    
    deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
    
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
    
    deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
    
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
    
    deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
    
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
    
    deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
    
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse

    2)安装yum

    apt-get install build-essential
    
    apt install  yum

    3)安装防火墙命令

    apt install firewalld

     4)修改ip地址

    vi /etc/netplan/50-cloud-init.yaml
    network:
        ethernets:
            ens33:
                addresses: [192.168.x.xx/24]
                gateway4:  192.168.xx.x
                dhcp4: no
        version: 2

    切换dns

    vi /etc/resolv.conf
    nameserver 8.8.8.8

     5)ifconfig 命令工具

    yum install net-tools

     6)压缩

    yum install -y unzip zip

    7)系统时间

    yum install ntpdate

     8)允许root登录

    vi /etc/ssh/sshd_config
    PermitRootLogin yes (默认为#PermitRootLogin prohibit-password)

      更新服务

    service ssh restart

    二、Centos切换root

    sudo passwd root
  • 相关阅读:
    Service Mesh vs SideCar
    云原生应用
    js 中继承的几种方式
    js 中call,apply,bind的区别
    js中的原型
    ES6 中的let 声明变量
    react native 中的redux
    css 中的伪类选择器before 与after
    js中数组遍历的几种方法及其区别
    js中一些常见写法的含义
  • 原文地址:https://www.cnblogs.com/xiaoyaodijun/p/9953321.html
Copyright © 2020-2023  润新知