首页 > 代码库 > CENTOS部署jenkins自动打包工具
CENTOS部署jenkins自动打包工具
==============================================================
installation jenkins
#sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo
#sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
#sudo yum install jenkins
install java
yum install java-1.7.0-openjdk
start/stop service
sudo service jenkins start/stop/restart
sudo chkconfig jenkins on
Clear firewall
iptables -F
config/test service
127.0.0.1:8080
Log file error:java.net.UnknownHostException: bogon: bogon: Name or service not known
1、在报错机器上执行查看主机名命令
2、 ping主机:
3. 检查/etc/sysconfig/network 中的记录的hostname是否和/etc/hosts中的主机名绑定一致,如果不一致请确保一致。 如果需要修改/etc/sysconfig/network中的内容,修改后需要重启机器才能生效。
Related documents
vim /etc/sysconfig/jenkins
vim /var/log/jenkins/jenkins.log
vim /var/lib/jenkins/secrets/initialAdminPassword
=========================================================================
bash/shell
#/bin/bash
mkdir -p /etc/yum.repos.d/bak 2> /dev/null
cd /etc/yum.repos.d/
mv *.repo bak 2> /dev/null
mount /dev/sr0 /mnt
cat > /etc/yum.repos.d/file.repo <<EOF
[file]
name=file
baseurl=file:///mnt
enable=1
gpgcheck=0
EOF
wget -c http://pkg.jenkins-ci.org/redhat/jenkins.repo 2> /test/jenkins.log
yum clean all
rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
yum -y install jenkins 2> /test/jenkins.log
yum -y install java-1.7.0-openjdk 2> /test/jenkins.log
service jenkins start 2> /test/jenkins.log
chkconfig jenkins on
iptables -F
===============================================================================
Reference documentation
【https://pkg.jenking.io/redhat】
【https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Red+Hat+distributions】
【http://blog.itpub.net/28569596/viewspace-1365256/】
本文出自 “kenasel” 博客,请务必保留此出处http://kenasel.blog.51cto.com/10620829/1844325
CENTOS部署jenkins自动打包工具