cronolog installation and configuration under Linux

Recently, due to the needs of work, the catalina.out file of tomcat has been continuously expanded, resulting in smaller system disk space, and management is also difficult to manage, so I want to use a tool to divide it. I found the 

installation process of cronolog on the Internet as follows: 

Download (the latest version) 

    # wget http://cronolog.org/download/cronolog-1.6.2.tar.gz 

2. Unzip 

    # tar zxvf cronolog-1.6.2.tar .gz 

3. Enter the directory where the cronolog installation file is located 

    # cd cronolog-1.6.2 

4. Run the installation 

    # ./configure 
    # make 
    # make install 

5. Check the directory where the cronolog is installed (verify whether the installation is successful) 

    # which cronolog 

under normal circumstances Displayed as: /usr/local/sbin/cronolog 

To split catalina.out of tomcat, the following work needs to be done:  The commented line needs to be deleted

vim $TOMCAT$/bin/catalina.sh:

 

if [ -z "$CATALINA_OUT" ] ; then

  #CATALINA_OUT="$CATALINA_BASE"/logs/catalina.out

  CATALINA_OUT="$CATALINA_BASE"/logs/catalina.out.%Y-%m-%d

be

 

#touch "$CATALINA_OUT"

 

#org.apache.catalina.startup.Bootstrap "$@" start \

      #>> "$CATALINA_OUT" 2>&1 "&"

         org.apache.catalina.startup.Bootstrap "$@" start 2>&1 \

      | /usr/local/sbin/cronolog "$CATALINA_OUT" >> /dev/null &

 

#org.apache.catalina.startup.Bootstrap "$@" start \

      #>> "$CATALINA_OUT" 2>&1 "&"

         org.apache.catalina.startup.Bootstrap "$@" start 2>&1 \

 

      | /usr/local/sbin/cronolog "$CATALINA_OUT" >> /dev/null &

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326566523&siteId=291194637