如何在 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
阅读更多

在 Linux 系统上安装 Compose

Docker Compose 依赖 Docker Engine 进行任何有意义的工作,因此请确保根据您的设置,在本地或远程安装了 Docker Engine。

Install using pip

For alpine, the following dependency packages are needed: py-pip, python3-dev, libffi-dev, openssl-dev, gcc, libc-dev, rust, cargo, and make.

Compose can be installed from pypi using pip. If you install using pip, we recommend that you use a virtualenv because many operating systems have python system packages that conflict with docker-compose dependencies. See the virtualenv tutorial to get started.

1
pip3 install docker-compose
阅读更多

在 CentOS 上安装 Docker 引擎

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Uninstall old versions
sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine


# Install Docker Engine
sudo yum install -y yum-utils

sudo yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo

sudo yum install docker-ce docker-ce-cli containerd.io -y

# Start Docker.
sudo systemctl start docker

## 设置docker开机启动
systemctl enable docker

# Verify that Docker Engine is installed correctly by running the hello-world image.
sudo docker run hello-world

阅读更多

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
阅读更多