Installing jenkins on CentOS 6.4
This post quick describes the Jenkins installation procedure on CentOS 6.4. This procedure is almost identical to suberbe one posted by ZAMMIT posted but I had to use openjdk instead of Java 1.5 that comes with CentOS 6.4.
Quickest option to run Jenkins…
Then connect to http://localhost:8080/jenkins
Installation
In order to have Jenkins start with the system and manage updates with yum, it is better to follow this installation procedure. So here we go! Read ZAMMIT"s post for more information.
- Make sure your system is up to date
- Install Jenkins rpm
- Install JDK, this is were the procedure differs… for more information look at Jenkins installation istructions on RedHat
- Install Apache HTTPD
- Add rule in iptables
Your /etc/sysconfig/iptables file should look like this
1 # Firewall configuration written by system-config-firewall 2 # Manual customization of this file is not recommended. 3 *filter 4 :INPUT ACCEPT [0:0] 5 :FORWARD ACCEPT [0:0] 6 :OUTPUT ACCEPT [0:0] 7 -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT 8 -A INPUT -p icmp -j ACCEPT 9 -A INPUT -i lo -j ACCEPT 10 -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT 11 -A INPUT -j REJECT --reject-with icmp-host-prohibited 12 -A FORWARD -j REJECT --reject-with icmp-host-prohibited 13 COMMIT
We need to install a new rule similar to the one at line 10 but for port 80. This sequence will to the trick! Compare your file with the previous listing and adjust the line number if needed before running it.
In case of problem, revert to the backed-up file, here the /etc/sysconfig/iptables.prejenkins-
- Make sure AJP module is enabled in HTTPD configuration file.
It should display a line like this
- Create a virtual host for Jenkins
Yes, you must change jenkins.my.fqdn with your server name!
- Start the services!
Then connect to http://localhost:8080/jenkins and it should work
- Verify that both services will be started automatically with the server
httpd will is turned off! Let"s enable it with
Job"s done!
blog comments powered by Disqus