JDK
vim /etc/profile
export JAVA_HOME=/usr/local/services/jdk
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
source /etc/profile
nginx
server_tokens off;
apache
Servertokens off 隐藏版本信息
ServerSignature off 隐藏系统信息
tomcat
vim bin/catalina.sh
JAVA_OPTS="$JAVA_OPTS -Xms1024m -Xmx1024m -Xss256m -XX:PermSize=512m -XX:MaxPermSize=512m"
vim tomcat/lib/catalina.jar/org/apache/catalina/util/ServerInfo.properties
server.info=Apache Tomcat X
server.number=X
tengine
server_tag off;
server_info off;
server_tokens off
php
vim php.ini
expose_php = Off
时间: 2024-10-27 19:53:13