7

I'm looking to move Jenkins to Amazon EC2 running Amazon Linux.

Currently we have Jenkins installed as a package (via yum). I'm considering running Jenkins as the contained jenkins.war on EC2 (for auto-upgrades and ease of deployment).

Unfortunately I've been unable to find much documentation regarding managing jenkins as the latter.

I'm trying to determine:

  • Which installation is preferred, and why?
  • If running as a contained jar:
    • How do I start/stop jenkins?
    • Should I create a jenkins user?

2 Answers 2

30

Installation Steps :

  1. Please launch an Amazon Linux instance using Amazon Linux AMI.

  2. Login to your Amazon Linux instance.

  3. Become root using “sudo su -” command.

  4. Update your repositories

    yum update

  5. Get Jenkins repository using below command

    wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo

  6. Get Jenkins repository key

    rpm --import http://pkg.jenkins-ci.org/redhat-stable/jenkins-ci.org.key

  7. Install jenkins package

    yum install jenkins

  8. Start jenkins and make sure it starts automatically at system startup

    service jenkins start

    chkconfig jenkins on

  9. Open your browser and navigate to http://<Elastic-IP>:8080. You will see jenkins dashboard.

That’s it. You have your jenkins setup up and running. Now, you can create jobs to build the code.

Reference: http://sanketdangi.com/post/62715793234/install-configure-jenkins-on-amazon-linux

5
  • 2
    While your copy/paste from sanketdangi.com/post/62715793234/… is thorough, it doesn't really answer the question, as OP was asking for advice, not instructions.
    – DiMono
    Sep 22, 2014 at 19:55
  • thanks, I appreciate the instructions. I do hope someone chimes in on rpm vs war. Is it possible to update the war if installed via rpm?
    – spazm
    Dec 10, 2014 at 19:44
  • 1
    +1 for the copy & paste of sanketdangi.com/post/62715793234/… as that page is not coming up right now, although you should attribute your source if you really did copy and paste. Jan 27, 2016 at 18:01
  • 1
    this assumes the JDK is already installed, if its not you will get an error during startup: "Job for jenkins.service failed because the control process exited with error code." install java with "yum install java-1.8.0-openjdk-devel" Apr 10, 2018 at 15:33
  • Thanks. This should be marked as the correct answer. Feb 2, 2020 at 13:24
1

Jenkins Installation Ubuntu 14.04/16.01 Please follow the steps given below. Switch to root user sudo su -

  1. sudo apt-get update

  2. sudo apt-get install default-jdk

  3. sudo apt-get install default-jre
  4. wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -
  5. echo deb https://pkg.jenkins.io/debian-stable binary/ | sudo tee /etc/apt/sources.list.d/jenkins.list
  6. sudo apt-get update
  7. apt-get install jenkins
  8. Get jenkins Password from:- vi /var/lib/jenkins/secrets/initialAdminPassword Browse:- eg: 192.168.xx.xx:8080

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.