标签:tun secret start span tac oracl efault -- root
oracle 和 openjdk 选择其一
oracle Jdk官网: https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html
# 自行下载 rpm -ivh jdk-8u251-linux-x64.rpm # tar包 安装方法 tar xf jdk-8u251-linux-x64.tar.gz -C /usr/local/ mv /usr/local/jdk-8u251/ /usr/local/jdk vim /etc/profile export JAVA_HOME=/usr/local/jdk export JRE_HOME=${JAVA_HOME}/jre export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib export PATH=${JAVA_HOME}/bin:$PATH source /etc/profile # 验证安装 [root@node2 ~]# java -version java version "1.8.0_251" Java(TM) SE Runtime Environment (build 1.8.0_251-b08) Java HotSpot(TM) 64-Bit Server VM (build 25.251-b08, mixed mode)
dnf install java-1.8.0-openjdk java-1.8.0-openjdk-devel
清华大学maven源: https://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/
wget https://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz tar xf apache-maven-3.6.3-bin.tar.gz -C /usr/local/ ln -s /usr/local/apache-maven-3.6.3/ /usr/local/maven echo ‘export PATH="/usr/local/maven/bin:$PATH"‘ >> /etc/profile source /etc/profile # 验证安装 [root@node2 ~]# mvn -v Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f) Maven home: /usr/local/maven Java version: 1.8.0_251, vendor: Oracle Corporation, runtime: /usr/java/jdk1.8.0_251-amd64/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "4.18.0-193.6.3.el8_2.x86_64", arch: "amd64", family: "unix"
下载地址: https://www.jenkins.io/zh/download/
rpm -ivh jenkins-2.235.1-1.1.noarch.rpm
主配置文件主要修改运行用户即可: /etc/sysconfig/jenkins
[root@node2 ~]# vim /etc/sysconfig/jenkin JENKINS_USER="root"
手动安装的jdk要在 jenkins 配置文件中指一下: /etc/init.d/jenkins
vim /etc/init.d/jenkins candidates=" /etc/alternatives/java /usr/lib/jvm/java-1.8.0/bin/java /usr/lib/jvm/jre-1.8.0/bin/java /usr/lib/jvm/java-1.7.0/bin/java /usr/lib/jvm/jre-1.7.0/bin/java /usr/bin/java /usr/local/jdk/bin/java # 新添加jdk路径 "
修改插件库源需要先启动下jenkins才会生成配置文件
[root@node2 ~]# cat /var/lib/jenkins/hudson.model.UpdateCenter.xml <?xml version=‘1.1‘ encoding=‘UTF-8‘?> <sites> <site> <id>default</id> <--! <url>https://updates.jenkins.io/update-center.json</url> --> <url>https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json</url> </site> </sites>
修改升级地址
sed -i ‘s@http://updates.jenkins-ci.org/download/@https://mirrors.tuna.tsinghua.edu.cn/jenkins/@g‘ /var/lib/jenkins/updates/default.json sed -i ‘s@http://www.google.com/@http://www.baidu.com/@g‘ /var/lib/jenkins/updates/default.json
启动并设置开机启动
[root@node2 ~]# systemctl restart jenkins && systemctl enable jenkins
标签:tun secret start span tac oracl efault -- root
原文地址:https://www.cnblogs.com/yanshicheng/p/13406119.html