Dear Readers,
In this article,we will see Install Jenkins in Amazon Linux Machine.
Steps to Follow
- Launch Jenkins Machine.
- Connect to Jenkins Linux EC2 Terminal through Putty.
- Switch to root user.
- Update Server Packages.
- Install the Java.
- Configure the Java Home Location.
- Download and Install Jenkins.
- Start the Jenkins.
- Access the Jenkins.
1. Launch Jenkins Machine
we need to open SSH,HTTP and 8080 ports.
Please check below link to Launch Linux EC2 Instance.
We can see “Jenkins” which was created earlier.
2. Connect to Jenkins Linux EC2 Terminal through Putty
1 2 3 4 5 6 7 |
Using username "ec2-user". Authenticating with public key "imported-openssh-key" __| __|_ ) _|( / Amazon Linux 2 AMI ___|\___|___| https://aws.amazon.com/amazon-linux-2/ 5 package(s) needed for security, out of 13 available Run "sudo yum update" to apply all updates. [ec2-user@ip-172-31-34-235 ~]$ |
Switch to root user
1 2 |
[ec2-user@ip-172-31-34-235 ~]$ sudo su [root@ip-172-31-34-235 ec2-user]# |
3. Update Server Packages
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
[root@ip-172-31-34-235 ec2-user]# yum update -y Loaded plugins: extras_suggestions, langpacks, priorities, update-motd amzn2-core | 2.4 kB 00:00:00 Resolving Dependencies --> Running transaction check ---> Package kernel.x86_64 0:4.14.165-133.209.amzn2 will be installed ---> Package kernel-tools.x86_64 0:4.14.165-131.185.amzn2 will be updated ---> Package kernel-tools.x86_64 0:4.14.165-133.209.amzn2 will be an update --> Finished Dependency Resolution Dependencies Resolved ========================================================================================================================================= Package Arch Version Repository Size ========================================================================================================================================= Installing: kernel x86_64 4.14.165-133.209.amzn2 amzn2-core 20 M Updating: kernel-tools x86_64 4.14.165-133.209.amzn2 amzn2-core 126 k Transaction Summary ========================================================================================================================================= Install 1 Package Upgrade 1 Package Total download size: 21 M Downloading packages: Delta RPMs disabled because /usr/bin/applydeltarpm not installed. (1/2): kernel-tools-4.14.165-133.209.amzn2.x86_64.rpm | 126 kB 00:00:00 (2/2): kernel-4.14.165-133.209.amzn2.x86_64.rpm | 20 MB 00:00:00 ----------------------------------------------------------------------------------------------------------------------------------------- Total 54 MB/s | 21 MB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : kernel-4.14.165-133.209.amzn2.x86_64 1/3 Updating : kernel-tools-4.14.165-133.209.amzn2.x86_64 2/3 Cleanup : kernel-tools-4.14.165-131.185.amzn2.x86_64 3/3 Verifying : kernel-tools-4.14.165-133.209.amzn2.x86_64 1/3 Verifying : kernel-4.14.165-133.209.amzn2.x86_64 2/3 Verifying : kernel-tools-4.14.165-131.185.amzn2.x86_64 3/3 Installed: kernel.x86_64 0:4.14.165-133.209.amzn2 Updated: kernel-tools.x86_64 0:4.14.165-133.209.amzn2 Complete! |
4. Install the Java Package
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
[root@ip-172-31-34-235 ec2-user]# yum -y install java-1.8.0-openjdk Loaded plugins: extras_suggestions, langpacks, priorities, update-motd Resolving Dependencies --> Running transaction check ---> Package java-1.8.0-openjdk.x86_64 1:1.8.0.222.b10-0.amzn2.0.1 will be installed --> Processing Dependency: java-1.8.0-openjdk-headless(x86-64) = 1:1.8.0.222.b10-0.amzn2.0.1 for package: 1:java-1.8.0-openjdk-1.8.0.222.b10-0.amzn2.0.1.x86_64 --> Processing Dependency: xorg-x11-fonts-Type1 for package: 1:java-1.8.0-openjdk-1.8.0.222.b10-0.amzn2.0.1.x86_64 --> Processing Dependency: libpng15.so.15(PNG15_0)(64bit) for package: 1:java-1.8.0-openjdk-1.8.0.222.b10-0.amzn2.0.1.x86_64 --> Processing Dependency: libjvm.so(SUNWprivate_1.1)(64bit) for package: 1:java-1.8.0-openjdk-1.8.0.222.b10-0.amzn2.0.1.x86_64 --> Processing Dependency: libjava.so(SUNWprivate_1.1)(64bit) for package: 1:java-1.8.0-openjdk-1.8.0.222.b10-0.amzn2.0.1.x86_64 --> Processing Dependency: libasound.so.2(ALSA_0.9.0rc4)(64bit) for package: 1:java-1.8.0-openjdk-1.8.0.222.b10-0.amzn2.0.1.x86_64 --> Processing Dependency: libX11.so.6()(64bit) for package: 1:java-1.8.0-openjdk-1.8.0.222.b10-0.amzn2.0.1.x86_64 --> Running transaction check ---> Package alsa-lib.x86_64 0:1.1.4.1-2.amzn2 will be installed ---> Package fontconfig.x86_64 0:2.10.95-11.amzn2.0.2 will be installed --> Processing Dependency: fontpackages-filesystem for package: fontconfig-2.10.95-11.amzn2.0.2.x86_64 --> Processing Dependency: font(:lang=en) for package: fontconfig-2.10.95-11.amzn2.0.2.x86_64 ---> Package giflib.x86_64 0:4.1.6-9.amzn2.0.2 will be installed --> Processing Dependency: libSM.so.6()(64bit) for package: giflib-4.1.6-9.amzn2.0.2.x86_64 --> Processing Dependency: libICE.so.6()(64bit) for package: giflib-4.1.6-9.amzn2.0.2.x86_64 ---> Package gtk2.x86_64 0:2.24.31-1.amzn2.0.2 will be installed --> Processing Dependency: pango >= 1.20.0-1 for package: gtk2-2.24.31-1.amzn2.0.2.x86_64 --> Processing Dependency: libXrandr >= 1.2.99.4-2 for package: gtk2-2.24.31-1.amzn2.0.2.x86_64 --> Processing Dependency: atk >= 1.29.4-2 for package: gtk2-2.24.31-1.amzn2.0.2.x86_64 --> Processing Dependency: hicolor-icon-theme for package: gtk2-2.24.31-1.amzn2.0.2.x86_64 --> Processing Dependency: libXcursor.so.1()(64bit) for package: gtk2-2.24.31-1.amzn2.0.2.x86_64 ---> Package java-1.8.0-openjdk-headless.x86_64 1:1.8.0.222.b10-0.amzn2.0.1 will be installed ---> Package libXfixes.x86_64 0:5.0.3-1.amzn2.0.2 will be installed ---> Package libXinerama.x86_64 0:1.1.3-2.1.amzn2.0.2 will be installed ---> Package libXrandr.x86_64 0:1.5.1-2.amzn2.0.2 will be installed ---> Package libxcb.x86_64 0:1.12-1.amzn2.0.2 will be installed --> Processing Dependency: libXau.so.6()(64bit) for package: libxcb-1.12-1.amzn2.0.2.x86_64 ---> Package lksctp-tools.x86_64 0:1.0.17-2.amzn2.0.2 will be installed ---> Package pango.x86_64 0:1.40.4-1.amzn2.0.2 will be installed --> Processing Dependency: libthai(x86-64) >= 0.1.9 for package: pango-1.40.4-1.amzn2.0.2.x86_64 --> Processing Dependency: libXft(x86-64) >= 2.0.0 for package: pango-1.40.4-1.amzn2.0.2.x86_64 --> Processing Dependency: harfbuzz(x86-64) >= 1.0.3 for package: pango-1.40.4-1.amzn2.0.2.x86_64 --> Processing Dependency: libthai.so.0(LIBTHAI_0.1)(64bit) for package: pango-1.40.4-1.amzn2.0.2.x86_64 --> Processing Dependency: libthai.so.0()(64bit) for package: pango-1.40.4-1.amzn2.0.2.x86_64 --> Processing Dependency: libharfbuzz.so.0()(64bit) for package: pango-1.40.4-1.amzn2.0.2.x86_64 --> Processing Dependency: libXft.so.2()(64bit) for package: pango-1.40.4-1.amzn2.0.2.x86_64 ---> Package pcsc-lite-libs.x86_64 0:1.8.8-7.amzn2 will be installed ---> Package stix-fonts.noarch 0:1.1.0-5.amzn2 will be installed ---> Package ttmkfdir.x86_64 0:3.0.9-42.amzn2.0.2 will be installed ---> Package tzdata-java.noarch 0:2019c-1.amzn2 will be installed ---> Package xorg-x11-font-utils.x86_64 1:7.5-20.amzn2.0.2 will be installed --> Processing Dependency: libfontenc.so.1()(64bit) for package: 1:xorg-x11-font-utils-7.5-20.amzn2.0.2.x86_64 --> Processing Dependency: libXfont.so.1()(64bit) for package: 1:xorg-x11-font-utils-7.5-20.amzn2.0.2.x86_64 --> Running transaction check ---> Package avahi-libs.x86_64 0:0.6.31-19.amzn2 will be installed ---> Package harfbuzz.x86_64 0:1.3.2-1.amzn2.0.2 will be installed --> Running transaction check ---> Package graphite2.x86_64 0:1.3.10-1.amzn2.0.2 will be installed ---> Package libglvnd.x86_64 1:1.0.0-1.amzn2.0.2 will be installed ---> Package mesa-libEGL.x86_64 0:17.2.3-8.20171019.amzn2.0.4 will be installed --> Processing Dependency: mesa-libgbm = 17.2.3-8.20171019.amzn2.0.4 for package: mesa-libEGL-17.2.3-8.20171019.amzn2.0.4.x86_64 --> Processing Dependency: libxshmfence.so.1()(64bit) for package: mesa-libEGL-17.2.3-8.20171019.amzn2.0.4.x86_64 --> Processing Dependency: libwayland-server.so.0()(64bit) for package: mesa-libEGL-17.2.3-8.20171019.amzn2.0.4.x86_64 --> Processing Dependency: libwayland-client.so.0()(64bit) for package: mesa-libEGL-17.2.3-8.20171019.amzn2.0.4.x86_64 --> Processing Dependency: libgbm.so.1()(64bit) for package: mesa-libEGL-17.2.3-8.20171019.amzn2.0.4.x86_64 ---> Package mesa-libGL.x86_64 0:17.2.3-8.20171019.amzn2.0.4 will be installed --> Processing Dependency: mesa-libglapi = 17.2.3-8.20171019.amzn2.0.4 for package: mesa-libGL-17.2.3-8.20171019.amzn2.0.4.x86_64 --> Processing Dependency: libglapi.so.0()(64bit) for package: mesa-libGL-17.2.3-8.20171019.amzn2.0.4.x86_64 --> Processing Dependency: libXxf86vm.so.1()(64bit) for package: mesa-libGL-17.2.3-8.20171019.amzn2.0.4.x86_64 ---> Package python-lxml.x86_64 0:3.2.1-4.amzn2.0.2 will be installed --> Running transaction check ---> Package libXxf86vm.x86_64 0:1.1.4-1.amzn2.0.2 will be installed ---> Package libwayland-client.x86_64 0:1.14.0-2.amzn2.0.1 will be installed ---> Package libwayland-server.x86_64 0:1.14.0-2.amzn2.0.1 will be installed ---> Package libxshmfence.x86_64 0:1.2-1.amzn2.0.2 will be installed ---> Package mesa-libgbm.x86_64 0:17.2.3-8.20171019.amzn2.0.4 will be installed ---> Package mesa-libglapi.x86_64 0:17.2.3-8.20171019.amzn2.0.4 will be installed --> Finished Dependency Resolution Dependencies Resolved ========================================================================================================================================= Package Arch Version Repository Size ========================================================================================================================================= Installing: java-1.8.0-openjdk x86_64 1:1.8.0.222.b10-0.amzn2.0.1 amzn2-core 274 k Installing for dependencies: alsa-lib x86_64 1.1.4.1-2.amzn2 amzn2-core 425 k atk x86_64 2.22.0-3.amzn2.0.2 amzn2-core 258 k avahi-libs x86_64 0.6.31-19.amzn2 amzn2-core 62 k cairo x86_64 1.14.8-2.amzn2.0.2 amzn2-core 718 k copy-jdk-configs noarch 3.3-10.amzn2 amzn2-core 21 k cups-libs x86_64 1:1.6.3-40.amzn2 amzn2-core 355 k fontconfig x86_64 2.10.95-11.amzn2.0.2 amzn2-core 231 k fontpackages-filesystem noarch 1.44-8.amzn2 amzn2-core 10 k gdk-pixbuf2 x86_64 2.36.5-1.amzn2.0.2 amzn2-core 567 k giflib x86_64 4.1.6-9.amzn2.0.2 amzn2-core 40 k graphite2 x86_64 1.3.10-1.amzn2.0.2 amzn2-core 115 k gtk-update-icon-cache x86_64 3.22.26-4.amzn2 amzn2-core 27 k gtk2 x86_64 2.24.31-1.amzn2.0.2 amzn2-core 3.4 M libX11-common noarch 1.6.5-2.amzn2.0.2 amzn2-core 164 k libXau x86_64 1.0.8-2.1.amzn2.0.2 amzn2-core 29 k libXcomposite x86_64 0.4.4-4.1.amzn2.0.2 amzn2-core 22 k libXcursor x86_64 1.1.15-1.amzn2 amzn2-core 30 k libXdamage x86_64 1.1.4-4.1.amzn2.0.2 amzn2-core 20 k libXext x86_64 1.3.3-3.amzn2.0.2 amzn2-core 39 k libXfixes x86_64 5.0.3-1.amzn2.0.2 amzn2-core 18 k stix-fonts noarch 1.1.0-5.amzn2 amzn2-core 1.3 M ttmkfdir x86_64 3.0.9-42.amzn2.0.2 amzn2-core 50 k tzdata-java noarch 2019c-1.amzn2 amzn2-core 187 k xorg-x11-font-utils x86_64 1:7.5-20.amzn2.0.2 amzn2-core 87 k xorg-x11-fonts-Type1 noarch 7.5-9.amzn2 amzn2-core 521 k Transaction Summary ========================================================================================================================================= Install 1 Package (+62 Dependent packages) Total download size: 46 M Installed size: 145 M Downloading packages: (1/63): alsa-lib-1.1.4.1-2.amzn2.x86_64.rpm | 425 kB 00:00:00 (2/63): avahi-libs-0.6.31-19.amzn2.x86_64.rpm | 62 kB 00:00:00 (3/63): atk-2.22.0-3.amzn2.0.2.x86_64.rpm | 258 kB 00:00:00 (4/63): copy-jdk-configs-3.3-10.amzn2.noarch.rpm | 21 kB 00:00:00 (5/63): cairo-1.14.8-2.amzn2.0.2.x86_64.rpm | 718 kB 00:00:00 (6/63): cups-libs-1.6.3-40.amzn2.x86_64.rpm | 355 kB 00:00:00 (7/63): fontconfig-2.10.95-11.amzn2.0.2.x86_64.rpm | 231 kB 00:00:00 (8/63): fontpackages-filesystem-1.44-8.amzn2.noarch.rpm | 10 kB 00:00:00 (9/63): gdk-pixbuf2-2.36.5-1.amzn2.0.2.x86_64.rpm | 567 kB 00:00:00 (10/63): giflib-4.1.6-9.amzn2.0.2.x86_64.rpm | 40 kB 00:00:00 (11/63): gtk-update-icon-cache-3.22.26-4.amzn2.x86_64.rpm | 27 kB 00:00:00 (12/63): graphite2-1.3.10-1.amzn2.0.2.x86_64.rpm | 115 kB 00:00:00 (13/63): harfbuzz-1.3.2-1.amzn2.0.2.x86_64.rpm | 181 kB 00:00:00 (14/63): hicolor-icon-theme-0.12-7.amzn2.noarch.rpm | 43 kB 00:00:00 (15/63): jasper-libs-1.900.1-33.amzn2.x86_64.rpm | 150 kB 00:00:00 (16/63): gtk2-2.24.31-1.amzn2.0.2.x86_64.rpm | 3.4 MB 00:00:00 (17/63): java-1.8.0-openjdk-1.8.0.222.b10-0.amzn2.0.1.x86_64.rpm | 274 kB 00:00:00 (18/63): javapackages-tools-3.4.1-11.amzn2.noarch.rpm | 73 kB 00:00:00 (19/63): libICE-1.0.9-9.amzn2.0.2.x86_64.rpm | 67 kB 00:00:00 (20/63): libSM-1.2.2-2.amzn2.0.2.x86_64.rpm | 39 kB 00:00:00 ----------------------------------------------------------------------------------------------------------------------------------------- Total 46 MB/s | 46 MB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : 2:libpng-1.5.13-7.amzn2.0.2.x86_64 1/63 Installing : libICE-1.0.9-9.amzn2.0.2.x86_64 2/63 Installing : libwayland-client-1.14.0-2.amzn2.0.1.x86_64 3/63 Installing : libfontenc-1.1.3-3.amzn2.0.2.x86_64 4/63 Installing : mesa-libglapi-17.2.3-8.20171019.amzn2.0.4.x86_64 5/63 Installing : libwayland-server-1.14.0-2.amzn2.0.1.x86_64 6/63 Installing : 1:libglvnd-1.0.0-1.amzn2.0.2.x86_64 7/63 Installing : fontpackages-filesystem-1.44-8.amzn2.noarch 8/63 Installing : libxshmfence-1.2-1.amzn2.0.2.x86_64 9/63 Installing : libxslt-1.1.28-5.amzn2.0.2.x86_64 10/63 Installing : python-lxml-3.2.1-4.amzn2.0.2.x86_64 11/63 Installing : python-javapackages-3.4.1-11.amzn2.noarch 12/63 Installing : javapackages-tools-3.4.1-11.amzn2.noarch 13/63 Installing : stix-fonts-1.1.0-5.amzn2.noarch 14/63 Installing : fontconfig-2.10.95-11.amzn2.0.2.x86_64 15/63 Installing : mesa-libgbm-17.2.3-8.20171019.amzn2.0.4.x86_64 16/63 Installing : libXfont-1.5.2-1.amzn2.0.2.x86_64 17/63 Installing : 1:xorg-x11-font-utils-7.5-20.amzn2.0.2.x86_64 18/63 Installing : libSM-1.2.2-2.amzn2.0.2.x86_64 19/63 Installing : graphite2-1.3.10-1.amzn2.0.2.x86_64 20/63 Verifying : libSM-1.2.2-2.amzn2.0.2.x86_64 1/63 Verifying : pango-1.40.4-1.amzn2.0.2.x86_64 2/63 Verifying : 2:libpng-1.5.13-7.amzn2.0.2.x86_64 3/63 Verifying : gdk-pixbuf2-2.36.5-1.amzn2.0.2.x86_64 4/63 Verifying : libxslt-1.1.28-5.amzn2.0.2.x86_64 5/63 Verifying : libxshmfence-1.2-1.amzn2.0.2.x86_64 6/63 Verifying : libXfont-1.5.2-1.amzn2.0.2.x86_64 7/63 Verifying : fontpackages-filesystem-1.44-8.amzn2.noarch 8/63 Verifying : libXdamage-1.1.4-4.1.amzn2.0.2.x86_64 9/63 Verifying : 1:libglvnd-egl-1.0.0-1.amzn2.0.2.x86_64 10/63 Verifying : mesa-libgbm-17.2.3-8.20171019.amzn2.0.4.x86_64 11/63 Verifying : cairo-1.14.8-2.amzn2.0.2.x86_64 12/63 Verifying : python-lxml-3.2.1-4.amzn2.0.2.x86_64 13/63 Verifying : libXinerama-1.1.3-2.1.amzn2.0.2.x86_64 14/63 Verifying : libX11-common-1.6.5-2.amzn2.0.2.noarch 15/63 Verifying : atk-2.22.0-3.amzn2.0.2.x86_64 16/63 Verifying : libXext-1.3.3-3.amzn2.0.2.x86_64 17/63 Verifying : pixman-0.34.0-1.amzn2.0.2.x86_64 18/63 Verifying : lksctp-tools-1.0.17-2.amzn2.0.2.x86_64 19/63 Verifying : 1:xorg-x11-font-utils-7.5-20.amzn2.0.2.x86_64 20/63 Installed: java-1.8.0-openjdk.x86_64 1:1.8.0.222.b10-0.amzn2.0.1 Dependency Installed: alsa-lib.x86_64 0:1.1.4.1-2.amzn2 atk.x86_64 0:2.22.0-3.amzn2.0.2 avahi-libs.x86_64 0:0.6.31-19.amzn2 cairo.x86_64 0:1.14.8-2.amzn2.0.2 copy-jdk-configs.noarch 0:3.3-10.amzn2 cups-libs.x86_64 1:1.6.3-40.amzn2 fontconfig.x86_64 0:2.10.95-11.amzn2.0.2 fontpackages-filesystem.noarch 0:1.44-8.amzn2 gdk-pixbuf2.x86_64 0:2.36.5-1.amzn2.0.2 giflib.x86_64 0:4.1.6-9.amzn2.0.2 graphite2.x86_64 0:1.3.10-1.amzn2.0.2 gtk-update-icon-cache.x86_64 0:3.22.26-4.amzn2 gtk2.x86_64 0:2.24.31-1.amzn2.0.2 harfbuzz.x86_64 0:1.3.2-1.amzn2.0.2 hicolor-icon-theme.noarch 0:0.12-7.amzn2 jasper-libs.x86_64 0:1.900.1-33.amzn2 java-1.8.0-openjdk-headless.x86_64 1:1.8.0.222.b10-0.amzn2.0.1 javapackages-tools.noarch 0:3.4.1-11.amzn2 libICE.x86_64 0:1.0.9-9.amzn2.0.2 libSM.x86_64 0:1.2.2-2.amzn2.0.2 libX11.x86_64 0:1.6.5-2.amzn2.0.2 libX11-common.noarch 0:1.6.5-2.amzn2.0.2 libXau.x86_64 0:1.0.8-2.1.amzn2.0.2 libXcomposite.x86_64 0:0.4.4-4.1.amzn2.0.2 libXcursor.x86_64 0:1.1.15-1.amzn2 libXdamage.x86_64 0:1.1.4-4.1.amzn2.0.2 libXext.x86_64 0:1.3.3-3.amzn2.0.2 libXfixes.x86_64 0:5.0.3-1.amzn2.0.2 libXfont.x86_64 0:1.5.2-1.amzn2.0.2 libXft.x86_64 0:2.3.2-2.amzn2.0.2 libXi.x86_64 0:1.7.9-1.amzn2.0.2 libXinerama.x86_64 0:1.1.3-2.1.amzn2.0.2 libXrandr.x86_64 0:1.5.1-2.amzn2.0.2 libXrender.x86_64 0:0.9.10-1.amzn2.0.2 libXtst.x86_64 0:1.2.3-1.amzn2.0.2 libXxf86vm.x86_64 0:1.1.4-1.amzn2.0.2 libfontenc.x86_64 0:1.1.3-3.amzn2.0.2 libglvnd.x86_64 1:1.0.0-1.amzn2.0.2 libglvnd-egl.x86_64 1:1.0.0-1.amzn2.0.2 libglvnd-glx.x86_64 1:1.0.0-1.amzn2.0.2 libpng.x86_64 2:1.5.13-7.amzn2.0.2 libthai.x86_64 0:0.1.14-9.amzn2.0.2 libwayland-client.x86_64 0:1.14.0-2.amzn2.0.1 libwayland-server.x86_64 0:1.14.0-2.amzn2.0.1 libxcb.x86_64 0:1.12-1.amzn2.0.2 libxshmfence.x86_64 0:1.2-1.amzn2.0.2 libxslt.x86_64 0:1.1.28-5.amzn2.0.2 lksctp-tools.x86_64 0:1.0.17-2.amzn2.0.2 mesa-libEGL.x86_64 0:17.2.3-8.20171019.amzn2.0.4 mesa-libGL.x86_64 0:17.2.3-8.20171019.amzn2.0.4 mesa-libgbm.x86_64 0:17.2.3-8.20171019.amzn2.0.4 mesa-libglapi.x86_64 0:17.2.3-8.20171019.amzn2.0.4 pango.x86_64 0:1.40.4-1.amzn2.0.2 pcsc-lite-libs.x86_64 0:1.8.8-7.amzn2 pixman.x86_64 0:0.34.0-1.amzn2.0.2 python-javapackages.noarch 0:3.4.1-11.amzn2 python-lxml.x86_64 0:3.2.1-4.amzn2.0.2 stix-fonts.noarch 0:1.1.0-5.amzn2 ttmkfdir.x86_64 0:3.0.9-42.amzn2.0.2 tzdata-java.noarch 0:2019c-1.amzn2 xorg-x11-font-utils.x86_64 1:7.5-20.amzn2.0.2 xorg-x11-fonts-Type1.noarch 0:7.5-9.amzn2 Complete! |
Verify Version of Java
1 2 3 4 |
[root@ip-172-31-34-235 ec2-user]# java -version openjdk version "1.8.0_222" OpenJDK Runtime Environment (build 1.8.0_222-b10) OpenJDK 64-Bit Server VM (build 25.222-b10, mixed mode) |
5. Configure the Java Home Location
1 2 3 4 5 6 7 8 |
[root@ip-172-31-34-235 ec2-user]# JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64 [root@ip-172-31-34-235 ec2-user]# echo $JAVA_HOME /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64 [root@ip-172-31-34-235 ec2-user]# export JAVA_HOME [root@ip-172-31-34-235 ec2-user]# PATH=$PATH:$JAVA_HOME [root@ip-172-31-34-235 ec2-user]# echo $JAVA_HOME /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.191.b12-1.el7_6.x86_64 [root@ip-172-31-34-235 ec2-user]# source ~/.bash_profile |
6. Download and Install Jenkins
Install wget command to download something from Internet
1 2 3 4 5 |
[root@ip-172-31-34-235 ec2-user]# yum -y install wget Loaded plugins: extras_suggestions, langpacks, priorities, update-motd amzn2-core | 2.4 kB 00:00:00 Package wget-1.14-18.amzn2.1.x86_64 already installed and latest version Nothing to do |
Download Jenkins Repository
1 2 3 4 5 6 7 8 9 10 11 12 |
[root@ip-172-31-34-235 ec2-user]# wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo --2020-02-18 10:32:55-- https://pkg.jenkins.io/redhat-stable/jenkins.repo Resolving pkg.jenkins.io (pkg.jenkins.io)... 52.202.51.185 Connecting to pkg.jenkins.io (pkg.jenkins.io)|52.202.51.185|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 85 Saving to: ‘/etc/yum.repos.d/jenkins.repo’ 100%[===============================================================================================>] 85 --.-K/s in 0s 2020-02-18 10:32:56 (11.5 MB/s) - ‘/etc/yum.repos.d/jenkins.repo’ saved [85/85] |
Import a key file from Jenkins-CI to enable installation from the package
1 |
[root@ip-172-31-34-235 ec2-user]# rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key |
Install Jenkins
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
[root@ip-172-31-34-235 ec2-user]# yum -y install jenkins Loaded plugins: extras_suggestions, langpacks, priorities, update-motd jenkins | 2.9 kB 00:00:00 jenkins/primary_db | 31 kB 00:00:00 Resolving Dependencies --> Running transaction check ---> Package jenkins.noarch 0:2.204.2-1.1 will be installed --> Finished Dependency Resolution Dependencies Resolved ========================================================================================================================================= Package Arch Version Repository Size ========================================================================================================================================= Installing: jenkins noarch 2.204.2-1.1 jenkins 60 M Transaction Summary ========================================================================================================================================= Install 1 Package Total download size: 60 M Installed size: 60 M Downloading packages: jenkins-2.204.2-1.1.noarch.rpm | 60 MB 00:00:14 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : jenkins-2.204.2-1.1.noarch 1/1 Verifying : jenkins-2.204.2-1.1.noarch 1/1 Installed: jenkins.noarch 0:2.204.2-1.1 Complete! |
7. Start the Jenkins
1 |
[root@ip-172-31-34-235 ec2-user]# systemctl start jenkins |
Verify the status of Jenkins
1 2 3 4 5 6 7 8 9 10 11 12 13 |
[root@ip-172-31-34-235 ec2-user]# systemctl status jenkins ● jenkins.service - LSB: Jenkins Automation Server Loaded: loaded (/etc/rc.d/init.d/jenkins; bad; vendor preset: disabled) Active: active (running) since Tue 2020-02-18 10:37:53 UTC; 16s ago Docs: man:systemd-sysv-generator(8) Process: 9556 ExecStart=/etc/rc.d/init.d/jenkins start (code=exited, status=0/SUCCESS) CGroup: /system.slice/jenkins.service └─9575 /etc/alternatives/java -Dcom.sun.akuma.Daemon=daemonized -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -j... Feb 18 10:37:52 ip-172-31-34-235.ap-south-1.compute.internal systemd[1]: Starting LSB: Jenkins Automation Server... Feb 18 10:37:52 ip-172-31-34-235.ap-south-1.compute.internal runuser[9561]: pam_unix(runuser:session): session opened for user jen...d=0) Feb 18 10:37:53 ip-172-31-34-235.ap-south-1.compute.internal jenkins[9556]: Starting Jenkins [ OK ] Feb 18 10:37:53 ip-172-31-34-235.ap-south-1.compute.internal systemd[1]: Started LSB: Jenkins Automation Server. |
Enable the Jenkins Service
1 |
[root@ip-172-31-34-235 ec2-user]# chkconfig jenkins on |
8. Access the Jenkins
we can access the Jenkins through web page.
Jenkins default port is 8080.
Open browser we need to give Public IP of Jenkins Machine:8080 for accessing Jenkins.
Copy the Public IP of Jenkins
Search Public IP:8080 in browser
We can see the Jenkins page and we need to unlock Jenkins.
Unlock Jenkins
If you want to unlock jenkins we need to provide password.
we will get password by using path ” /var/lib/jenkins/secrets/initialAdminPassword”.
Get Password
Go the path “/var/lib/jenkins/secrets” and open the file “initialAdminPassword” and copy the password.
1 2 |
[root@ip-172-31-34-235 secrets]# cat /var/lib/jenkins/secrets/initialAdminPassword c00a82fdff7747bdbdf7c3a35bd8db9c |
Provide password which was copied and click on continue.
Select Install suggested plugins.
when you select install suggested plugins you will get so many default plugins.
Once select “Install suggested plugins”,it is going to install all default plugins.
It may take 10 minutes to complete.
Create First Admin User
Provide required things to create admin user and click on save and continue.
we can see Jenkins URL “http://13.127.224.139:8080/” and Save and Finish.
Jenkins is ready to use and click on Start using Jenkins.
Finally,we can see the dashboard of Jenkins.
Thank you for giving your valuable time to read the above information.
Follow us on
Website : www.ktexperts.com
Facebook Page : KTexperts
Linkedin Page : KT EXPERTS