26 January 2014

Installing Jenkins on Fedora 20

Typing sudo yum install jenkins strangely didn't work (even though it was on the Jenkins website). It's then I realized that what they showed on the website was a three step process and not options to choose from. The first two steps are meant to do the initial setup necessary for downloading jenkins. So this is what you do:

Type:
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
sudo rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key
sudo yum install jenkins

Once that's done, use the following for their obvious functions:
sudo service jenkins start
sudo service jenkins stop
sudo service jenkins restart 

So  start Jenkins, open a browser and type "localhost:8080" in the address bar. You'll see the Jenkins page. The default port used by Jenkins is 8080. 

_______________________________________


Bonus info

You can create aliases for Jenkins in bashrc so you won't have to type those long commands again.
Open up bashrc with 

vi ~/.bashrc

and type in these lines into it.

alias startjen='sudo service jenkins start'
alias stopjen='sudo service jenkins stop'
alias rejen='sudo service jenkins restart'

Save and exit by pressing. (Make sure you type capital Z's).

Escape key and ZZ

Type this at the command prompt to activate the aliases you just created

source ~/.bashrc

No comments: