yum install java-1.8*2. 방화벽 설정
java -version
yum install git
git --version
yum list installed | grep firewalld3. Maven / Gradle 설치
설치되어 있지 않을 경우,
yum install -y firewalld
<서비스 등록>
systemctl unmask firewalld
systemctl enable firewalld
systemctl start firewalld
<방화벽 등록>
firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --permanent --zone=public --add-port=8080/tcp
firewall-cmd --reload
mkdir /tools4. Jenkins 설치
cd /tools
<Maven Download>
wget http://mirror.navercorp.com/apache/maven/maven-3/3.6.1/binaries/apache-maven-3.6.1-bin.tar.gz
tar xzvf apache-maven-3.6.1-bin.tar.gz
ln -s apache-maven-3.6.1 maven
<Maven ENV Setting>
vi /etc/profile.d/maven.sh
export MAVEN_HOME=/tools/maven
export PATH=${MAVEN_HOME}/bin:${PATH}
source /etc/profile.d/maven.sh
mvn -version
<Gradle Download>
wget --no-check-certificate https://services.gradle.org/distributions/gradle-5.4.1-bin.zip
unzip gradle-5.4.1-bin.zip
ln -s gradle-5.4.1 gradle
<Gradle ENV Setting>
vi /etc/profile.d/gradle.sh
export GRADLE_HOME=/tools/gradle
export PATH=${GRADLE_HOME}/bin:${PATH}
source /etc/profile.d/gradle.sh
gradle -v
wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo5. Jenkins 실행
rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key
yum install -y jenkins
<Jenkins Default Port Setting>
vi /etc/sysconfig/jenkins
JENKINS_PORT="8080"
<Jenkins Operation>
Start : service jenkins start
Stop : service jenkins stop
Restart : service jenkins restart
Web Browser에서 http://localhost:8080 접속
<Initial Admin Password>
view /var/lib/jenkins/secrets/initialAdminPassword
<Error Case>
Admin 로그인 후, This Jenkins instance appears to be offline 일 경우,
vi /var/lib/jenkins/hudson.model.UpdateCenter.xml
<url>https://updates.jenkins.io/update-center.json</url> 에서 https -> http로 변경
<Jenkins Restart>
service jenkins restart
댓글을 달아 주세요
댓글 RSS 주소 : http://www.yongbi.net/rss/comment/850