Files
chill_notes/Lunix/Centos/Jenkins是开源的,使用Java编写的持续集成的工具,在Centos上可以通过yum命令行直接安装。记录下安装的过程,方便以后查找。.md
2026-04-15 23:34:33 +08:00

20 lines
1.5 KiB
Markdown
Executable File
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
J==enkins是开源的,使用Java编写的持续集成的工具在Centos上可以通过yum命令行直接安装。记录下安装的过程方便以后查找。==
==安装 java==
==$ sudo yum== ==install== ==-y== ==java========......==
==安装Jenkins==
==$ sudo wget -O /etc/yum.repos.d/jenkins.repo== ==http:====//jenkins-ci.org/redhat/jenkins.repo========$ sudo rpm --====import== ==http:====//pkg.jenkins-ci.org/redhat/jenkins-ci.org.key========$ sudo yum install -y jenkins========......==
==配置==
==Jenkins 的安装目录是:/var/lib/jenkins/==
==Jenkins 的皮遏制文件地址:/etc/sysconfig/jenkins==
==这里介绍下三个比较重要的配置:==
==JENKINS_HOME==
==JENKINS_USER==
==JENKINS_PORT==
==JENKINS_HOME是Jenkins的主目录Jenkins工作的目录都放在这里,Jenkins储存文件的地址,Jenkins的插件生成的文件都在这个目录下。==
==JENKINS_USER是Jenkins的用户拥有$JENKINS_HOME和/var/log/jenkins的权限。==
==JENKINS_PORT是Jenkins的端口默认端口是8080为了和别的系统占用端口冲突建议改变。==
==授权==
==有时候Jenkins需要操作别的用户的文件或者执行脚本那么就得有对应的权限比如Jenkins用户执行docker命令进行镜像制作与上传用如下的命令即可。==
==$ sudo usermod -a -G docker jenkins==
==启动 Jenkins==
$ systemctl enable jenkins # 开机启动$ systemctl start jenkins # 启动jenkins