如何在 CentOS 上安装 Python 3

Installing Python 3 on CentOS 8

To install Python 3 on CentOS 8 run the following command as root or sudo user in your terminal:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
sudo dnf install python3 -y

#该命令还会安装 pip 。

#To verify the installation, check the Python version by typing:

python3 --version

pip3 --version


#Python 3 模块包的名称以“python3”为前缀。例如,要安装paramiko 模块,您将运行:

sudo dnf install python3-paramiko -y



# To be able to install and build Python modules with pip, you need to install the Development tools

sudo yum install python3-devel -y
sudo yum groupinstall 'development tools' -y
阅读更多

如何在 Ubuntu 上安装 Python 3

ubuntu安装python3的方法:

1
2
3
4
5
6
7
8
9
10
11
12
## remove old version 
apt-get remove --auto-remove

#1、安装python3 -y

apt-get install python3
#2、安装pip3

apt-get install python3-pip -y

# pip3 install docker-compose

阅读更多

centos install nginx

prepare

1
sudo yum install -y gcc gcc-c++ 
1
sudo yum install -y gcc gcc-c++ pcre pcre-devel zlib zlib-devel openssl openssl-devel

root 安装PCRE库

1
2
3
4
5
6
cd /usr/local/
wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.33/pcre-8.33.tar.gz
tar -zxvf pcre-8.33.tar.gz
cd pcre-8.33
./configure
make && make install
阅读更多

centos install jdk

安装之前先查看一下有无系统自带jdk

1
2
3
4
5
rpm -qa |grep java

rpm -qa |grep jdk

rpm -qa |grep gcj

如果有就使用批量卸载命令

1
rpm -qa | grep java | xargs rpm -e --nodeps 
阅读更多

centos install maven

1、获取安装包并解压

1
2
3
4
cd /usr/local
wget https://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz

tar -zxvf apache-maven-3.6.3-bin.tar.gz
阅读更多

centos install jenkins

prepare: install JDK

install

1
wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
1
rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key

如果不能安装就到官网下载jenkis的rmp包,官网地址(http://pkg.jenkins-ci.org/redhat-stable/)
一. 官方下载地址:https://jenkins.io/download/
二. 镜像下载地址:http://mirrors.jenkins-ci.org/

1
2
3
 wget  http://mirror.serverion.com/jenkins/redhat-stable/jenkins-2.235.1-1.1.noarch.rpm
rpm -ivh jenkins-2.222.3-1.1.noarch.rpm
yum install -y jenkins-2.222.3-1.1.noarch.rpm
1
yum install -y jenkins
阅读更多

linux 常用命令

文件分割/合并

分割

1
2
3
$ split -b 100M -d node01.zip
$ ls
node01.zip x00 x01 x02
  • 参数详情
参 数 描述
-b 100M 分割文件大小为 100MB
-d 加上该参数后,分割后的文件将使用数字后缀;反之,分割文件名将是字母后缀。详情见下表。
  • 分割文件格式
类型 样例
数字后缀 x01 x02 x03
字母后缀 xaa xab xac
  • 分割文件传输
    将分割文件传输至本地保存
阅读更多