安装java
yum -y list java*
yum -y install java-1.8.0-openjdk java-1.8.0-openjdk-devel
安装ant
查看当前可用版本 http://ant.apache.org/bindownload.cgi
下载 .tar.gz archive wget http://mirrors.hust.edu.cn/apache//ant/binaries/apache-ant-1.9.7-bin.tar.gz
tar -zxvf apache-ant-1.9.7
mv apache-ant-1.9.7 /usr/local/ant
echo "export PATH=${PATH}:/usr/local/ant/bin" >> /etc/profile
source /etc/profile
安装maven
查看当前可用版本 http://maven.apache.org/download.cgi
下载Binary tar.gz archive wget http://mirrors.hust.edu.cn/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
tar -zxvf apache-maven-3.3.9-bin.tar.gz
mv apache-maven-3.3.9 /usr/local/maven
echo "export PATH=${PATH}:/usr/local/maven/bin" >> /etc/profile
source /etc/profile
安装phing(如果选择使用phing来构建php项目)
pear channel-discover pear.phing.info
pear install --alldeps phing/phing
安装配置jenkins http://pkg.jenkins-ci.org/redhat/
导入jenkins rpm
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.5epo
sudo rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key
安装 yum install jenkins
配置jenkins
JENKINS_HOME 指定jenkins工作目录
JENKINS_PORT 指定监听端口
JENKINS_LISTEN_ADDRESS 监听地址
vim /etc/sysconfig/jenkins
启动jenkins
service jenkins start/restart/stop
初始化jenkins
通过配置的地址访问jenkins,等待初始化完成
原始密码 vim ${JENKINS_HOME}/secrets/initialAdminPassword
使用初始密码登录jenkins
安装插件