Red Hat / Fedora :: Permanently Setting Environmental Variables?
Aug 6, 2010
I installed Java on a server and anytime I have to start or stop a service that requires the $JAVA_HOME variable I have to manually set it with the export command such as: Code: export JAVA_HOME=/usr/java-jdk1.6.0_21 How can I permanently set this variable?
View 3 Replies
ADVERTISEMENT
Aug 25, 2011
I was using the command export, but it looks that after some time the set variables disappears. What is the easiest way of setting an environment variable forever?
View 2 Replies
View Related
Dec 24, 2010
I have installed ubuntu10.04 LTS in VirtualBox in my home computer(i forgot to tell you i am very new to linux-though i am studying a lot, but....-maybe because of my age "45" i am going slow. LOL. I hope i dont have a heart attack before i finish what i am trying to do in the server). Back to my issue: What i want is to have in the server some enviromental variables running not only for the root user but for all the users,when the server is open and not having to type the following commands every single time i open the terminal. Here are the commands:
export JAVA_HOME=/opt/java
export PATH=$JAVA_HOME/bin:$PATH
export M2_HOME=/opt/maven/maven
export PATH=$M2_HOME/bin:$PATH
[code]....
(where java, maven, tomcat are symbolic links for java jdk, maven and apache-tomcat 5.5.31). Please (LOL) save me from the heart attack, give me the chance to enjoy the holidays with my family!
View 4 Replies
View Related
Apr 15, 2010
I am new in Using Ubuntu, I need to set up environmental variables in Ubuntu, I do the following:
Code:
export JAVA_HOME=/path/to/Java
export PATH=$JAVA_HOME:$PATH
it work fine, but every time I restart the system I have to reset it again Is that the right way to it, or I do something wrong
View 2 Replies
View Related
Jul 23, 2010
For example, if I'm in csh, I can use `setenv VARNAME varVALUE` while I can use export in Bash. Given that the environmental variables are created, can BASH read env vars from csh and vice versa?
View 2 Replies
View Related
Mar 17, 2011
My question has to do with how environmental variables are passed from parent to child processes at the BASH SOURCE CODE level. I have a need to add an environmental variable that has the complete invocation line so that the child process can see it via ENVP.I have been studying the source for a quite a while and can't seem to find how to make the variable pass to the child. In EXECUTE_CMD.c I found a good place to set the variable: I made a routine similar to PUT_COMMAND_NAME_INTO_ENV called PUT_COMMAND_LINE_INTO_ENV which would add "?=THE FULL INVOCATION LINE" as an environmental variable but it doesn't make it to the child. (I've tried names other than '?' but they don't work either.
I'm thinking that there is either a LIST or a attribute associated with those environmental variables that should be passed to the child but I can't find it.
View 1 Replies
View Related
Dec 24, 2009
I am new to Linux. I installed JDK and Apache Tomcat recently but the problem is every time I want to work with them, I have to set the environment variables. I want to run tomcat as a service so that I don't have to set those system variables every time.Can it be done in any way? I am using Tomcat 5.5 and my Kernel version is 2.6.21-1.3194.fc7.
View 3 Replies
View Related
Jul 13, 2010
I have bunch of environment variables that i have to set always for my work.Someone mentioned i can write a script to dp this and i googled it but haven't been successful so far and have to manually do them every time. I have a tcsh shell.I read that i need to change the .login or .tcshrc files but havent been successful in finding these.
View 15 Replies
View Related
Jul 21, 2009
I have adjust the clock to my country current time but after a reboot,all the setting is gone. How to permanently setting the correct time?I have select my country region.
View 2 Replies
View Related
Jul 27, 2011
I'm looking at setting up a script that ssh's into our netapp (server01) and then reports an environmental chassis status list-sensors. being relatively new to programming I'm a little lost. I've gotten this far:
Quote:
#!/bin/bash
SERVER="server01"
USR="root"
OUT="out.txt"
ssh $USR@$SERVER > $OUT
View 4 Replies
View Related
Jul 12, 2010
I'm running into a problem when I try to set a variable to an awk output in c-shell. Right now my command is Code: set STR_MSG_TYPE = `awk -F{ '/msg_type/ {print $2}' <filename> | tr -d }'/''*' ` I then run echo to see what the output is and it returns blank, however, when I run the same awk command from the command line, I get an actual output of "MT-715". Am I setting my variable incorrectly? I do something similar using the date command to set a STR_DATE variable earlier in the code and it works fine and I use the same syntax.
View 1 Replies
View Related
Jan 17, 2010
I have installed RDGEN which comes with VPFIT package. When I run the program it says:
"Failed to find help file"
But I ran the program from its main directory where all the files including help files exist. I think maybe the problem is because of this that THEY say:
"Some environment variables should be set before starting RDGEN".
But I do not know what does this mean and how to do that.
These are the variables:
-ATOMDIR
-RD PRSETUP
-RD PRSETUP
-RDSTART
-VPFSETUP
-VPFPLOTS
Would it be possible for you to tell me what does Setting Variable means in this case?
View 2 Replies
View Related
Aug 23, 2010
Is there a way I can write a file that contains the text which assigns variables, e.g. string="hello world" in a file say, variables.txt and have a shell script assign those variables locally e.g.
#!bin/bash
command_that_saves_variables_locally variables.txt
echo $string
and when I run the script I would get an output of
"hello world"
View 2 Replies
View Related
Sep 4, 2010
I am running an application which requires setting environment variables to be set.At the moment, the way I am achieving this is by exporting the EV at the command line, and then running the app from the command line.I want to be able to run the app from my menu (it is already a menu item after I installed it).How may I set the env var so that it is always available, so I can just run the app from the menu instead of from the CLI?
View 1 Replies
View Related
Jul 4, 2011
I always have to google about setting environment path variables when I install new software. My basic problem is that I dont know whether these variables need to be set globally or not. I have read a number of mails/tutorials which say that Environment variables should be set by simply doing an export ..eg EDITOR=nano export EDITOR
additionally I have read that it should be written into /etc/bash.bashrc
But are these really global variables or local? I want the variables to be set
even after I have logged out.
so I could also write the variable here...
/etc/environment
or here
/etc/profile
View 1 Replies
View Related
May 10, 2010
I have an RHEL 5 server joined to a windows domain. However I wanted to add variable lines to be executed each time a user logs in. However I succeeded to put them in /etc/bashrc file and it worked like a charm.
But its annoying that everytime the user logs in to the shell remotely it displays the whole variables that were declared. Is there a way how to add them once and not to display the output each time the user logs in?
View 10 Replies
View Related
Jul 19, 2010
I would like to set both user and group permissions permanently to be 'rwx' (read-write-execute). I would like these rwx settings for all the future files and folders.
I tried umask 002, chmod etc, but they don't set it for future files.
View 3 Replies
View Related
Apr 6, 2011
mkvmerge -o <filename without extension>_TV.mkv -S <filename> && mkvextract tracks <filename> 3:<filename without extension>.*** && perl /home/brian/Desktop/ass2srt.pl <filename without extension>.*** && rm <filename without extension>.***
Doing these commands for multiple command line file inputs is the goal. So I can just type ./script.sh *.mkv in my terminal.This is what I have so far, but it doesn't work whatsoever.
View 2 Replies
View Related
Mar 19, 2011
I created some new accounts on a dev seat: Code: useradd -m newUser1.Users get created fine and can log in but are missing all the bash files (.bashrc, .bash_history, etc). When these users try to use the up and down arrows to view shell history they get junk characters. I checked and there is no history file in their homes. Where is the environmental variable set and how can I get this working?
View 1 Replies
View Related
Apr 1, 2011
I'm trying to make an environmental variable RPMS that will resolve to a website. I know I have to make the changes in .bash_profile, but all the things I try don't seem to want to work.
I've tried:
PATH=$RPMS:ftp://rha-server/pub/os/rhel5/Server/
or simply just making the variable itself
$RPMS=ftp://rha-server/pub/os/rhel5/Server/
The second one made a variable just fine, but when I attempted to run this command:
rpm -ihv $RPMS/caching-nameserver*
View 5 Replies
View Related
Mar 28, 2011
Code:
/*[workhard@localhost BeginningLinuxProgrammingC3]$ echo new_value 1122
new_value 1122
It's ok when I add value"1122" to a new value. But how can I add value "11 22" to a new value.
#include <stdio.h>
#include<string.h>
#include <stdlib.h>
int main (int argc, char **argv)
[Code]....
View 2 Replies
View Related
Jan 21, 2011
I am Just trying to set the Environmental variable using a script file and my code is as follows:
#!/bin/bash
echo $PATH
PATH=${PATH}:/opt/bin
export PATH
echo Environmental Variable path is Set
echo $PATH
When I am running the above script, from the last line "echo $PATH" I am getting that /opt/bin has been appended to the PATH but again when I am typing echo $PATH in the terminal I am not getting the newly appended path.
View 3 Replies
View Related
Feb 9, 2011
I do this:
Code:
a@b:~$ export A=hi
a@b:~$ echo $A
hi
a@b:~$ bash -c "export A=blah; echo $A"
hi
a@b:~$
Why doesn't the bash command print the new value of $A? Is there a way to make it do so?
View 6 Replies
View Related
Sep 5, 2010
I have bash. I installed Qt libs and want to set environmental variable PATH, I tried some stuff from qt tutorials..
Here is what i tried:
Code:
and it does nothing so i tried
Code:
then checked path
Code:
Now there are two issues
1) the make gives error that header not found( probably make don't have the path)
2) when i closed the terminal and opened it again the PATH I newly entered was not there !
View 3 Replies
View Related
Jul 14, 2009
I came across the following method of how to permanently disabling selinux and it's notifications. Although changing enforcement from the gui into permissive mode does most of the job, the notifications still pop-up when some applications are started.
So to disable it do the following:
open terminal as root and execute:
Quote:
And then change the SELINUX line to SELINUX=disabled
Quote:
This is it. Now reboot the system and selinux will never bother you again.
If you are not a Fedora user and you are using this forum just because we are cooler here then you will not find the /etc/selinux/config as in the fedora releases. What you need to do is to edit the kernel boot line and add selinux=0 at the end:
Quote:
Reboot the system
View 14 Replies
View Related
Feb 4, 2010
I have various repos in my yum.repos.d including rawhide, google, and various others which I can enable on specific yum commands with --enablerepo=reponame.
Question is, how come these aren't enabled by default? When I do a yum repolist they don't show up, which effectively leaves orphan programs.
I can see why you might not want rawhide enabled by default for obvious update reasons, but I might want others to be enabled by default, like google for one.
So how is the default repo anabling/disabling controlled?
View 2 Replies
View Related
Oct 2, 2010
the "Japanese character set input library" keeps showing up on the list of updates. I have no need for japanese character input and have cleaned extraneous languages off the system with bleachbit. how can i make it so this update does not appear anymore?
View 2 Replies
View Related
Jun 16, 2009
How to change Umask value permanently for all user in Red hat Version
View 1 Replies
View Related
Mar 13, 2011
I installed Fedora 14 with the KDE desktop. Can I make Fedora boot to a terminal rather than the GUI? I would want to boot to the terminal just 1 time so I don't want to get rid of the GUI permanently.
View 1 Replies
View Related
Jun 30, 2011
i have a fc-7 machine kernel version (2.6.21-1.3194.fc7). i am able to mount the nfs share form a server. but every time when i reboot my machine. share will go off and again i have to mount the share.. is there a way to Permanently mount The NFS Directory , i mean after reboot share should not go....
View 3 Replies
View Related