Basic knowledge
How to View Installed Software and Deployed Applications under Linux System
Recently, when I was exploring the construction of the server operating environment with a few small partners, I found that there will be repeated installation of software or it is not clear which software has been installed on the server and which applications have been deployed. This situation should be more obvious for novices. Here is a general idea, if there is any inadequacy, I hope to give some pointers.
1. View the system configuration file (check installed software)
It turns out to be installing software, then the core software generally configures environment variables, and can execute less /etc/profile to view (press G to view the export at the end of the file). Of course, the configuration is not necessarily at the end of the file. Personal habits do not Same, the best way is to press /export and then press Enter to search (additional note: when searching, press n to find down, press N to find up)
It can be predicted from the configuration that jdk, git, maven, tomcat are currently installed on this machine, and whether they have been installed can be verified accordingly, for example: java -version
Of course, not all software will be configured with environment variables, but at least you can preliminarily determine whether the software you are about to install has been installed, and go to the following step 2 for further verification.
2. Check network operation (check deployed applications)
Some services and applications do not configure environment variables and need to be detected by other additional means. There are two ways (recommended 1):
1. View the operation of all services and applications on this machine: netstat -anp
It can be seen from the results that the svn, mysql, nginx services and some java applications have been installed and started. You can view the specific installation information according to the PID or application type.
2. Of course, if you deploy services and applications, you want to be able to access them. It involves the issue of firewall authorization of port access. How to authorize can be viewed at https://www.cnblogs.com/54hsh/p/13355413.html
Check the firewall status: firewall-cmd --list-all
From the results, you can see which ports are authorized. You can verify what service or application is deployed on this port according to the port number: netstat -anp | grep 8080
According to the running status, you can see that the java application deployed on port 8080 is a java application. Check the specific type of application by PID: ps -ef | grep 18224 You can confirm that this is a tomcat service, and you can see the installation path and dependent jdk paths, etc. Information, other ports are viewed in the same way, so they are not listed.
Original address: https://www.cnblogs.com/54hsh/p/13401795.html