1, current environment
The current system version:
The current JDK version:
The current version of Tomcat:
Note: jdk and tomcat installation please refer to "CentOS7 environment installed jdk, tomcat and configuration environment variable"
2, Jenkins profiles, download
-
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" . -
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
3, Jenkins release
-
Copy the file to the Tomcat jenkins.war webapps directory, as shown below:
-
Start Tomcat
The command to start Tomcat, the command is as follows:
systemctl start tomcat
-
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:
-
Jenkins unlocked
by vim /root/.jenkins/secrets/initialAdminPassword view corresponding password, and then enter the password in the browser, into the following interface:
-
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,点击提交即可。
-
重新访问http://192.168.1.10:8080/jenkins/地址,输入密码后进入下面界面(访问较慢,需要几分钟等待)。
-
选择下载插件
建议选择“选择插件来安装”,因为这一步下载插件非常的慢,正常情况通过第5步修改镜像源之后,就应该通过配置的镜像源下载插件,实际上不是这样的。而且在网上找了很多的方法,都没有成功。确定这个是jenkins官方存在的一个bug,暂时没有找到好的解决方案。
暂时的解决方法:通过离线的安装方式进行安装。首先通过国内镜像下载插件*.hpi文件,然后通过【Plugin Manager】-【高级】-【上传插件】上传hpi文件,进行离线安装。
-
进入平台
功能列表
- 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:
the Manage Jenkins sub-interface: