由于在安装tomcat-native软件做关于tomcat与mysql数据库通过nvtive提升tomcat性能的时候编译安装tc-native由于相关软件版本过低,导致无法继续安装,以下是解决思路过程和方法,及缺啥升级啥的原则进行解决思路.完成了相关的工作,

# wget http://archive.apache.org/dist/apr/apr-1.5.2.tar.gz
# wget http://archive.apache.org/dist/apr/apr-util-1.6.1.tar.bz2
# wget http://archive.apache.org/dist/apr/apr-iconv-1.2.2.tar.gz

解决环境依赖:

# yum -y install autoconf
# yum -y install libtool
# tar xvf apr-1.5.2.tar.gz
# cd apr-1.5.2
# ./configure --prefix=/usr/apr
# make
# make install
# echo "/usr/apr/lib" >> /etc/ld.so.conf
```~~
安装apr-util

tar jxvf apr-util-1.6.1.tar.bz2

./configure --prefix=/usr/local/apr-util --with-apr=/usr/apr/

#make #make install

echo "/usr/local/apr-util/lib" >> /etc/ld.so.conf

安装apr-iconv

cd apr-iconv-1.2.2

./configure --prefix=/usr/local/apr-iconv --with-apr=/usr/apr/

make

make install

echo "/usr/local/apr-iconv/lib/iconv" >> /etc/ld.so.conf

./configure --with-apr=/usr/bin/apr-1-config \

--with-java-home=/usr/java/jdk-9.0.1/
--with-ssl=yes
--prefix=/usr/local/native

Error1:configure: error: Found APR 1.3.9. You need version 1.4.3 or newer

./configure --with-apr=/usr/apr/ --with-java-home=/usr/java/jdk-9.0.1/ --with-ssl=yes --prefix=/usr/local/native

Error2: configure: error: Your version of OpenSSL is not compatible with this version of tcnative

Openssl不满足要求,需要升级:

wget https://www.openssl.org/source/openssl-1.1.0g.tar.gz

tar xvf openssl-1.1.0g.tar.gz

cd openssl-1.1.0g

./config --prefix=/usr/local/openssl

./config -t

make 编译

make install 安装