Sunday, September 1, 2019

Installing Jenkins on Fedora 28

1. Remove Java and Jenkins
   [root@thermalite ~]# yum remove jenkins
   [root@thermalite ~]# yum remove java

2. Install Jenkins, Java and Git
   [root@thermalite ~]# wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
   [root@thermalite ~]# rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key
   [root@thermalite ~]# yum install jenkins java git -y

3. Start Jenkins service
   [root@thermalite ~]# systemctl start jenkins.service
   [root@thermalite ~]# systemctl stop jenkins.service
   [root@thermalite ~]# systemctl start jenkins.service
   [root@thermalite ~]# systemctl status jenkins.service

4. Check firewall
[root@thermalite ~]# firewall-cmd --get-active-zones
home
  interfaces: enp2s0

[root@thermalite ~]# firewall-cmd --list-all
home (active)
  target: default
  icmp-block-inversion: no
  interfaces: enp2s0
  sources:
  services: ssh mdns samba-client dhcpv6-client http jenkins
  ports:
  protocols:
  masquerade: no
  forward-ports:
  source-ports:
  icmp-blocks:
  rich rules:

[root@thermalite ~]#

5. Open browser url: http://192.168.1.100:8080

6. Edit /etc/sysconfig/jenkins to change port from 8080 to 9191
     JENKINS_PORT="9191"

7. Restart Jenkins
[root@thermalite ~]# systemctl stop jenkins
[root@thermalite ~]# systemctl start jenkins
[root@thermalite ~]# systemctl status jenkins


sudo usermod -s /bin/bash jenkins
sudo usermod -m /var/lib/jenkins jenkins
sudo su - jenkins
curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enabled

No comments:

Post a Comment