What is ANT_HOME - linux

Can someone please explain, What is ANT_HOME?
Like in our environment it's set
-bash-3.2$ echo $ANT_HOME
/mhfidm01/apps/oracle/middleware/modules/org.apache.ant.patch_1.2.0.0_1-7-1.jar

It's the location of where Apache Ant is installed.
Its value should be a directory path, not a JAR file.
From the Ant manual:
Set the ANT_HOME environment variable to the directory where you installed Ant. On some operating systems, Ant's startup scripts can guess ANT_HOME (Unix dialects and Windows NT/2000), but it is better to not rely on this behavior.

Related

how HADOOP_HOME refers hadoop command

I'm completely new to hadoop framework and for the past few months I've been using linux . After I installing hadoop to /usr/local directory. I tried to run hadoop command in CLI and it responds as hadoop command not found, then I figured out environment variables aren't set, so I set the environment variables by the following commands
export HADOOP_HOME=/usr/local/hadoop/
export PATH=$PATH:$HADOOP_HOME/bin/
It worked. Also I know what is an environment variable but my doubt is how does the Shell refers hadoop command by using the HADOOP_HOME variable
HADOOP_HOME does nothing for when you type the hadoop command. (Or anything else in $HADOOP_HOME/bin, for that matter).
The $PATH where all the commands you type into the terminal are looked for.
Just echo $PATH and you'll see all the folders.
HADOOP_HOME is looked for by the hadoop components themselves, and isn't Linux specific.
HADOOP_HOME variable is used by shell files like yarn-config.sh, mapred-config.sh that is why it is required for setting HADOOP_HOME variable so that when config files access it they can reach to main hadoop folder.
If you do not want to define HADOOP_HOME then you need to edit config script files by replacing HAOOP_HOME with the required directory address

Is it possible to install Rust on Linux without admin privileges?

version: 1.0.0 beta 5
I have gotten as as far as running the install.sh script with the argument "--prefix=$HOME/local" (installing to my home directory)
and this works fine, but ldconfig (part of the install.sh process) fails because of lack of root privileges, and then rustc is unable to find the libraries
rustc: error while loading shared libraries: librustc_driver-4e7c5e5c.so: cannot open shared object file: No such file or directory
If you specify a different prefix, you need to set the LD_LIBRARY_PATH environment variable. This is a colon-separated list (like PATH) which is typically not set. You’ll want something like this in your shell config:
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:~/local/lib"

Set slash directory in git bash

I have msysgit installed in my PC. I want to change the path of / using environment variables. Currently it is pointing to c:\program files\git. How can I change this?
Note: I am able to change path of ~ directory using HOME environment variable. I am looking for similar solution for this.
The software package that installs git bash is similar to Cygwin (I think it may be based on Cygwin, but I'm not sure of that). It's designed to emulate a UNIX-like environment under Windows.
As far as I know, the location of the / directory (referred to as the root directory) is fixed when you install the software. If you want / to refer to a different location in the Windows filesystem, you'll need to reinstall the software and, if possible, specify a different location. It can't be changed by setting an environment variable.
What exactly are you trying to do? There may be some way to accomplish your goal other than changing the location of /.

Overriding System Binaries With Home Directory Binaries

I'm trying to compile a piece of software in my home directory (OpenMPI). One of the build dependencies (autoconf) installed on my system is not the newer version asked for by the OpenMPI autogen script. I compiled and installed the newer version of autoconf in my home directory.
Is there anyway for the binary installed in my home directory to "override" the version installed on the system for my session?
I tried setting an alias which works via command line but not for the script used to generate the configure script.
Add the path to the binary you want to override to your $PATH environment variable.
Like PATH=/path/to/binary:$PATH ./compile
Your added path will then be looked up first when trying to find the compile command. It will only be valid for that execution and will not remain after command has returned. You can use export PATH=/path/to/binary/:$PATH and it will be saved for that session.
EDIT: As Eric.J states, you can use which compile which will output the path to the command, just to make sure it's the right one.
You can change the PATH environment variable so that your home directory appears before the system directory, e.g.
PATH=$HOME/bin:$PATH
You can then use the which command to ensure the correct binary is being picked up.

update Apache Ant on CentOS

I need to update Apache Ant on my server.
I downloaded the newest Ant, built it, and (I thought) installed it. But when when I check it says the old version is still installed.
How do I update/replace the previous version of Apache Ant on a CentOS 5.? server?
take care,
lee
As mentioned it's probably getting picked up in your path. Post the output from echo $PATH
To configure your CentOS after installing a new version of Apache Ant, proceed to the following steps:
Locate the directory where the new Ant is located
Set the ANT_HOME environment variable to this directory
Add $ANT_HOME/bin to your PATH
P.S. To modify environment variables, you may edit the /etc/environment file, and reboot, or modify your local .bashrc. Look at your current environment variables by analyzing the output of printenv, e.g., to see the current value of PATH and then add the Ant path to it, e.g.
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/jvm/adoptopenjdk-8-hotspot-amd64/bin:/usr/local/ant/bin

Resources