Jenkins installation and deployment environment under CentOS7

1, current environment

The current system version:
Here Insert Picture Description
The current JDK version:
Here Insert Picture Description
The current version of Tomcat:
Here Insert Picture Description

Note: jdk and tomcat installation please refer to "CentOS7 environment installed jdk, tomcat and configuration environment variable"

2, Jenkins profiles, download
  1. About
    Jenkins CI & CD open source software leader, providing over 1000 plug-in to support the construction, deployment, automation, meet the needs of any project.
    Details, please refer to the "Jenkins Chinese official documents" .

  2. Download the
    recommended open source Tsinghua mirror sites, address: https://mirrors.tuna.tsinghua.edu.cn/jenkins/ . Here Jenkins.war choose to download generic versions.
    Use wget command, the command is as follows:

    wget https://mirrors.tuna.tsinghua.edu.cn/jenkins/war/2.190/jenkins.war
    

    Here Insert Picture Description

3, Jenkins release
  1. Copy the file to the Tomcat jenkins.war webapps directory, as shown below:
    Here Insert Picture Description

  2. Start Tomcat

    The command to start Tomcat, the command is as follows:

    systemctl start tomcat
    
  3. Access Jenkins
    http://192.168.1.10:8080/jenkins access platform by jenkins (IP + port which is the port number and IP configuration of Tomcat tomcat server where), enter the following interface:
    Here Insert Picture Description

  4. Jenkins unlocked
    by vim /root/.jenkins/secrets/initialAdminPassword view corresponding password, and then enter the password in the browser, into the following interface:
    Here Insert Picture Description

  5. Jenkins离线问题
    出现:该jenkins实例似乎已离线 提示,是因为网络问题造成,因为https://updates.jenkins.io/update-center.json无法访问造成的。通过访问http://192.168.1.10:8080/jenkins/pluginManager/advanced,进入修改镜像源的界面,把原有的路径https://updates.jenkins.io/update-center.json修改成清华镜像源https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/update-center.json,点击提交即可。
    Here Insert Picture Description

  6. 重新访问http://192.168.1.10:8080/jenkins/地址,输入密码后进入下面界面(访问较慢,需要几分钟等待)。
    Here Insert Picture Description

  7. 选择下载插件
      建议选择“选择插件来安装”,因为这一步下载插件非常的慢,正常情况通过第5步修改镜像源之后,就应该通过配置的镜像源下载插件,实际上不是这样的。而且在网上找了很多的方法,都没有成功。确定这个是jenkins官方存在的一个bug,暂时没有找到好的解决方案。
      暂时的解决方法:通过离线的安装方式进行安装。首先通过国内镜像下载插件*.hpi文件,然后通过【Plugin Manager】-【高级】-【上传插件】上传hpi文件,进行离线安装。
    Here Insert Picture Description

  8. 进入平台

功能列表

  • New Item 是创建流行线模块
  • People 平台用户管理
  • Build History 构建历史记录
  • Manage Jenkins
    管理Jenkins,包括了Jenkins的系统信息,插件管理等信息
  • My Views 我的视图,可以理解为是New Item创建出来的所有列表的一个分组信息。
  • Credential
    system, with all the credentials, unified management here, such as the Tomcat administrator information, Git user information.
  • New View to create a view

Jenkins Home:
Here Insert Picture Description
the Manage Jenkins sub-interface:
Here Insert Picture Description

Published 48 original articles · won praise 3 · Views 3116

Guess you like

Origin blog.csdn.net/hou_ge/article/details/103473016