SUSE安装、配置APR和Tomcat-Native

  • 安装APR:
下载: wget  http://www.fayea.com/apache-mirror/apr/apr-1.5.1.tar.bz2
或:wget  http://apache.fayea.com/apache-mirror/apr/apr-1.5.1.tar.bz2
tar jxvf apr-1.5.1.tar.bz2
cd apr-1.5.1
./configure --prefix=/usr/local/apr
make && make install
cd ..
rm -rf apr-1.5.1
vi /etc/ld.so.conf
_____________________
添加:
/usr/local/apr/lib
______________________
ldconfig

  • 安装apr-iconv
wget  http://www.fayea.com/apache-mirror/apr/apr-iconv-1.2.1.tar.bz2
tar jxvf apr-iconv-1.2.1.tar.bz2
cd apr-iconv-1.2.1
./configure --prefix=/usr/local/apr-iconv \
--with-apr=/usr/local/apr
make && make install
cd ..
rm -rf apr-iconv-1.2.1

  • 安装apr-util
wget  http://apache.fayea.com/apache-mirror/apr/apr-util-1.5.4.tar.bz2
tar jxvf apr-util-1.5.4.tar.bz2
cd apr-util-1.5.4
./configure --prefix=/usr/local/apr-util \
--with-apr=/usr/local/apr \
--with-apr-iconv=/usr/local/apr-iconv/bin/apriconv
make && make install
cd ..
rm -rf apr-util-1.5.4

vi /etc/ld.so.conf
******************
/usr/local/apr-util/lib
*******************
ldconfig

  • 安装tomcat-native
从Tomcat/bin目录中,解压tomcat-native.tar.gz文件:
# tar -zxvf tomcat-native.tar.gz
得到文件夹:tomcat-native-1.1.33-src
# cd tomcat-native-1.1.33-src/jni/native/
# ./configure --with-apr=/usr/local/apr    (官网中例子的其他参数不需要,会自动找到
# make && make install

配置相关的全局变量:
# vi /etc/profile
添加:export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/apr/lib
# source /etc/profile
# cd ../../../
# rm -r tomcat-native-1.1.33-src

最后,重启tomcat生效。

你可能感兴趣的:(tomcat,SuSE,apr,tomcat-native)