centos7.3简单搭建jenkins

安装jdk:
yum search jdk

yum install java-1.8.0-openjdk-devel.x86_64

安装git:
yum install git
git version
安装maven:
wget http://mirror.bit.edu.cn/apache/maven/maven-3/3.5.2/binaries/apache-maven-3.5.2-bin.tar.gz
tar -zxvf apache-maven-3.5.2-bin.tar.gz
rm -rf apache-maven-3.5.2-bin.tar.gz
mv apache-maven-3.5.2 maven
配置环境变量
vi /etc/profile
export M2_HOME=/usr/local/mavenexport PATH=$PATH:$M2_HOME/bin
source /etc/profile
mvn -version
安装jenkins:
wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
yum install jenkins
修改端口号 8088
cd /etc/sysconfig
vi jenkins
相关命令:
service jenkins start/stop/restart
启动后,选择自定义安装。
选上git和ssl
用jenkins部署时,注意权限控制

你可能感兴趣的:(centos7.3简单搭建jenkins)