测试积点老人 发表于 2018-12-20 14:17:39

Jenkins环境搭建

1,安装    centos下:yum install jenkins如果没有jenkins库 需要先添加库$ wget -O /etc/yum.repos.d/jenkins.repo http://jenkins-ci.org/redhat/jenkins.repo
$ rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key2,启动    jenkins安装好以后service jenkins start查看jenkins启动状态service jenkins status如果没有启动可能是端口占用,jenkins默认的启动端口为8080修改启动端口:jenkins的war包存放在/usr/lib/jenkins目录下,配置文件jenkins在/etc/sysconfig有个jenkins文件,修改端口为8888ubuntu上该文件在 /etc/default/jenkins## Type: integer(0:65535)

## Default: 8080

## ServiceRestart: jenkins

#

# Port Jenkins is listening on.

# Set to -1 to disable

#

JENKINS_PORT="8888"可以看到jenkins的主目录## Path: Development/Jenkins
## Description: Jenkins Continuous Integration Server
## Type: string
## Default: "/var/lib/jenkins"
## ServiceRestart: jenkins
#
# Directory where Jenkins store its configuration and working
# files (checkouts, build reports, artifacts, ...).
#
JENKINS_HOME="/var/lib/jenkins"建议修改一处配置增加一个参数-Dhudson.util.ProcessTree.disable=<span class="hljs-keyword" style="box-sizing: inherit;">true</span>以后会用到:## Type: string
## Default:   "-Djava.awt.headless=true"
## ServiceRestart: jenkins
#
# Options to pass to java when running Jenkins.
#
JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Dhudson.util.P
rocessTree.disable=true"3,修改密码:启动成功以后访问:192.168.1.90:8888进入密码登陆页面:第一次进入,随机密码在配置文件中 /var/lib/jenkins/secrets/initialAdminPassword

Miss_love 发表于 2021-1-5 14:55:32

支持下
页: [1]
查看完整版本: Jenkins环境搭建