1.Java开发常用服务端口整理
1?? ?FTP?? ?21 2?? ?ssh/scp?? ?22 3?? ?Telnet?? ?23 4?? ?SMTP?? ?25 5?? ?DNS?? ?53 6?? ?TFTP?? ?69 7?? ?Http/Nginx?? ?80 8?? ?POP3?? ?110 9?? ?SNMP?? ?161 10?? ?Https?? ?443 11?? ?MS SQL SERVER?? ?1433/1434 12?? ?Oracle?? ?1521 13?? ?Zookeeper?? ?2181 14?? ?MySQL?? ?3306 15?? ?Win2003远程登录?? ?3389 16?? ?SVN?? ?3690 17?? ?Kibana?? ?5601 18?? ?RabbitMQ?? ?5672 19?? ?Redis?? ?6379 20?? ?MyCat?? ?8066 21?? ?Tomcat/Jboss?? ?8080 22?? ?ActiveMQ?? ?8161/61616 23?? ?Eurker?? ?8761 24?? ?nacos?? ?8848 25?? ?Kafka?? ?9092 26?? ?Elasticsearch?? ?9200 27?? ?Logstash?? ?9300 28?? ?Zabbix-Agentd?? ?10050 29?? ?Zabbix-Server?? ?10052 30?? ?RocketMQ?? ?10912/10911 31?? ?Dubbo?? ?20880 32?? ?MangoDB?? ?27017
2.tomcat中的项目如何在启动时直接使用第三方jar包?
在tomcat目录下新建cloudlib目录,将第三方jar包放在其下面 然后修改catalina.properties,在common.loader=后面添加,"${catalina.home}/cloudlib/*.jar" common.loader="${catalina.base}/lib","${catalina.base}/lib/*.jar","${catalina.home}/lib","${catalina.home}/lib/*.jar","${catalina.home}/cloudlib/*.jar"
3.tomcat启动时如何指定当前项目运行环境?
方法一:在项目中的application.properties配置文件中指定 方法二:通过tomcat指定:在tomcat/bin/catalina.out中113行处添加如下: JAVA_OPTS="-server -Xmn256m -Xms400m -Xmx400m ?-XX:SurvivorRatio=1 -XX:+HeapDumpOnOutOfMemoryError -Xloggc:/home/appdev/log/dev/consumer/gc.log ?-XX:+PrintGCDetails ?-Djava.security.egd=file:/dev/./urandom -Dspring.profiles.active=prod"
4.一台服务器如何启动多个tomcat
https://blog.csdn.net/zhaoxiace/article/details/84533573?utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-4.no_search_link&spm=1001.2101.3001.4242 需要修改server.xml中的三个端口 (1).监听tomcat关闭的端口(默认为8005) (2).http访问端口(默认为8080端口) (3).负责接收其他http服务器的请求端口(默认为8009),tomcat集群,可以注释掉
8005 8080 8009
一台服务器的情况:以此累加
外网访问:8081+ shutdown: 8001+ ip:50001+ ajp: 8091+
|