Sponsored Content
Top Forums Shell Programming and Scripting How to restart the tomcat server Post 302244523 by nua7 on Wednesday 8th of October 2008 05:26:50 AM
Old 10-08-2008
This can be used..


Code:
#!/bin/bash

export OPTS=$*

if [ ! -z "$OPTS" ]; then
   grep -v "EXTRA_JAVA_OPTS" /etc/tomcat5/tomcat5.conf > /tmp/tomcat5.conf
   cp /tmp/tomcat5.conf /etc/tomcat5/tomcat5.conf
   echo EXTRA_JAVA_OPTS=\"$OPTS\" >> /etc/tomcat5/tomcat5.conf
   echo "JAVA_OPTS=\"\$EXTRA_JAVA_OPTS \$JAVA_OPTS\";export JAVA_OPTS" >> /etc/tomcat5/tomcat5.conf
fi

/sbin/service tomcat5 restart

 

10 More Discussions You Might Find Interesting

1. Linux

jsp not working on linux running tomcat server

hey there we cant seem to get jsp to load pages properly on linux running tomcat 4 server. everytime we run .jsp files, the source code comes up instead of the actual file contents. any suggestions?? cheers mile1982 (1 Reply)
Discussion started by: mile1982
1 Replies

2. UNIX for Dummies Questions & Answers

TomCat access in an Remote Linux Server

Hi all, I Installed Tomcat in an remote linux server (/usr/tomcat)and start service, using ./startup.sh (and tried with ./catalina.sh too). //----------------------------------------------------------------// # ./startup.sh Using CATALINA_BASE: /usr/tomcat/apache-tomcat-6.0.16/ Using... (1 Reply)
Discussion started by: gothama
1 Replies

3. IP Networking

can I use tomcat server for my chatting application?

Hello, I have a socket programming code to do chatting(both server and client). But this is limited to a single machines with multi users. But my target is to perform chat operation on multiple IP addresses in a given LAN in college. Can you please tell me if I can use TOMCAT as my server to... (3 Replies)
Discussion started by: nsharath
3 Replies

4. Solaris

what is the difference between http & Tomcat web server

I do not know the difference between the apache-http and the apche-Tomcat.Is they are differentiated on their version or on their features.:confused: (2 Replies)
Discussion started by: jayaprakash
2 Replies

5. Shell Programming and Scripting

Trouble getting consistent PID of tomcat server from ps

Hello all, I am working on a script to automate the process of restarting some tomcat servers. The versions of tomcat are pretty old and it often happens that they don't shut down gracefully and the PID needs to be manually killed. I am having a bear of a time getting a consistent PID from ps... (1 Reply)
Discussion started by: dkaplowitz
1 Replies

6. Programming

Need a little help in running jsp pages(Tomcat server).

Hi, I have installed following software on my linux machine. Is there anything else required to run jsp pages on linux machine? Please Help Here are some details that might be helpful. # lsb_release -a LSB Version: ... (3 Replies)
Discussion started by: pinga123
3 Replies

7. Shell Programming and Scripting

how to debug an expect script running on a tomcat server

Hello everyone, I have a small expect script as follows; #!/usr/bin/expect -f set force_conservative 0 ;# set to 1 to force conservative mode even if ;# script wasn't run conservatively originally if {$force_conservative} { set send_slow {1 .1} proc send {ignore arg}... (1 Reply)
Discussion started by: randeel
1 Replies

8. Linux

How to push Tomcat logs to remote syslog server?

I found a script for automatically push tomcat logs to syslog server which is locate in same server. How do I change it to push logs to remote server? log4j.rootLogger=INFO, WARN, console, file, SYSLOG log4j.appender.file=org.apache.log4j.RollingFileAppender log4j.appender.file.append=true... (2 Replies)
Discussion started by: heshandh
2 Replies

9. UNIX and Linux Applications

How to Monitor Tomcat App Server?

Tomcat stops logging intermittently for brief intervals of time like for 5 or 6 secs I wish to monitor if my Tomcat process gets stuck, hung or even shutdown or remains healthy at the time i see the problem of no logging. Can you please let me know how can i monitor Tomcat Application... (10 Replies)
Discussion started by: mohtashims
10 Replies

10. UNIX for Advanced & Expert Users

Building an apache-tomcat server

Hi, I have been assigned a task to build a server with these requirements : > has multiple tomcats running under the same apache. > tomcat & jdk has to be binded with apache. > latest openssl with all necesarry "mod" to bind with apache & tomcat. I am fairly new to... (1 Reply)
Discussion started by: anaigini45
1 Replies
SYSCTL.CONF(5)                                                     File Formats                                                     SYSCTL.CONF(5)

NAME
sysctl.conf - sysctl preload/configuration file DESCRIPTION
sysctl.conf is a simple file containing sysctl values to be read in and set by sysctl. The syntax is simply as follows: # comment ; comment token = value Note that blank lines are ignored, and whitespace before and after a token or value is ignored, although a value can contain whitespace within. Lines which begin with a # or ; are considered comments and ignored. EXAMPLE
# sysctl.conf sample # kernel.domainname = example.com ; this one has a space which will be written to the sysctl! kernel.modprobe = /sbin/mod probe FILES
/run/sysctl.d/*.conf /etc/sysctl.d/*.conf /usr/local/lib/sysctl.d/*.conf /usr/lib/sysctl.d/*.conf /lib/sysctl.d/*.conf /etc/sysctl.conf The paths where sysctl preload files usually exist. See also sysctl option --system. SEE ALSO
sysctl(8) AUTHOR
George Staikos <staikos@0wned.org> REPORTING BUGS
Please send bug reports to <procps@freelists.org> procps-ng January 2012 SYSCTL.CONF(5)
All times are GMT -4. The time now is 08:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy