Discussion:
[Dspace-tech] environment variable for dspace
sadik kenza
2004-06-24 13:48:10 UTC
Permalink
Hello

does any know where we put the environment variable:

JAVA_OPTS="-Wmx512M -Xms64M -Dfile.encoding=UTF-8"

thanks

Kenza






Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/

Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !Téléchargez Yahoo! Messenger sur http://fr.messenger.yahoo.com
Jason Simms
2004-06-24 15:04:21 UTC
Permalink
Kenza,

This question does not have an immediate answer, because the correct
answer is "it depends." Environment variables are handles differently
depending on which shell you are running. So, for instance, bash is
different the tcsh; although the concepts are the same, the syntax will
vary. For bash, such variables are often placed in .bashrc, but you
can also put them in shell scripts, etc. depending on your needs. A
safe bet would be to look for a file in the user's home directory the
contains the PATH variable, examine its syntax, and then recreate it
for JAVA_OPTS. It should also be similar to how JAVA_HOME is handled,
etc.

--
Jason Simms
Computer Programming and Design
University of Tennessee, Knoxville
865.974.8508
Post by sadik kenza
Hello
JAVA_OPTS="-Wmx512M -Xms64M -Dfile.encoding=UTF-8"
thanks
Kenza
Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/
Dialoguez en direct avec vos amis grâce à Yahoo! Messenger
!Téléchargez Yahoo! Messenger sur http://fr.messenger.yahoo.com
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
DSpace-tech mailing list
https://lists.sourceforge.net/lists/listinfo/dspace-tech
Christine Warren
2004-06-24 15:29:50 UTC
Permalink
Hi,

We have sucessfully set up DSpace on a Linux box which uses a bash shell (I
think). To talk to it we use an SSH client Putty, from a Windows OS to
securely get access to the remote computer (Linux).

So when we open putty in Windows we get this black screen. Before we can
talk to the linux box to run any commands, some environment varibales
including the one that Kenza mentioned must be loaded. They are presently
stored in a file /usr/dspace_config.txt as

export JAVA_OPTS="-Xmx512M -Xms64M -Dfile.encoding=UTF-8"
export JSSE_HOME=$JAVA_HOME/jre/lib
......plus some others

To run this file, in putty, we use the command 'source' [filename] : this
loads all of our environment variables for us. But once putty is closed the
environment variables are lost and so must be loaded again the next time
putty is opened.

Where are these varibles set? Are they set on the linux box or are they set
on the connection between putty and linux?
Why are they erased so that they must be reset everytime Putty opens? I am
looking for a way to load them once and for all.


-----Original Message-----
From: Jason Simms [mailto:***@utk.edu]
Sent: Thursday, June 24, 2004 11:04 AM
To: sadik kenza
Cc: dspace-***@lists.sourceforge.net
Subject: Re: [Dspace-tech] environment variable for dspace


Kenza,

This question does not have an immediate answer, because the correct
answer is "it depends." Environment variables are handles differently
depending on which shell you are running. So, for instance, bash is
different the tcsh; although the concepts are the same, the syntax will
vary. For bash, such variables are often placed in .bashrc, but you
can also put them in shell scripts, etc. depending on your needs. A
safe bet would be to look for a file in the user's home directory the
contains the PATH variable, examine its syntax, and then recreate it
for JAVA_OPTS. It should also be similar to how JAVA_HOME is handled,
etc.

--
Jason Simms
Computer Programming and Design
University of Tennessee, Knoxville
865.974.8508
Post by sadik kenza
Hello
JAVA_OPTS="-Wmx512M -Xms64M -Dfile.encoding=UTF-8"
thanks
Kenza
Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/
Dialoguez en direct avec vos amis grâce à Yahoo! Messenger
!Téléchargez Yahoo! Messenger sur http://fr.messenger.yahoo.com
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
DSpace-tech mailing list
https://lists.sourceforge.net/lists/listinfo/dspace-tech
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
Jason Simms
2004-06-24 15:37:24 UTC
Permalink
These conversations can get messy rather quickly. Talking about
shells, environment variables, scoping of variables, etc. is a thorny
subject.

That having been said, environment variables are, in general, never
global. That is, they are set on a per-shell basis. Some files are,
for lack of a better term, 'sourced' every time a new shell is invoked.
You can put variables (or any other shell commands, for that matter)
in any file, and you do, source that file. This will bring those
commands, variables, etc. into the current shell, but when a new one is
started, you would need to re-source the file (you know this already).

Try putting those files into a file named .profile (don't forget the
leading '.'), located in the user's home directory. Since you are
using bash, the file should already be there (but may not show up on a
directory listing since it has a leading '.'; if so, try 'ls -al' and
you should see it). If you edit that file, you will probably see other
environment variables. That file is sourced each time a bash shell is
invoked, and should solve your problems.

As this is not DSpace-specific, talk to me off-list if your problems
persist (pun intended)...

