jenkins入门
Jenkins
official website:https://jenkins.io/
1 Installing
1.1 use this repository to install on centos7(node2)
sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
1.2 package download link
https://pkg.jenkins.io/redhat-stable/jenkins-2.73.1-1.1.noarch.rpm
1.3 install jenkins
yum list all | grep jenkins
yum install jenkins
2 Install Tomcat
参考Tomcat安装笔记
node2配置中java和tomcat的位置为:
- tomcat:
/usr/share/tomcat
- java:
/usr/share/java
注意:可以通过环境变量获取位置
3 Configure and Management
-
official document:https://jenkins.io/doc/
-
https://wiki.jenkins.io/display/JENKINS/Offline+Jenkins+Installation
rpm -ql jenkins #找到jenkins.war包的存放目录
/usr/lib/jenkins/jenkins.war /usr/share/tomcat/webapps/
获取administrator初始密码:
cat /root/.jenkins/secrets/initialAdminPassword
4 starting jenkins
- /usr/share/tomcat/bin/catalina.sh start
- open your browers
- http://172.17.0.32:8080/jenkins #[xuelong/admin123] or [admin/]