Tuesday, 9 February 2021

osboxes VM:-(CentOS7) - Cannot find a valid baseurl for repo: base/7/x86_64

 I have observed this error on CentOS7 VM.  I have tried a couple of things and finally, I have fixed them with the below steps. 


FYI,








#yum update //i got below error








Then I will execute the below commands,

[root@osboxes]# ONBOOT=no

[root@osboxes]# dhclient

[root@osboxes]# yum update













I hope it will help you.

Friday, 9 October 2020

Logrotate with compress and delaycompress options.

Step1:-

[root@sankar ~]#  cat /etc/logrotate.d/sankar_myapp

/var/hvmail/log/myapp_event-processor/logfile.log {
    su root root
    rotate 7
    hourly
    compress
    delaycompress
}
[root@sankar ~]# 


Step2:- Dry run (-d) option

[root@sankar ~]# logrotate -d /etc/logrotate.d/sankar_myapp
...
....


Step3:- 
with the exception of the most recent one, should be compressed.


[root@sankar ~]# cd /var/hvmail/log/myapp_event-processor/ 

[root@sankar  myapp_event-processor]# ls -ltrh
total 28M
-rw-rwxr-x 1  root          root   23K Oct  9 09:03 logfile.log.2.gz
-rw-rwxr-x 1 root           root      421K Oct  9 10:06 logfile.log.1
-rw-rwxr-x 1 root           root      427K Oct  9 10:59 logfile.log