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

 

posted @ 2018-11-13 17:20  逍遥帝君  阅读(793)  评论(0编辑  收藏  举报