Skip to content

Commit 3513838

Browse files
committed
added jenkins_installation file
1 parent 23e7f6b commit 3513838

File tree

2 files changed

+85
-5
lines changed

2 files changed

+85
-5
lines changed

jenkins/jenkins_installation.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Install Jenkins on AWS EC2
2+
Jenkins is a self-contained Java-based program, ready to run out-of-the-box, with packages for Windows, Mac OS X and other Unix-like operating systems. As an extensible automation server, Jenkins can be used as a simple CI server or turned into the continuous delivery hub for any project.
3+
4+
5+
### Prerequisites
6+
1. EC2 Instance
7+
- With Internet Access
8+
- Security Group with Port `8080` open for internet
9+
1. Java v1.8.x
10+
11+
## Install Java
12+
1. We will be using open java for our demo, Get the latest version from http://openjdk.java.net/install/
13+
```sh
14+
yum install java-1.8*
15+
#yum -y install java-1.8.0-openjdk-devel
16+
```
17+
18+
1. Confirm Java Version and set the java home
19+
```sh
20+
java -version
21+
find /usr/lib/jvm/java-1.8* | head -n 3
22+
JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-<Java version which seen in the above output>
23+
export JAVA_HOME
24+
PATH=$PATH:$JAVA_HOME
25+
# To set it permanently update your .bash_profile
26+
vi ~/.bash_profile
27+
```
28+
_The output should be something like this,_
29+
```sh
30+
[root@~]# java -version
31+
openjdk version "1.8.0_151"
32+
OpenJDK Runtime Environment (build 1.8.0_151-b12)
33+
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
34+
```
35+
36+
## Install Jenkins
37+
You can install jenkins using the rpm or by setting up the repo. We will set up the repo so that we can update it easily in the future.
38+
1. Get the latest version of jenkins from https://pkg.jenkins.io/redhat-stable/ and install
39+
```sh
40+
yum -y install wget
41+
sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
42+
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
43+
yum -y install jenkins
44+
```
45+
46+
### Start Jenkins
47+
```sh
48+
# Start jenkins service
49+
service jenkins start
50+
51+
# Setup Jenkins to start at boot,
52+
chkconfig jenkins on
53+
```
54+
55+
### Accessing Jenkins
56+
By default jenkins runs at port `8080`, You can access jenkins at
57+
```sh
58+
http://YOUR-SERVER-PUBLIC-IP:8080
59+
```
60+
#### Configure Jenkins
61+
- The default Username is `admin`
62+
- Grab the default password
63+
- Password Location:`/var/lib/jenkins/secrets/initialAdminPassword`
64+
- `Skip` Plugin Installation; _We can do it later_
65+
- Change admin password
66+
- `Admin` > `Configure` > `Password`
67+
- Configure `java` path
68+
- `Manage Jenkins` > `Global Tool Configuration` > `JDK`
69+
- Create another admin user id
70+
71+
### Test Jenkins Jobs
72+
1. Create “new item”
73+
1. Enter an item name – `My-First-Project`
74+
- Chose `Freestyle` project
75+
1. Under the Build section
76+
Execute shell: echo "Welcome to Jenkins Demo"
77+
1. Save your job
78+
1. Build job
79+
1. Check "console output"
80+

maven/How_to_deploy_warfile_on_tomcat_server_using_maven.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ Procedure
1616
<plugins>
1717
<plugin>
1818
<groupId>org.apache.tomcat.maven</groupId>
19-
<artifactId>tomcat8-maven-plugin</artifactId>
19+
<artifactId>tomcat7-maven-plugin</artifactId>
2020
<version>2.2</version>
21-
<configuration>
21+
<configuration>
2222
<url>http://localhost:8080/manager/text</url>
2323
<server>TomcatServer</server>
2424
<path>/helloworld-webapp</path>
25-
</configuration>
26-
</plugin>
27-
</plugins>
25+
</configuration>
26+
</plugin>
27+
</plugins>
2828
```
2929

3030
1. create settings.xml for credentials

0 commit comments

Comments
 (0)