Posts

Install and configure rsyslog Centralized logging server in CentOS

 Install and configure rsyslog Centralized logging server in CentOS 6.5 In this tutorial we will learn, how to install and configure rsyslog 7.6 version on RHEL 6.5/CentOS 6.5 .The scenario is, install and setup rsyslog Centralized Logging Server in RHEL/CentOS 6.5. All the logs from client servers will be sent to Centralized logging server i.e rsyslog server. Check Pre-installed rsyslog package Step 1: First of all check the rsyslog package is installed in your system.Generally by-default we get rsyslog version 5.x , after minimal installation of CentOS 6.x / RHEL 6.x We will install the latest rsyslog package. At the time of writing this post, rsyslog stable version 7.6 was available. You can find the latest package information from rsyslog official website Note: By default, RHEL 6.x and CentOS 6.x has rsyslog version 5.x. So here we will update the rsyslog with new version. You can get the rsyslog version information, by using below given two commands rpm -qa|grep rsy...

how to spot a spammer on a server ?

The most important file to check is : Quote from: exim main log /var/log/exim_mainlog There you will find all information about exim operation status. These are also useful command to get stats about exim queue: To list email summaries and counts by domain: #exim -bp | exiqsumm To clear emails older than one day: #exiqgrep -o 86400 -i | xargs exim -Mrm To delete emails from queue FOR a particular user: #exiqgrep -ir email@domain.com | xargs exim -Mrm To delete emails from queue FOR a particular domain: #exiqgrep -ir @domain.com | xargs exim -Mrm To delete emails from queue FROM a particular user: #exiqgrep -if email@domain.com | xargs exim -Mrm To delete emails from queue FROM a particular domain: #exiqgrep -if @domain.com | xargs exim -Mrm

Common reasons for quota problems in cPanel and its fix

1.        There are files owned by the same user elsewhere on the server 2.        The backup directory is being counted towards the users disk quota 3.        Extra log files are being counted towards the users quota 4.        Cpanel was just updated and the quotas are now unlimited   Quick Fix - an easy way to fix quota issues   Step 1 . Log into your server through SSH as the root user.   Step 2. Run he following command /scripts/fixquotas   Advanced Fix - other reasons quotas are not working   Step 1. Find the user account where the quotas are incorrect and login to your server in SSH as root.   Step 2. Go to the users folder and check their disk space being used. cd /home/username du -h or try du -hs   Step 3. Check /etc/passwd and /etc/shadow to make sure there is no weirdness where the ...

how dns works step by step

Once you type your domain name in browser  lynuxadmin.blogspot.in into the address bar. or ping your domain name like. y our system connects to the Internet through an Internet Service Provider.  The ISP’s DNS resolver queries a root nameserver for the proper TLD nameserver. In other words, it asks the root nameserver, Where to find the nameserver for .in  domains. The root nameserver responds with the IP address for the .com nameserver. The ISP’s DNS resolver visits the .com nameserver, using the IP address it got from the root nameserver. It asks the .com nameserver,  Where can I find the nameserver for lynuxadmin.blogspot.com? The .com nameserver responds with the IP address for the lynuxadmin.blogspot.in nameserver. The ISP’s DNS resolver visits your domain’s nameserver and reads the zone file. The zone file shows which IP address goes with the domain. Now that the ISP has the IP address for lynuxadmin.blogspot.in.

Linux Agent - Error - Replication Driver Missing

Linux Agent - Error - Replication Driver Missing If any policy fails in R1soft, then you need to click on the failed policy and check the field "Alerts". If you see error related to "hcpdriver module", like ============================ An exception occurred during the request. The replication driver was not detected (detail: An error occurred while loading the hcpdriver module, please check your system logs; Please run "r1soft-setup --get-module " on your Agent to install one. ). ============================ Then you need to make sure you have installed Kernel-devel & Kernel-headers on your "Agent Server". Run (On clients server); # lsmod | grep hcp If it returns no value, then the hcpdriver not running on your client machine. After that you need perform below steps, 1. Check the current running Kernel # uname -r 2. Check you installed correct Kernel-devel & Kernel-headers # rpm -qa | gre...

How to optimize Apache performance

Apache is modular in that you can add and remove features easily. Multi-Processing Modules (MPMs) provide this modular functionality at the core of Apache -- managing the network connections and dispatching the requests. MPMs let you use threads or even move Apache to a different operating system. Only one MPM can be active at one time, and it must be compiled in statically with  --with-mpm=(worker|prefork|event) . The traditional model of one process per request is called  prefork . A newer, threaded, model is called  worker , which uses multiple processes, each with multiple threads to get better performance with lower overhead. The final,  event MPM is a module that keeps separate pools of threads for different tasks. To determine which MPM you're currently using, execute  httpd -l Choosing the correct MPM to use depends on many factors. On the surface, threading sounds better than forking, if all the underlying modules are thread safe, including al...

Work with iptables rule

1) Save the current Firewall rules to some file. (In case something goes wrong we can quickly revert the settings. # iptables-save > /tmp/iptables.bkup 2) Now edit the file /tmp/iptables and copy paste the below command for making the port public. # iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT 3) The below command will write the new changes of iptables into the memory. # iptables-restore < /tmp/iptables.bkup 4) The below command will make the firewall changes permanent. After reboot also the new changes will not be lost. # /etc/init.d/iptables save 5) Alternatively we can issue the below commands for making the ports public through terminal and we can save the iptables rules. # iptables -I INPUT -p tcp -m tcp --dport 443 -j ACCEPT # iptables -I INPUT -p tcp -m tcp --dport 3306 -j ACCEPT