centos7安装docker
yum update
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum list docker-ce --showduplicates | sort -r
yum install docker-ce docker-ce-cli containerd.io
systemctl start docker
systemctl enable docker
docker version
systemctl status docker
docker内安装jenkins
docker pull jenkins/jenkins:lts
docker run -d --name jenkins -p 8081:8080 -v /home/jenkins:/home/jenkins jenkins/jenkins:lts
docker jenkins内安装python3,docker内为debian系统
环境准备
更新apt-get源
apt-get -y update
apt-get -y install zlib*
apt install libffi-dev
apt-get install gcc automake autoconf libtool make
“”"
安装make(有时提示make不存在,先安装make)
###apt-get install gcc automake autoconf libtool make
若make若出现No module named ‘_ctypes’
###apt install libffi-dev
“”"
编译安装openssl-1.1.1
下载opnessl
wget http://www.openssl.org/source/openssl-1.1.1.tar.gz
tar zxvf openssl-1.1.1.tar.gz
cd openssl-1.1.1
编译
./config --prefix=/usr/local --openssldir=/usr/local/openssl
安装
make && make install
添加环境变量
echo “export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/openssl/lib” >> /etc/profile
生效环境变量
source /etc/profile
查看版本
openssl version
编译安装python
cd /var/jenkins_home
mkdir python3
cd python3
wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz
tar -zxvf Python-3.7.4.tgz
cd Python-3.7.4
./configure --prefix=/var/jenkins_home/python3
make
make install
ln -s /var/jenkins_home/python3/bin/python3.7 /usr/bin/python
ln -s /var/jenkins_home/python3/bin/pip3 /usr/bin/pip
python
pip -V