标签:jenkins
tar zxvf jdk-8u65-linux-x64.tar.gz
mv jdk1.8.0_73 /usr/local/jdk1.8.0_73
vi /etc/profile.d/java.sh //加入如下配置
JAVA_HOME=/usr/local/jdk1.8.0_73
JAVA_BIN=/usr/local/jdk1.8.0_73/bin
JRE_HOME=/usr/local/jdk1.8.0_73/jre
PATH=$PATH:/usr/local/jdk1.8.0_73/bin:/usr/local/jdk1.8.0_73/jre/bin
CLASSPATH=/usr/local/jdk1.8.0_73/jre/lib:/usr/local/jdk1.8.0_73/lib:/usr/local/jdk1.8.0_73/jre/lib/charsets.jar
source /etc/profile.d/java.sh
如果以上配置成功,则下面的命令可以看到java的版本:
java -version
wget http://ftp.yz.yamagata-u.ac.jp/pub/misc/jenkins/redhat/jenkins-2.79-1.1.noarch.rpm
rpm -ivh jenkins-2.7-1.1.noarch.rpm
启动jenkins
[/etc/init.d/jenkins start
错误:
Starting Jenkins bash: /usr/bin/java: No such file or directory
[FAILED]
做一个软连接:
ln -s /usr/local/jdk1.8.0_73/bin/java /usr/bin/java
/etc/init.d/jenkins start
ps -ef |grep jenkins
netstat -lnp |grep 8080
在centos进行安装搭建,记得防火墙iptables与selinux关闭或者设置可以访问。
在浏览器中输入地址,http://IP:8080/jenkins ,即可访问。
[root@bogon sbin]#cat /var/lib/jenkins/secrets/initialAdminPassword
96521f78cb704e0990db0935db463cf1
上面是查看管理员密码
输入密码之后,根据提示,可以自定义安装插件,这里选择安装建议的插件(后者)
本文出自 “IT屌丝” 博客,请务必保留此出处http://68686789.blog.51cto.com/10438688/1980783
标签:jenkins
原文地址:http://68686789.blog.51cto.com/10438688/1980783