--
Jason Simms
Computer Programming and Design
University of Tennessee, Knoxville
865.974.8508
Post by Christine Warren
Hi,
We have sucessfully set up DSpace on a Linux box which uses a bash shell (I
think). To talk to it we use an SSH client Putty, from a Windows OS to
securely get access to the remote computer (Linux).
So when we open putty in Windows we get this black screen. Before we can
talk to the linux box to run any commands, some environment varibales
including the one that Kenza mentioned must be loaded. They are presently
stored in a file /usr/dspace_config.txt as
export JAVA_OPTS="-Xmx512M -Xms64M -Dfile.encoding=UTF-8"
export JSSE_HOME=$JAVA_HOME/jre/lib
......plus some others
To run this file, in putty, we use the command 'source' [filename] : this
loads all of our environment variables for us. But once putty is closed the
environment variables are lost and so must be loaded again the next time
putty is opened.
Where are these varibles set? Are they set on the linux box or are they set
on the connection between putty and linux?
Why are they erased so that they must be reset everytime Putty opens?
I am
looking for a way to load them once and for all.
-----Original Message-----
Sent: Thursday, June 24, 2004 11:04 AM
To: sadik kenza
Subject: Re: [Dspace-tech] environment variable for dspace
Kenza,
This question does not have an immediate answer, because the correct
answer is "it depends." Environment variables are handles differently
depending on which shell you are running. So, for instance, bash is
different the tcsh; although the concepts are the same, the syntax will
vary. For bash, such variables are often placed in .bashrc, but you
can also put them in shell scripts, etc. depending on your needs. A
safe bet would be to look for a file in the user's home directory the
contains the PATH variable, examine its syntax, and then recreate it
for JAVA_OPTS. It should also be similar to how JAVA_HOME is handled,
etc.
--
Jason Simms
Computer Programming and Design
University of Tennessee, Knoxville
865.974.8508
Post by sadik kenza
Hello
JAVA_OPTS="-Wmx512M -Xms64M -Dfile.encoding=UTF-8"
thanks
Kenza
Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/
Dialoguez en direct avec vos amis grâce à Yahoo! Messenger
!Téléchargez Yahoo! Messenger sur http://fr.messenger.yahoo.com
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
DSpace-tech mailing list
https://lists.sourceforge.net/lists/listinfo/dspace-tech
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
DSpace-tech mailing list
https://lists.sourceforge.net/lists/listinfo/dspace-tech
Jörn Nettingsmeier
2004-06-24 17:20:17 UTC
Permalink
the cleanest solution is to set all environment variables that
tomcat needs in the tomcat startup script (/etc/init.d/tomcat on
system v unixes, /etc/rcsomething on bsd machines).

Christine Warren wrote:
<snip>
Post by Christine Warren
Where are these varibles set?
in a number of places :) see below.
Post by Christine Warren
Are they set on the linux box or are they set
on the connection between putty and linux?
they are only set for the current shell you are using, and this
shell runs on the linux box. ssh (putty) only provides secure access
to that shell.
for example, when you start another putty session, it will get a new
shell process and will not have any of the environment vars you have
set in the first one.

you can view your environment with the "env" command, or print
single settings with "echo $VAR_NAME".
Post by Christine Warren
Why are they erased so that they must be reset everytime Putty opens? I am
looking for a way to load them once and for all.
root can define system-wide settings in /etc/profile, and each user
can set their own defaults in ~/.profile or ~/.bash_profile. those
settings will be present in any shell you open.

the details depend on the shell you are using.
you can find it out by typing "ps", the first process you see will
be something like "sh", "bash", "tcsh" or the like. read the
corresponding man page, scroll down to the FILES section (usually at
the very end) [*], and there you will find more info on how to set
defaults for your shell.


best,

jörn



[*] shell man pages can reach up to three times around the equator,
so you might want to try hitting "END" or "ESC"-">" to jump to the
end instead of scrolling.
--
If you give a man a fish you will feed him for a day. If you give a
man Tech Support he will call you for the rest of his life.
- Gordon Wolfe

Jörn Nettingsmeier, EDV-Administrator
Institut für Politikwissenschaft
Universität Duisburg-Essen, Campus Duisburg
Tel.: 0203/379-1419, Fax: 0203/379-2318
Aneesh Joy
2004-06-25 04:20:51 UTC
Permalink
Post by sadik kenza
Hello
JAVA_OPTS="-Wmx512M -Xms64M -Dfile.encoding=UTF-8"
I think including this line in the beginning
of the tomcat startup script 'startup.sh' located in

$CATELINA_HOME/bin

will serve the purpose

Regards
Aneesh
--
----------------------------------------
A n e e s h J o y
National Center for Science Information
Indian Institute of Science
Bangalore - 560012

E-mail : ***@ncsi.iisc.ernet.in
Tel : +91-080-22932511 extn. 25
----------------------------------------
Loading...