zoukankan      html  css  js  c++  java
  • 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
  • 相关阅读:
    CentOS7 linux下yum安装redis以及使用
    nssm 在windows上部署服务
    netcore 2.2 封装 AutoMapper
    git pull/push免密输入
    缓存常见问题
    批量维护关系数据
    测试跨域html
    ODBC配置
    spring boot监控之prometheus配置
    REST Client
  • 原文地址:https://www.cnblogs.com/xiaoyaodijun/p/9953321.html
Copyright © 2011-2022 走看看