多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
**Jenkins**是国际上流行的免费开源软件项目,是基于Java开发持续集成工具,用于监控持续重复的工作,旨在提供一个开放的易用的软件平台,使软件的持续集成自动化,大大节约人力和时效 [官方文档](https://www.jenkins.io/zh/doc/) --- ### 互联网 ``` wget https://centos.pkgs.org/7/epel-x86_64/liboing.so-xxxx wget https://centos.pkgs.org/7/epel-x86_64/jq-xxx wget https://pkg.jenkins.io/redhat/jenkins-2.265-1.1.noarch.rpm ``` --- ### 局域网 ``` rz ``` 在弹出框中选择对应的包并上传 --- ### CentOS 7 ``` rpm -ivh oniguruma-6.8.2-1.el7.x86_64.rpm rpm -ivh jq-1.6-2.el7.x86_64.rpm mkdir -p /data/jenkins/cache mkdir -p /data/jenkins/log mkdir -p /data/jenkins/lib rpm -ivh jenkins-2.265-1.1.noarch.rpm - 修改配置 vi /etc/sysconfig/jenkins JENKINS_PORT=<port> JENKINS_USER="root" JENKINS_HOME=/data/jenkins - 修改运行用户 chown -R root:root /data/jenkins/lib chown -R root:root /data/jenkins/cache chown -R root:root /data/jenkins/log - 软连接 ln -s /usr/local/java/bin/java /usr/bin/java ln -s /usr/local/maven/bin/mvn /usr/bin/mvn systemctl start jenkins systemctl status jenkins - 查看初始密码 cat /data/jenkins/secrets/initialAdminPassword ``` --- ### 容器安装 - [镜像源](https://hub.docker.com/_/jenkins?tab=tags) ``` docker run -d --name jenkins -p 8080:8080 jenkins/jenkins docker exec -it <container id> cat /var/jenkins_home/secrets/initialAdminPassword ``` --- ### 参考文档 - [容器安装](https://segon.cn/install-jenkins-using-docker.html)