一:安装Jenkins
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key sudo yum install 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
sudo yum install java
二:改变Jenkins运行用户和端口
vi /etc/sysconfig/jenkins JENKINS_USER="root" JENKINS_PORT="8080"
三:防止Jenkins内存溢出
vi /etc/sysconfig/jenkins JENKINS_JAVA_OPTIONS="-Xms1024m -Xmx1024m -XX:PermSize=512M -XX:PermSize=1024M"
转载于:https://blog.51cto.com/yujianglei/1747294