apr和日志分隔

1,使用cronolog分隔tomcat的日志。

yum install -y cronolog

2,安装apr,提高tomcat服务性能。

1)http://apr.apache.org/download.cgi
APR
APR-iconv
APR-util
2)APR
mkdir -p /usr/local/apr
tar -zxvf apr-1.5.2.tar.gz
cd apr-1.5.2
./configure --prefix=/usr/local/apr
make & make install
3)API-iconv
tar -zxvf apr-iconv-1.2.2.tar.gz
cd apr-iconv-1.2.2
./configure --with-apr=/usr/local/apr --prefix=/usr/local/apr-iconv
make & make install
4)APR-util
tar -zxvf apr-util-1.5.2.tar.gz
cd apr-util-1.5.2
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr --with-apr-iconv=/usr/local/apr-iconv/bin/apriconv
make & make install
5)tomcat-native
yum install openssl-devel//解决安装apr之后,出现的ssl的问题。(tomcat7)
yum groupinstall "Development Tools"
tar -zxvf tomcat-native.tar.gz
cd /usr/local/tomcat/document-service/bin/tomcat-native-1.2.12-src/native
./configure --with-apr=/usr/local/apr --with-ssl=/usr/local/openssl --with-java-home=/usr/local/java/jdk8/
make & make install
tomcat8,手工安装openssl(https://www.openssl.org/source/)
wget https://www.openssl.org/source/openssl-1.0.2-latest.tar.gz
tar -zxf openssl-1.0.2-latest.tar.gz
cd openssl-1.0.2m
./config --prefix=/usr/local/openssl -fPIC
make & make install
mv /usr/bin/openssl ~
ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/openssl/lib/libcrypto.so.1.1 /usr/lib64/libcrypto.so.1.1
ln -s /usr/local/openssl/lib/libssl.so.1.1 /usr/bin/libssl.so.1.1
openssl version

你可能感兴趣的:(apr和日志分隔)