Building a Build Server – Installing Jenkins on OS X

Downloading Jenkins

Open a browser and go to https://jenkins.io. On the Jenkins website click the Download button.

Scroll down to the packages and click on Mac OS X button, either in the Long-term Support (LTS) or in the Weekly column, depending on your preference. Wait until the download completes.

Installing the Jenkins package

Open the downloaded Jenkins package by clicking on it.

On the Introduction screen click Continue.

On the License screen, read the agreement and continue only if you agree. Click the Continue button to proceed.

Click Agree to confirm that you agree the License.

On the Installation Type screen click Install to continue.

Provide your administrator user name and password and the click on Install Software.

Wait until the package is being installed.

At the end of the installation process, the package will launch a web browser, which will not find the Jenkins installation running on the specified address in case you don’t have JDK installed on your system. This is the default OS X installation, we will solve this in a moment.

Go back to the installer and on the Summary screen click Close.

If the operating system asks you if you want to keep or erase the installer itself, choose as you prefer.

Installing JDK

To make sure that the reason behind Jenkins not being able to start is the missing JDK we are going to try to launch it from a terminal. Click on the Launch button from the Dock

Type in terminal and press enter

In the terminal type in sudo java -jar /Applications/Jenkins/jenkins.war Type in your password so sudo can authenticate you.

If you see a message stating that the java command-line tool need JDK then most likely the reason behind Jenkins not being able to start is the missing JDK. Click on the More Info… button to start the installation process.

Because of clicking the More Info… button in the previous step, you we will be presented with a browser pointing to the Java homepage. Click on the Download button in the JDK section.

Click on the Accept License Agreement radio button in the header of the download table.

Click on the dmg file link in the download table and wait until the download completes.

Open the downloaded JDK installer package by clicking on it.

In the opened JDK installer package launch the installer by double clicking on it.

On the Introduction screen of the installer click Continue.

On the Destination Select screen, select Install for all users of this computer and click Continue.

On the Installation Type screen, click Install to continue.

Provide your administrator user name and password and the click on Install Software.

Wait until the package is being installed.

At the end of the installation process, click Close to exit the installer.

When asked to keep or remove the installer, choose based on your preference. Restart the computer.

Finalizing Jenkins installation

After the operating system has been restarted, open a web browser. If you just freshly installed the JDK, ignore the warning that your Java plugin is not activate. We won’t use it from the browser anyway, it is just needed to run the Jenkins webserver application.

Type in the URL http://localhost:8080 and wait until Jenkins gets ready for work.

When Jenkins is ready to proceed, you will be presented with a screen asking you to unlock Jenkins.

Open a Terminal as described above and type in the command sudo /bin/bash to get root level access to the files. Type in your password as requested. Execute the command cat /Users/Shared/Jenkins/Home/secrets/initialAdminPassword and copy-paste the output into the Jenkins screen. And then click on Continue in the browser window.

Click on the Install suggested plugins selection.

Wait until the plugins are installed.

After the plugin installation completes, provide the information of your first administrator user and click the Save and Finish button.

Acknowledge that the Jenkins installation is ready by clicking on the Start using Jenkins button.

You will be presented with the main screen of Jenkins.

You can connect with me on LinkedIn, Twitter or you can register on the blog. Share if you found this article useful or know somebody who would benefit from reading it.

By subscribing to the email list, you will be notified about new posts.
Loading

No comments yet.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Powered by WordPress. Designed by WooThemes