Linux The software is installed in more than one place , First, check all the paths of the software installation ( address ).
Here with Mysql take as an example . For example, I installed Mysql, But I don't know where the files are installed , In which folders , You can view all file paths with the following command .
<> lookup pid file location
Here I take mysql take as an example
Use command ps -ef|grep mysql that will do ,--pid-file= The value after this parameter is the application pair
Should pid File path
what ? The app you queried doesn't have this one --pid-file= parameter , Then it means that the application is not specified pid, The random distribution of the system is used , What should I do? ? Create it yourself , Just check the data and create one
[root@admin conf]# ps -ef|grep mysql mysql 2937 1 0 08:53 ? 00:00:00 /bin/sh /
usr/bin/mysqld_safe --basedir=/usr mysql 3167 2937 0 08:53 ? 00:00:15 /usr/sbin/
mysqld-- basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/
plugin--log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --
socket=/var/lib/mysql/mysql.sock --port=3306 root 5084 3905 0 18:51 pts/2 00:00:
00 grep --color=auto mysql [root@admin conf]#
<> Chapter I Find software installation location
1. whereis MySQL enter , If you install it Mysql, The address of the file installation will be displayed , The installation address varies from person to person If you don't install mysql, The file path will not be displayed .
<> Chapter II Query the path where the running file is located ：
If you just query the address of the running file , Just use the following command ( Or with Mysql take as an example )：
1. which MySQL The result will display the address of the running file of the query file
<> Chapter III Linux Check the software installation directory and location 4 Methods
find,whereis,which,locate Fine , Especially the first two commands are better .