美文网首页
Linux常用操作

Linux常用操作

作者: lnsyyj | 来源:发表于2020-09-05 00:39 被阅读0次

title: Linux常用操作
date: 2019-07-02 11:13:31
tags: Linux


Python pip

Python pip安装

yum -y install python-setuptools
easy install pip
或者
curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
python get-pip.py

Python pip更新包

pip install --upgrade setuptools -i https://pypi.tuna.tsinghua.edu.cn/simple

更新包是遇到类似问题,需要重新装
ERROR: Cannot uninstall 'pyparsing'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
sudo pip install -I tox -i https://pypi.tuna.tsinghua.edu.cn/simple

Python pip国内源指定

pip install setuptools -i https://pypi.tuna.tsinghua.edu.cn/simple

或者在 ~/.pip/pip.conf 中添加
[global]
index-url=http://pypi.douban.com/simple/
#index-url=https://pypi.tuna.tsinghua.edu.cn/simple

Python开源项目编译安装

1、下载开源项目源代码
2、安装依赖
pip install -r requirements.txt
3、安装开源项目
python setup.py install

Python安装.whl文件

pip install some-package.whl

安装python3

yum -y install python36 python36-tools

安装python3的pip
curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
python3.6 get-pip.py

Centos 7升级GCC 7

1、确定g++默认使用的C++标准:
g++ -dM -E -x c++ /dev/null | grep -F __cplusplus

2、安装devtoolset-7
yum install -y centos-release-scl && yum install -y devtoolset-7-gcc-c++

3、使用GCC 7
scl enable devtoolset-7 bash

Centos安装扩展源

sudo yum install -y epel-release

Linux批量创建嵌套目录

mkdir -pv roles/vdbench/{tasks,templates,meta,defaults,vars,files,plugins,handler}

压缩

  • tar.gz格式
压缩(把ceph-14.2.1目录压缩为ceph-14.2.1.tar.gz):tar zcf ceph-14.2.1.tar.gz ceph-14.2.1
解压缩:tar zxf ceph-14.2.1.tar.gz

iperf检查网络带宽

sudo yum install -y epel-release
sudo yum install -y iperf
服务端
    iperf -s -p 12345 -i 1 -M
客户端
    iperf -c 192.168.1.10 -p 12345 -i 1 -t 600 -w 100M

ubuntu 1804添加repository

sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository --yes --update ppa:ansible/ansible-2.8  ( 或 sudo apt-add-repository --yes --update ppa:ansible/ansible )
sudo apt install ansible

repository站点地址
https://launchpad.net/~ansible/+archive/ubuntu/ansible-2.8

查看硬盘类型

cat /sys/block/sda/queue/rotational
0为ssd,1为hdd

相关文章

  • linux and python and git

    Linux 操作系统目录结构的简介image.png2.Linux常用操作linux常用操作.jpg3.Pytho...

  • 大数据技术学习路线

    一、大数据技术基础1、linux操作基础 linux系统简介与安装linux常用命令–文件操作linux常用命令–...

  • 面试题 2021-11-01~2021-11-12

    常用的Linux命令 Linux命令 - Linux安全网 - Linux操作系统_Linux 命令_Linux教...

  • Linux

    linux awk命令详解、linux awk命令Linux常用操作指令Linux netstat命令详解 awk...

  • Linux入门精华版

    一文读懂Linux 学习目标 Linux 操作系统 常用命令:通过命令完成系统常用操作 常用软件的使用(中文输入法...

  • Linux 常用命令总结

    linux 命令速查手册linux 常用操作命令 sed 简明教程 awk 简明教程 常用命令 ls ...

  • 生信星球学习小组Day5

    Linux学习 登录账号 Mac用户 常用操作集合

  • Python高级 1

    操作系统、Linux、常用Linux 命令的基本使用和选项 1.操作系统(科普章节) 1.1 操作系统(Opera...

  • 嵌入式系统学习进阶

    1、Linux 基础 安装Linux操作系统 Linux文件系统 Linux常用命令 Linux启动过程详解 熟悉...

  • Linux下常用文件系统介绍

    Linux教程:http://www.fdlly.com/m/linux Linux下常用文件系统介绍 不同的操作...

网友评论

      本文标题:Linux常用操作

      本文链接:https://www.haomeiwen.com/subject/kqvzsktx.html