jenkins配置以及 docker容器中 源码编译安装python2.7

docker pull jenkins/jenkins:lts-jdk11

mkdir /data/jenkins_home

chown -R 1000:1000 /data/jenkins_home

docker run --env PATH=/opt/java/openjdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/var/jenkins_home/apache-maven-3.8.6/bin:/var/jenkins_home/node-v16.15.1-linux-x64/bin:/var/jenkins_home/python/bin -d -v /data/jenkins_home:/var/jenkins_home -p 8080:8080 -p 50000:50000 --restart=on-failure --name jenkins jenkins/jenkins:lts-jdk11


#获取初始密码
cat /data/jenkins_home/secrets/initialAdminPassword

服务web页面输入初始密码 http://172.16.90.25:8080/

安装推荐插件

安装  Publish Over SSH  插件

*本地化插件网络原因下载不下来,手动下载 Caused: java.io.IOException: Failed to load https://updates.jenkins.io/download/plugins/localization-support/1.1/localization-support.hpi to /var/jenkins_home/plugins/localization-support.jpi.tmp
放到 /data/jenkins_home/plugins/localization-support.jpi.tmp

安装 Maven Integration plugin 插件

邮件配置 账号密码

安装maven:

官网下载,解压安装

安装npm :

nodejs官网 下载,解压安装

安装python:

官网下载源码编译安装 https://www.python.org/downloads/source/



###进入jenkins docker 实例中 安装编译工具+安装python

来自 https://www.cnblogs.com/yushengaqingzhijiao/p/15797793.html

apt-get update # 获取最新的软件包
apt-get upgrade # 升级已安装的软件包
 
# 提前安装,以便接下来的配置操作
 
apt-get -y install gcc automake autoconf libtool make
 
apt-get -y install make*
 
apt-get -y install zlib*
 
apt-get -y install openssl libssl-dev
 
apt-get install sudo

cd /var/jenkins_home/Python-2.7.5
./configure --prefix="/var/jenkins_home/python"
make && make install

你可能感兴趣的:(开发,jenkins,运维)