In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to configure Tomcat8.0.44 under Linux to use Apr. I hope you will get something after reading this article. Let's discuss it together.
The configuration is as follows
1. Install apr 1.5.2
[root@ecs-3c46] # cd / usr/local/src [root@ecs-3c46 src] # wget http://apache.fayea.com//apr/apr-1.5.2.tar.gz[root@ecs-3c46 src] # tar-xzvf apr-1.5.2.tar.gz [root@ecs-3c46 src] # cd apr-1.5.2 [root@ecs-3c46 apr-1.5.2] #. / configure-- prefix=/usr/local/apr [root@ Ecs-3c46 apr-1.5.2] # make [root@ecs-3c46 apr-1.5.2] # make install
two。 Install apr-util-1.5.4
[root@ecs-3c46] # cd / usr/local/src [root@ecs-3c46 src] # wget http://mirrors.hust.edu.cn/apache//apr/apr-util-1.5.4.tar.gz[root@ecs-3c46 src] # tar-xzvf apr-util-1.5.4.tar.gz [root@ecs-3c46 src] # cd apr-util-1.5.4 [root@ecs-3c46 apr-util-1.5.4] #. / configure -- prefix=/usr/local/apr [root@ecs-3c46 apr-util-1.5.4] # make [root@ecs-3c46 apr-util-1.5.4] # make install
3. If you do not have openssl installed, please install openssl. If you have already installed, continue to the next step.
4. Install the tomcat-native component and find that there is already a related file tomcat-native.tar.gz in the bin directory of tomcat8.0.44
Decompress and get the tomcat-native-1.2.12-src folder.
[root@ecs-3c46 bin] # tar-xzvf tomcat-native.tar.gz [root@ecs-3c46 bin] # cd tomcat-native-1.2.12-src/native [root@ecs-3c46 native] #. / configure-with-apr=/usr/local/apr-with-java-home=/usr/local/java/jdk1.7.0_80-with-ssl=/usr/local/openssl-prefix=/usr/local/tomcat/apache-tomcat-8.0.44 [root@ Ecs-3c46 native] # make [root@ecs-3c46 native] # make install
5.tomcat configuration. Apr is enabled by default for tomcat8.0.44, which is configured on Listener nodes.
A problem occurs after restarting the tomcat service, indicating that Apr has not been successfully used
27-Jul-2017 15:50:13.488 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: / usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Solution:
Create a link to / usr/local/apr/lib/libtcnative-1.so.0.2.12 under the / usr/java/packages/lib/amd64 directory
[root@ecs-3c46 native] # cd / usr/java/ [root@ecs-3c46 java] # mkdir packages/ [root@ecs-3c46 java] # cd packages/ [root@ecs-3c46 packages] # mkdir lib [root@ecs-3c46 packages] # cd lib [root@ecs-3c46 lib] # mkdir amd64 [root@ecs-3c46 lib] # cd amd64 [root@ecs-3c46 amd64] # ln-s / usr/local/apr/lib/libtcnative-1.so.0.2.12 libtcnative-1.so [root@ecs-3c46 amd64] # ln-s / usr/local/apr/lib/libtcnative--1.so.0.2.12 libtcnative-1.so.0
6. Restart tomcat, and if the following message is displayed, it means that the configuration is successful.
27-Jul-2017 16:16:29.479 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library 1.2.12 using APR version 1.5.2.27-Jul-2017 16:16:29.479 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false] Random [true] .27-Jul-2017 16 virtual 16 Jul-2017 29.491 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized (OpenSSL 1.0.2l 25 May 2017) read this article I believe you have a certain understanding of "how to configure Tomcat8.0.44 under Linux to use Apr". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.