ubuntu基础
下载地址:
http://cdimage.ubuntu.com/releases/
#:配置多网卡静态IP地址和路由 root@ubuntu:~# vim /etc/netplan/01-netcfg.yaml
network:
version: 2
renderer: networkd
ethernets:
eth0:
dhcp4: no
dhcp6: no
addresses: [192.168.7.101/21]
gateway4: 192.168.7.254
nameservers:
addresses: [172.16.0.1]
eth1:
dhcp4: no
dhcp6: no
addresses: [10.20.7.101/21]
routes:
- to: 172.16.20.0/16
via: 10.20.0.1
- to: 10.30.0.0/16
via: 10.20.0.1 #:重启网卡 root@ubuntu:~# netplan apply
#:单网卡桥接 root@ubuntu:~# vim /etc/netplan/01-netcfg.yaml
network:
version: 2
renderer: networkd
ethernets:
eth0:
dhcp4: no
dhcp6: no bridges:
br0:
dhcp4: no
dhcp6: no
addresses: [172.16.14.55/16]
gateway4: 172.16.0.1
nameservers:
addresses: [172.16.0.1]
interfaces:
- eth0
#:多网卡桥接
root@ubuntu:~# vim /etc/netplan/01-netcfg.yaml eth0:
dhcp4: no
dhcp6: no
eth1:
dhcp4: no
dhcp6: no bridges:
br0:
dhcp4: no
dhcp6: no
addresses: [172.16.14.55/16]
gateway4: 172.16.0.1
nameservers:
addresses: [172.16.0.1]
interfaces:
- eth0
br1:
dhcp4: no
dhcp6: no
addresses: [172.16.14.66/16]
gateway4: 172.16.0.1
interfaces:
- eth1
#:双网卡绑定 root@ubuntu:~# vim /etc/netplan/01-netcfg.yaml # For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
eth0:
dhcp4: no
dhcp6: no
eth1:
dhcp4: no
dhcp6: no bonds:
bond0:
interfaces:
- eth0
- eth1
addresses: [172.16.14.66/16]
gateway4: 172.16.0.1
nameservers:
addresses: [172.16.0.1, 180.76.76.76]
parameters:
mode: active-backup
mii-monitor-interval: 100
#: 内外网多网卡绑定
root@ubuntu:~# vim /etc/netplan/01-netcfg.yaml # This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
eth0:
dhcp4: no
dhcp6: no
eth1:
dhcp4: no
dhcp6: no
eth2:
dhcp4: no
dhcp6: no
eth3:
dhcp4: no
dhcp6: no bonds:
bond0:
interfaces:
- eth0
- eth1
addresses: [172.16.14.66/16]
gateway4: 172.16.0.1
nameservers:
addresses: [172.16.0.1, 180.76.76.76]
parameters:
mode: active-backup
mii-monitor-interval: 100 bond1:
interfaces:
- eth2
- eth3
addresses: [10.20.7.101/21]
parameters:
mode: active-backup
mii-monitor-interval: 100
软件包管理
#:修改yum源为阿里云的(参考阿里云官网:https://opsx.alibaba.com/mirror) root@ubuntu:~# vim /etc/apt/sources.list root@ubuntu:~# apt update 1 # apt list #列出已经安装的软件包
2 # apt install apache2 #安装软件包
3 # apt remove apache2 #卸载软件包但是保留配置文件
4 # apt purge apache2 #卸载软件包删除配置文件
5 # apt update #更新本地软件包列表索引,修改了apt仓库后必须执行
6 # apt upgrade #升级所有已安装且可升级到新版本的软件包
7 # apt-cache madison nginx #查看仓库中软件包有哪些版本可以安装
8 # apt install nginx=1.14.0-0ubuntu1.6 #安装软件包的时候指定安装具体的版本
系统优化
root@ubuntu:~# vim /etc/security/limits.conf
root soft core unlimited
root hard core unlimited
root soft nproc 1000000
root hard nproc 1000000
root soft nofile 1000000
root hard nofile 1000000
root soft memlock 32000
root hard memlock 32000
root soft msgqueue 8192000
root hard msgqueue 8192000 #:重启
ubuntu基础的更多相关文章
- 【Linux 操作系统】Ubuntu 基础操作 基础命令 热键 man手册使用 关机 重启等命令使用
. : 关机, 如果将Linux默认运行等级设置为0, 系统将无法启动; -- : 多用户模式, 允许使用网络文件系统, 一般不使用图形界面登陆就是这种模式; -- : 多用户图形界面模式, 该模式下 ...
- Ubuntu 基础操作 基础命令 热键 man手册使用 关机 重启等命令使用
. : 关机, 如果将Linux默认运行等级设置为0, 系统将无法启动; -- : 多用户模式, 允许使用网络文件系统, 一般不使用图形界面登陆就是这种模式; -- : 多用户图形界面模式, 该模式下 ...
- Ubuntu基础设定:openssh-server安装和使用
记录一下Ubuntu17.10的openssh-server的安装和使用.安装之后就可以使用ssh登陆Ubuntu了,所以是Ubuntu的基础设定之一. 事前准备 Ubuntu版本:17.10 dev ...
- Python笔记_第一篇_面向过程_第一部分_9.Ubuntu基础操作
第一部分 Ubuntu简介 Ubuntu(乌班图)是一个机遇Debian的以桌面应用为主的Linux操作系统,据说其名称来自非洲南部祖鲁语或科萨语的“Ubuntu”一词,意思是“人性”.“我的存在 ...
- Docker学习笔记之创建Ubuntu基础镜像
在创建基础镜像之前需要安装Bootstrap工具debootstrap,所以执行命令: sudo apt install debootstrap 软件安装完成后就可以使用debootstrap工具下载 ...
- Ubuntu基础命令
显示历史命令的时间戳 echo 'HISTTIMEFORMAT="%F %T "' >> ~/.bashrc 解压文件/打包文件夹 tar -zxvf folder ...
- Ubuntu基础教程——安装谷歌Chrome浏览器
对于刚刚开始使用Ubuntu并想安装谷歌Chrome浏览器的新用户来说,本文所介绍的方法是最快捷的.在Ubuntu上安装谷歌Chrome的方法有很多.一些用户喜欢直接在 谷歌Chrome下载页面 获得 ...
- coreos 创建使用密钥登陆的ubuntu 基础镜像
下载官方镜像 core@localhost ~ $ docker pull ubuntu:14.04 #假设官方下载较慢,可到www.dockerpool.com下载标准镜像 core@localho ...
- ubuntu 基础环境
一.序言 这里记录了安装ubuntu 系统,以及里面常用的东西,jdk,idea,maven,svn,git 等等工具的安装,因为这些动作不是经常操作的,因此这里做一个记录,方便新手或者忘记的时候看看 ...
- ubuntu基础知识与技巧
root用户与超级用户的切换 (1) sudo -i (2) sudo su (3) su root 安装升级 查看软件xxx安装内容 dpkg -L xxx 查找软件库中的软件 apt-cac ...
随机推荐
- Haar小波的理解
1. 首先理解L^2(R)的概念 L^2(R) 是一个内积空间的概念,表示两个无限长的向量做内积,张成的空间问题.也就是两个函数分别作为一个向量,这两个函数要是平方可积的.L^2(a,b)=<f ...
- 【高并发】深入解析Callable接口
大家好,我是冰河~~ 本文纯干货,从源码角度深入解析Callable接口,希望大家踏下心来,打开你的IDE,跟着文章看源码,相信你一定收获不小. 1.Callable接口介绍 Callable接口是J ...
- win10 python3.8 wxpython.whl 安装步骤
wxpython是python开发常用图形用户界面(GUI)工具之一,GUI因其直观便捷,对我们提高开发效率一定帮助.这里介绍一下新版本wxPython 4.0.1的安装过程及注意事项. 第1步:下 ...
- maven项目中 把依赖包打进jar包
在pom.xml文件中增加build配置 1 <build> 2 <plugins> 3 <plugin> 4 <artifactId>maven-as ...
- C语言二分查找法
参考了C语言中折半查找法(二分法)的实现 二分查找算法(C语言实现) 先附上代码 #include<stdio.h> int BinSearch(int arr[],int len,int ...
- 第三周PTA笔记 回文数+A-B(大数减法)+高精度除法+数楼梯(大数加法)
回文数 对于一个自然数n,若将n的各位数字反向排列所得的数n1与n相等,则称n为回文数,例如2332. 若给定一个N( 2<=N<=16)进制数M(M的长度在一百位以内),如果M不是回文数 ...
- python3下tomorow模块 @thread报语法错误def async(n, base_type, timeout=None): ^ SyntaxError: invalid syntax---解决方法
遇见问题:python使用tomorrow实现多线程,tomorrow模块的源代码报语法错误? 这是报错信息:Traceback (most recent call last): File &quo ...
- ICCV2021 | Vision Transformer中相对位置编码的反思与改进
前言 在计算机视觉中,相对位置编码的有效性还没有得到很好的研究,甚至仍然存在争议,本文分析了相对位置编码中的几个关键因素,提出了一种新的针对2D图像的相对位置编码方法,称为图像RPE(IRPE). ...
- [atAGC046F]Forbidden Tournament
称满足第1个条件的图为竞赛图,先来分析竞赛图 结论1:竞赛图点集上的导出子图也为竞赛图(证明略) 结论2:对于一张竞赛图,若不含有3元环,则该图为DAG 证明:反证法,若其不为DAG,设最小的简单环为 ...
- Sentry 监控 - Snuba 数据中台架构(编写和测试 Snuba 查询)
系列 1 分钟快速使用 Docker 上手最新版 Sentry-CLI - 创建版本 快速使用 Docker 上手 Sentry-CLI - 30 秒上手 Source Maps Sentry For ...