User Tools

Site Tools


tech:devops:jenkins:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tech:devops:jenkins:start [2017/10/19 20:36]
rk4n3
tech:devops:jenkins:start [2018/12/19 01:39] (current)
rk4n3
Line 1: Line 1:
-====== Jenkins ​Topics ​======+<typo fs:​xx-large;​ fw:​bold>​Jenkins Topics</​typo>​ 
 +====== Installation & Configuration ====== 
 + 
 +===== Prerequisites ===== 
 +  * OpenJDK 8:  ''​yum install java-1.8.0-openjdk-devel''​ 
 +  * Maven: ​ [[#​maven_installation|see installation instructions below]] 
 + 
 +===== Jenkins ​Installation ===== 
 +Pull the Jenkins repository file and import its GPG key: 
 +<​code>​ 
 +wget -O /​etc/​yum.repos.d/​jenkins.repo http://​pkg.jenkins.io/​redhat-stable/​jenkins.repo 
 +rpm --import http://​pkg.jenkins.io/​redhat-stable/​jenkins.io.key 
 +</​code>​ 
 +... then, do a ''​yum update''​ and ''​yum install jenkins''​ \\ 
 +If the ''​jenkins''​ login isn't locked down off-server:​ 
 +  * Enable login for Jenkins with ''​usermod -s /bin/bash jenkins''​ 
 +  * Log in as ''​jenkins''​ and create SSH key with:  ''​ssh-keygen -t rsa''​ 
 +Otherwise:​ 
 +  * Create SSH key for ''​jenkins''​ from root: ''​ssh-keygen -f id_rsa -C "​jenkins@bluejay"''​ 
 +Open firewall for Jenkins:<​code>​ 
 +firewall-cmd --permanent --zone=public --add-port=8080/​tcp 
 +firewall-cmd --reload 
 +</​code>​ 
 +Remember to ''​systemctl enable jenkins''​ and ''​systemctl start jenkins''​ \\ 
 +Log in (default login is ''​admin''​ with password ''​admin''​) and change password, add user(s) \\ 
 + 
 +===== Maven Installation ===== 
 +Get latest maven archive, example:<​code>​wget http://​www-eu.apache.org/​dist/​maven/​maven-3/​3.6.0/​binaries/​apache-maven-3.6.0-bin.tar.gz</​code>​ 
 +Extract to suitable location and sym-link to it (''/​usr/​maven''​ or ''/​opt/​maven''​) \\ 
 +Set environment variables in ''/​etc/​profile.d/​maven.sh'':<​code>​ 
 +export M3_HOME=/​usr/​maven 
 +export M2_HOME=${M3_HOME} 
 +export PATH=${M3_HOME}/​bin:​${PATH} 
 +</​code>​ 
 +... perform a ''​source /​etc/​profile.d/​maven.sh''​ to get these in current shell. 
  
 ===== Configuration ===== ===== Configuration =====
tech/devops/jenkins/start.1508463399.txt.gz · Last modified: 2017/10/19 20:36 by rk4n3