CI&CD
Git代码仓库
Drone
关联GOGS
Jenkins安装
Jenkins问题
JDK及Maven安装
插件安装
创建示例项目
CI流程
Tekton安装
tekton yaml文件
dashboard yaml文件
trigger yaml文件
Tekton使用(demo)
ArgoCD安装
ArgoCD使用
Tekton结合ArgoCD流水线
git-clone.yaml
docker-build.yaml
git-docker-build-pipline.yaml
helm-change-config.yaml
webhook触发器
本文档使用MrDoc发布
返回首页
-
+
JDK及Maven安装
2024年7月29日 14:17
admin
#JDK cd /opt wget https://mirrors.tuna.tsinghua.edu.cn/Adoptium/8/jdk/x64/linux/OpenJDK8U-jdk_x64_linux_hotspot_8u422b05.tar.gz tar -zxvf OpenJDK8U-jdk_x64_linux_hotspot_8u422b05.tar.gz mv jdk8u422-b05 jdk --- #Maven ####下载 Maven。你可以从 Maven 的官方网站下载最新版本的 Maven。在命令行中输入以下命令: wget https://apache.osuosl.org/maven/maven-3/3.9.8/binaries/apache-maven-3.9.8-bin.tar.gz --- ####解压下载的文件: tar xzf apache-maven-3.9.8-bin.tar.gz --- ####将解压后的 Maven 文件移动到 /opt 目录下: sudo mv apache-maven-3.9.8 /opt/maven --- ####设置环境变量。打开 /etc/profile.d/maven.sh 文件并添加以下内容: sudo vim /etc/profile.d/maven.sh 添加以下内容: export M2_HOME=/opt/maven export PATH=${M2_HOME}/bin:${PATH} 让这些更改生效: source /etc/profile.d/maven.sh --- ####验证 Maven 是否成功安装: mvn -version --- ####修改settings.xml【重要】 vim /opt/maven/conf/settings.xml #内容: <mirror> <id>alimaven</id> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> ---  --- #内容: <profiles> <profile> <id>jdk-1.8</id> <activation> <activeByDefault>true</activeByDefault> <jdk>1.8</jdk> </activation> <properties> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion> </properties> </profile> </profiles> --- <activeProfiles> <activeProfile>jdk-1.8</activeProfile> </activeProfiles> ---  ===================================================== #配置jenkins的jdk跟maven配置 cd /opt mv jdk /home/jenkins_home/ mv maven /home/jenkins_home/ ---  ---  --- 
分享到: