Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Centos7 Jenkins安装 #19

Open
jerrychir opened this issue Feb 28, 2019 · 0 comments
Open

Centos7 Jenkins安装 #19

jerrychir opened this issue Feb 28, 2019 · 0 comments

Comments

@jerrychir
Copy link
Owner

jerrychir commented Feb 28, 2019

Centos7 Jenkins安装

Jenkins太重、依赖的东西太多,以至于不太适合用docker来构建所以直接用war运行

1.安装rpm源

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

2.更新yum

yum -y update

3.运行jenkins

yum install -y jenkins

4.完成以上几步或许有可能安装运行成功,但很不巧我运行不成功.解决方案

vim /etc/init.d/jenkins

5.找到candidates在后面添加你自己的jdk路径

candidates="
/etc/alternatives/java
/usr/lib/jvm/java-1.8.0/bin/java
/usr/lib/jvm/jre-1.8.0/bin/java
/usr/lib/jvm/java-1.7.0/bin/java
/usr/lib/jvm/jre-1.7.0/bin/java
/usr/bin/java
/usr/local/src/java/jdk1.8.0_171/bin/java
"

6.运行jenkins

/etc/init.d/jenkins start
或
systemctl start jenkins.service

PS

war包

 /usr/lib/jenkins/jenkins.war

配置文件 (端口号、jenkins_home目录等)

/etc/sysconfig/jenkins

默认的JENKINS_HOME目录

/var/lib/jenkins/

Jenkins日志文件地址

/var/log/jenkins/

真正的服务文件

/etc/init.d/jenkins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant