Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ Install apr support for Tomcat on Linux     - Analytical Ceph: handle network layer (Server)

- View processes and threads under Linux (Linux)

- How to enable fbcon in Debian (Linux)

- Java Generics (Programming)

- Linux system components Detailed log (Linux)

- Ubuntu 12.04 / 14.04 users to install software LyX document processing (Linux)

- Python format string (Programming)

- Django Web dynamic three linkage (Programming)

- Using shell users or virtual users to login to pureftpd (Linux)

- How to clear the DNS query cache under Linux / Unix / Mac (Linux)

- VirtualBox install Windows 8.1 has encountered an error 0x000000C4 solutions (Linux)

- Reset CentOS / RHEL root account password 7 (Linux)

- KVM installation under CentOS 5.5 (Linux)

- An example of troubleshooting of embedded Linux OpenWRT (Linux)

- Android float ball and boot from the start (Programming)

- How do I switch from NetworkManager to systemd-network on Linux (Linux)

- How to publish projects to the Jcenter repository using Gradle in Android Studio (Programming)

- Detailed installation OpenCV2.3.1 under CentOS 6.5 (Linux)

- MySQL various log summary (Database)

- Linux environment MySQL master-slave synchronization (Database)

 
         
  Install apr support for Tomcat on Linux
     
  Add Date : 2017-08-31      
         
         
         
  Apache recommends apr support for Tomcat installation, but apache-tomcat- < version> .tar.gz is not installed and needs to be compiled and installed separately. This article describes how to install apr support.

table of Contents

0, the premise
1, ready to download
2, the installation of apr
3, the installation apr-util
4, the installation of tomcat-native
5, the overall inspection installation
6, after the installation configuration
7, the results of testing
8, Postscript

In the installation and configuration of JDK and tomcat, you can provide web access support, but the information in the boot which will be related to the tips that you are required to install apr support, and install the apr support the need to use the source code step by step.

Please follow me, use the source code to install apr support.
 
0, the premise

1. Please install and configure the JDK and tomcat, and create a link file, so

/ Usr / java / jdk
 

Equivalent to the root directory of the JDK

/ Usr / local / tomcat

The equivalent of tomcat root directory.

2. Has been installed openssl development kit, whether it is installed by source code or using the package manager installation, use the package manager can be installed

Yum install openssl-devel

1, ready to download

In order to install apr support, you need to download apr- < version> .tar.gz and apr-util- < version> .tar.gz, the current latest versions are apr-1.5.2.tar.gz and apr-util-1.5. 4.tar.gz, this is my second time to install the version.

Download, use Ali cloud image, access speed very fast, or you can use other images

Http: // http: //mirrors.aliyun.com/apache/apr/apr-1.5.2.tar.gz

Http://mirrors.aliyun.com/apache/apr/apr-util-1.5.4.tar.gz

Or can visit the official Apache download site, but not recommended, because it will increase the burden on the server, Apache also repeatedly stressed that they do not directly download from (in fact, download from the mirror site is the same, but also faster)

Http://archive.apache.org/dist/apr/apr-1.5.2.tar.gz

Http://archive.apache.org/dist/apr/apr-util-1.5.4.tar.gz

After downloading these two documents, upload to the system

/ Usr / local / src

Directory, in preparation for the next compiler to install.

2, the installation of apr

Extract apr-1.5.2.tar.gz, get the folder apr-1.5.2, into the folder, the implementation of the following command

./configure
Make
Make install
 

Originally, we can specify the location of the installation, but I am here to acquiescence to, if you want to develop the installation location, please refer to the folder "README" file, which is described. At the same time, if re-designated the installation location, then the location will be followed by the change.

The default installation location is / usr / local / apr, you can check to see if there is this file system directory, as well as files in the directory modify date, etc., to confirm the success of the installation.

Can also be based on the output of each step to determine the success of the command to determine if there is any problem, to be resolved in time for follow-up operation.

 
3, the installation apr-util

Decompress apr-util-1.5.4.tar.gz, get the folder apr-util-1.5.4, into the folder, followed by execution

./configure --with-apr = / usr / local / apr
Make
Make install

Here is the time to configure the directory specified before the installation of the apr directory, if you modify the default path, there should be corresponding to modify.

This installation or installation path to the lib directory under the apr, that is

/ Usr / local / apr / lib

You can enter the directory to view the file information to confirm the success. Can also be based on the output of each step to determine the success of the command to determine if there is any problem, to be resolved in time for follow-up operation.
 
4, the installation of tomcat-native

 Tomcat-native? What is it? In front of no download ah?

Indeed, I just started when the Internet search is also very confusing, but one person said, "just download the tomcat bin directory below", I went to see a bit, and sure enough there! .

We will install the tomcat tomcat-native.tar.gz bin directory to copy the file

/ Usr / local / src

, And unzip it to get the directory tomcat-native- < version> -src. There is a description in this directory that tells us how to build it.

Into the directory

Jni / native

Directory, this directory is the file we need the file, followed by the implementation of the following command

./configure --with-apr = / usr / local / apr --with-java-home = / usr / java / jdk
Make
Make install

Here, apr directory to use when installing apr in front of the directory, if modified, please also modify the corresponding, java directory to use jdk root directory, if not this also modify.

After the above command is executed, it will be in the directory

/ Usr / local / apr / lib

To generate the corresponding file, you can view the file to confirm the installation is successful. Can also be based on the output of each step to determine the success of the command to determine if there is any problem, to be resolved in time for follow-up operation.
 
5, the overall inspection installation

Installation success or not, depends on the installation directory on the line, the following command output should be similar to the greater the country out of the case, please double-check

[Root @ CooVox-U100 apr] # pwd
/ Usr / local / apr
[Root @ CooVox-U100 apr] # ls -l
Total 16
Drwxr-xr-x 2 root root 4096 May 22 10:51 bin
Drwxr-xr-x 2 root root 4096 May 22 10:47 build-1
Drwxr-xr-x 3 root root 4096 May 22 10:47 include
Drwxr-xr-x 3 root root 4096 May 22 11:44 lib
[Root @ CooVox-U100 apr] # cd lib /
[Root @ CooVox-U100 lib] # ls -l
Total 5164
-rw-r - r-- 1 root root 9278 May 22 10:47 apr.exp
-rw-r - r-- 1 root root 5272 May 22 10:51 aprutil.exp
-rw-r - r-- 1 root root 933930 May 22 10:47 libapr-1.a
-rwxr-xr-x 1 root root 972 May 22 10:47 libapr-1.la
Lrwxrwxrwx 1 root root 17 May 22 10:47 libapr-1.so -> libapr-1.so.0.5.2
Lrwxrwxrwx 1 root root 17 May 22 10:47 libapr-1.so.0 -> libapr-1.so.0.5.2
-rwxr-xr-x 1 root root 639267 May 22 10:47 libapr-1.so.0.5.2
-rw-r - r-- 1 root root 565304 May 22 10:51 libaprutil-1.a
-rwxr-xr-x 1 root root 1070 May 22 10:51 libaprutil-1.la
Lrwxrwxrwx 1 root root 21 May 22 10:51 libaprutil-1.so -> libaprutil-1.so.0.5.4
Lrwxrwxrwx 1 root root 21 May 22 10:51 libaprutil-1.so.0 -> libaprutil-1.so.0.5.4
-rwxr-xr-x 1 root root 416002 May 22 10:51 libaprutil-1.so.0.5.4
-rw-r - r-- 1 root root 372902 May 22 10:51 libexpat.a
-rwxr-xr-x 1 root root 928 May 22 10:51 libexpat.la
Lrwxrwxrwx 1 root root 17 May 22 10:51 libexpat.so -> libexpat.so.0.5.0
Lrwxrwxrwx 1 root root 17 May 22 10:51 libexpat.so.0 -> libexpat.so.0.5.0
-rwxr-xr-x 1 root root 329742 May 22 10:51 libexpat.so.0.5.0
-rw-r - r-- 1 root root 1136746 May 22 11:44 libtcnative-1.a
-rwxr-xr-x 1 root root 1055 May 22 11:44 libtcnative-1.la
Lrwxrwxrwx 1 root root 23 May 22 11:44 libtcnative-1.so -> libtcnative-1.so.0.1.33
Lrwxrwxrwx 1 root root 23 May 22 11:44 libtcnative-1.so.0 -> libtcnative-1.so.0.1.33
-rwxr-xr-x 1 root root 794996 May 22 11:44 libtcnative-1.so.0.1.33
Drwxr-xr-x 2 root root 4096 May 22 11:44 pkgconfig

6, after the installation configuration

After installation also need to be configured to enable apr.

Modify the file

/ Etc / profile

Find the end of the file in

Export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC JAVA_HOME

& Lt; / RTI & gt;

# Tomcat-apr
Export LD_LIBRARY_PATH = $ LD_LIBRARY_PATH: / usr / local / apr / lib

Then you can save the file.

Finally, do not forget to make this configuration effective, use the following command (restart the machine can also be)

Source / etc / profile

7, the results of testing

        After the implementation of the above steps, even if the installation is complete, but in the end there is no success, the following to verify.

        First delete the tomcat all running records, and then start tomcat, view the file

Catalina.out

Carefully look for this file in the middle section if there is something like this output

22-May-2015 11: 46: 11.393 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent
 Loaded APR based Apache Tomcat Native library 1.1.33 using APR version 1.5.2.
22-May-2015 11: 46: 11.393 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent
 APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
22-May-2015 11: 46: 11.851 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL
 OpenSSL successfully initialized (OpenSSL 0.9.8e-rhel5 01 Jul 2008)

It means that the installation and configuration are successful; but if it is similar to this, (in fact, when not installed is the case)

22-May-2015 14: 05: 57.427 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 / i386: / lib: / usr / lib
 


It shows no success.
 
8, Postscript

        The entire installation process is not complicated, step by step in accordance with the steps, very law-abiding, the need is a bold attempt to heart! .

        It is said that the apr installed tomcat can improve performance, I do not know if it is true, but it seems to be able to support the OpenSSL The eh, after the time to try!
     
         
         
         
  More:      
 
- Some safety precautions of Linux servers (Linux)
- VMware ghost Linux card error (Linux)
- Ubuntu PPA install SMPlayer 14.9 (Linux)
- Virt Related Command Summary (Linux)
- Java reflection Introduction (Programming)
- lolcat: an output terminal rainbow effects in the Linux command-line tool (Linux)
- Linux Shell Scripting multithreading (Programming)
- Graphic Git (Linux)
- Comparison of Nginx and Nginx + (Server)
- Ubuntu and Derivative Edition users install LMMS 0.4.15 (Linux)
- Elaborate .NET Multithreading: Concepts (Programming)
- On the Web application attack techniques Common (Linux)
- Android will save the picture to see the album and timely (Programming)
- Upgrading Oracle 11.2.0.1.0 to 11.2.0.3.0 (Database)
- Physical backup and recovery SYSTEM table space (Database)
- SHELL script to use anti SSH brute force and vsftpd (Linux)
- Ubuntu 14.04 LTS to compile the source code Android4.4.2 (Linux)
- Linux configuration Samba server (Server)
- Ubuntu install Geary (Linux)
- WinSCP to transfer text files will automatically convert the format (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.