There are times in development when you need to see if a software is installed, and to configure the configuration file for a particular software, you need to know where it is installed. But Linux installs the software the way to be more, the useful Yum source installs, has installs the RPM package, also has the tar to decompress the tar to install directly the way. So there's no general way to find out if some software is installed.
Method One: After the General Software installation completes will configure environment variable, can use the Echo method to view its installation directory, or in Cat/etc/profile view
[Robot@hadoop101 ~]$ Echo $HADOOP _home
/opt/modules/hadoop-2.7.2
Method Two: If users know they want to find the package name, you can use the RPM command directly. This command is only available on Linux versions that support RPM, such as Redhat,centos,fedora and SuSE. However, the RPM command can only view the RPM package installation. For example, the installation of the TAR package can not be viewed.
Rpm-qa | grep "Software or package name".
below to see whether Java installation, only query to the RPM installation of the OPENJDK, customized Jdk1.8tar package installation is not found
Method Three: Use Yum query
Yum list #列出所指定的软件包, then add the name of the package you want to look up
Yum List installed #列出所有已安装的软件包
Yum Info installed# lists all installed package information that doesn't make sense
Method Four: If the installed software is already running, you can view its status by using the PS command and where it is installed.
Ps-aux the program name, for example, to see where Hadoop is installed.