May 2019
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

Categories

May 2019
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

Tomcat log cutting script

time=$(date +%H) end_time=`expr $time – 2`a=$end_timeBF_TIME=$(date +%Y%m%d)_$a:00-$time:00cp /usr/local/tomcat8/logs/catalina.out /var/log/tomcat/oldlog/catalina.$BF_TIME.outecho ” ” > /usr/local/tomcat8/logs/catalina.out

catalina.out

mkdir -p /var/log/tomcat/oldlog/

chmod  +x  /root/tom_log.sh

 crontab -e0 */2 * * * sh /root/tom_log.sh

ls /var/log/tomcat/oldlog/

catalina.20190102_15:00-17:00.out  catalina.20190102_17:00-19:00.out

[…]

docker tomcat + mysql

Build on a clean CentOS image Centos image preparation Pull the Centos image on the virtual machine: docker pull centos Create a container to run the Centos image: docker run -it -d –name mycentos centos /bin/bash Note: There is an error here [ WARNING: IPv4 forwarding is disabled. Networking will not work. ]

Change […]

How to recover “rpmdb open failed” error in RHEL or Centos Linux

You are updating the system through yum command and suddenly power goes down or what happen if yum process is accidentally killed. Post this situation when you tried to update the system again with yum command now you are getting below error message related to rpmdb:

error: rpmdb: BDB0113 Thread/process 2196/139984719730496 failed: BDB1507 Thread […]

Simple way to configure Ngnix High Availability Web Server with Pacemaker and Corosync on CentOS7

Pacemaker is an open source cluster manager software which provide high availability of resources or services in CentOS 7 or RHEL 7 Linux. It has feature of scalable and advanced HA Cluster Manager. This HA cluster manager distributed by ClusterLabs.

Corosync is the core of Pacemaker Cluster Manager as it is responsible for generating […]