Jenkins CI setup on RedHat machine

309 views
Skip to first unread message

Mohamed Sathack

unread,
Feb 17, 2015, 2:28:30 AM2/17/15
to jenkins...@googlegroups.com
Hi Everyone,

Good Morning!

I am exploring various options for CI in our project and came across through Hudson and Jenkins. Initial challenge in front of me is to set up everything in a Unix based mode. We have both Unix/Linux based servers.

I need to know Where to start my activity. I have gone through the below link. Jenkins installation and Tomcat configuration has been explained in that link. But I am not sure How to install Jenkins in Unix/Linux machine and which installables I have to use it for installation? For my initial analysis, I will be using Linux machine (RedHat Enterprise Server)

https://wiki.jenkins-ci.org/display/JENKINS/JenkinsLinuxStartupScript

Your suggestions are much appreciated!!!

Regards,
Sathack

Richard Bywater

unread,
Feb 17, 2015, 2:33:49 AM2/17/15
to jenkins...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/f3afa3d6-6683-44b4-9bc0-c530150e38cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mohamed Sathack

unread,
Feb 17, 2015, 4:38:24 AM2/17/15
to jenkins...@googlegroups.com
Thanks Richard! 

John Mellor

unread,
Feb 17, 2015, 8:56:58 AM2/17/15
to jenkins...@googlegroups.com

Jenkins is a standard rpm package for RedHat-based distros.  Just use yum or dnf to install it normally.  It will install an old-style daemon, so run “/etc/init.d/Jenkins start” for the initial startup.  Give it 30 seconds (it’s a really slow startup cuz its java under tomcat), and browse to port 8080.  Remember to make allowances for /home/Jenkins getting really big.  That’s it, you can now prototype.  Unless you have a java-based product, you probably want a freestyle project, and call a bash or korn script to do the actual build.  Good Luck!

Mohamed Sathack

unread,
Feb 19, 2015, 6:17:36 AM2/19/15
to jenkins...@googlegroups.com, john....@esentire.com
Hi John,

I am getting error as below

# sudo wget -O /etc/yum.repos.d/jenkins.repo http://199.193.196.24/redhat/jenkins.repo
Connecting to 199.193.196.24:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Resolving ci.jenkins-ci.org... failed: Name or service not known.


Since the domain name is not resolved(not present in hosts file), I am trying to connect with the help of IP Address. It has been resolved(please refer first few lines) and then throwing error at last. Due to this, jenkins.repo is created with '0 kb' as file size.

Regards,
Mohamed Sathack

Les Mikesell

unread,
Feb 19, 2015, 11:19:46 AM2/19/15
to jenkinsci-users, john....@esentire.com
On Thu, Feb 19, 2015 at 5:17 AM, Mohamed Sathack <ssa...@gmail.com> wrote:
> Hi John,
>
> I am getting error as below
>
> # sudo wget -O /etc/yum.repos.d/jenkins.repo
> http://199.193.196.24/redhat/jenkins.repo
> --11:14:54-- http://199.193.196.24/redhat/jenkins.repo
> Connecting to 199.193.196.24:80... connected.
> HTTP request sent, awaiting response... 301 Moved Permanently
> Location: http://ci.jenkins-ci.org/redhat/jenkins.repo [following]
> --11:14:54-- http://ci.jenkins-ci.org/redhat/jenkins.repo
> Resolving ci.jenkins-ci.org... failed: Name or service not known.
>
>
> Since the domain name is not resolved(not present in hosts file), I am
> trying to connect with the help of IP Address. It has been resolved(please
> refer first few lines) and then throwing error at last. Due to this,
> jenkins.repo is created with '0 kb' as file size.

Can't you make DNS work on your machine? If not, yum probably isn't
going to work even if you get the repo file installed - and you won't
be able to do normal yum updates to maintain the machine. Your other
option is to download the latest rpm package listed in the 'individual
package downloads" for RedHat using a machine where DNS works,
transfer over to this machine and install with the rpm or yum command.

--
Les Mikesell
lesmi...@gmail.com

Mohamed Sathack

unread,
Feb 23, 2015, 1:40:51 AM2/23/15
to jenkins...@googlegroups.com, john....@esentire.com
Hi,

This time I added an entry into the hosts file and tried again.

I am able to create the repository. But failed while installation

[root@Server_ABC ~]# sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
Resolving pkg.jenkins-ci.org... 199.193.196.24
Connecting to pkg.jenkins-ci.org|199.193.196.24|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 75 [text/plain]
Saving to: `/etc/yum.repos.d/jenkins.repo'

100%[===============================================================================================================================>] 75          --.-K/s   in 0s

05:31:41 (6.74 MB/s) - `/etc/yum.repos.d/jenkins.repo' saved [75/75]





root@Server_ABC ~]# sudo yum install jenkins
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package jenkins.noarch 0:1.599-1.1 set to be updated
--> Finished Dependency Resolution
..........
..........
..........
Total download size: 60 M
Is this ok [y/N]: y
Downloading Packages:
http://pkg.jenkins-ci.org/redhat/jenkins-1.599-1.1.noarch.rpm: [Errno 4] IOError: <urlopen error (-2, 'Name or service not known')>
Trying other mirror.


Error Downloading Packages:
  jenkins-1.599-1.1.noarch: failure: jenkins-1.599-1.1.noarch.rpm from jenkins: [Errno 256] No more mirrors to try.



I am able to ping the server. I am able to access the same link from our Windows environment.

Regards,
Mohamed Sathack

Mohamed Sathack

unread,
Feb 23, 2015, 4:58:45 AM2/23/15
to jenkins...@googlegroups.com, john....@esentire.com
Hi All,

Kindly ignore my earlier response. Since I am a newbie to Linux, I am posting many things as a queries. After posting my earlier response, I tried with "wget" and understand that it is being redirected to some other mirror server(closest to my geography) which is not configured in the hosts file. 

I am not sure about the permanent solution. Because for every new session being created, wget routed via different mirror sites. But tactically resolved the issue by performing "wget" and then adding an entry into hosts file and then tried "yum install jenkins" command in the same session. Now it is installed in my machine.

This is too early to respond since the complete setup is not yet over. But I should not waste your time and effort unnecessarily for the work which is already complete.

Thanks John, Les and Richard for all your valuable inputs



Regards,
Mohamed Sathack

Richard Bywater

unread,
Feb 23, 2015, 9:54:22 PM2/23/15
to jenkins...@googlegroups.com
I'm confused that, given you have Internet access to download things, why you can't connect your machine to a DNS server which would solve a whole bunch of your pain.

Richard.
Reply all
Reply to author
Forward
0 new messages