forked from sarahstoneB/DevOpsMaterial
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNotes.txt
More file actions
80 lines (73 loc) · 2.77 KB
/
Copy pathNotes.txt
File metadata and controls
80 lines (73 loc) · 2.77 KB
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
http://www.javacreed.com/why-should-we-use-maven/
Rhel - 52.33.171.216
http://ec2-52-33-171-216.us-west-2.compute.amazonaws.com:8080/jenkins/
http://www.davidghedini.com/pg/entry/install_tomcat_8_on_centos --> installing tomcat
+++++++++++++++++++
Keep your putty session alive:
Create a keepmealive.sh file with following content, save and run
#/bin/sh
while clear ;echo "I'm alive, press Ctrl+C to get shell back" ; do sleep 10 ; done
+++++++++++++++++++
+++++++++++++++++
# useradd -ou 0 -g 0 loki --> creating a user with root privileges
# passwd loki --> assigning the pwd
+++++++++++++++++
+++++++++++++++++++
Command to download file from net
curl -o /home/loki/config.ru https://github.com/puppetlabs/puppet/blob/master/ext/rack/config.r
+++++++++++++++++++
Setting up tomcat java and jenkins
1.create a separate folder
2.copy Tomcat binary files (tar xvzf apache-tomcat-8.gz)
3.copy JDK binary files (tar xvzf jdk-8u65-linux-x64.gz)
4.set the user names in tomcat-users.xml
/home/loki/tc/apache-tomcat-8.0.28/conf/
<role rolename="admin"/>
<role rolename="admin-gui"/>
<role rolename="admin-script"/>
<role rolename="manager"/>
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<user name="admin" password="adminadmin" roles="admin,manager,admin-gui,admin-script,manager-gui,manager-script,manager-jmx,manager-status" />
<user name="loki" password="loki" roles="admin,manager,admin-gui,admin-script,manager-gui,manager-script,manager-jmx,manager-status" />
5. Need to set java_home like below, if you want to set these permanentely then need put it .bashrc profile
JAVA_HOME=/home/loki/java/jdk1.8.0_65
export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH
export PATH
6. If you want to restart tomcat whenever the server is rebooted then need to create a file under /etc/init.d and follow the instructions.
--vi /etc/init.d/tomcat
--Copy following content, check with catalina_home once if it is changed.
#!/bin/bash
# description: Tomcat Start Stop Restart
# processname: tomcat
# chkconfig: 234 20 80
JAVA_HOME=/home/loki/java/jdk1.8.0_65
export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH
export PATH
CATALINA_HOME=/home/loki/tc/apache-tomcat-8.0.28
case $1 in
start)
sh $CATALINA_HOME/bin/startup.sh
;;
stop)
sh $CATALINA_HOME/bin/shutdown.sh
;;
restart)
sh $CATALINA_HOME/bin/shutdown.sh
sh $CATALINA_HOME/bin/startup.sh
;;
esac
exit 0
--change permissions of the file chmod 755 tomcat
--To set up the config to run in every rebot run these commands
chkconfig --add tomcat
chkconfig --level 234 tomcat on
chkconfig --list tomcat
6. service tomcat restart
7. Review the catalina.out file for errors.
8.Manage Memory Usage Using JAVA_OPTS. Add this line into catalina.sh
JAVA_OPTS="-Xms128m -Xmx128m"