Category Archives: Linux

Linux being one of the most widely used system now a days we shared tips here which user may find useful
The commands and tricks being shared are already implemented on production servers
which you can use without any worries.

Mod_Security disable

If you want to disable security for one singled domain name you can do it by editing virtualhost in httpd.conf

You can add the below setting in apache’s virtualhost for the domain name

You need to add below rule to disable mod_security

<IfModule mod_security2.c>

SecRuleEngine off

</IfModule>

 

 

An unexpected error occurred. Something may be wrong with WordPress.org

Are you getting error below error in wordpress while installing plugin ?

“An unexpected error occurred. Something may be wrong with WordPress.org”  The solution for this issue is to check file wp-config.php

While troubleshooting issue I see the error was in wp-config.php

I commented out below settings to fix this issue

/** EXAMPLE – proxy settings */
#define(‘WP_PROXY_HOST’, ‘proxy.url.com’);
#define(‘WP_PROXY_PORT’, ‘1234’);
#define(‘WP_PROXY_USERNAME’, ”);
#define(‘WP_PROXY_PASSWORD’, ”);
#define(‘WP_PROXY_BYPASS_HOSTS’, ‘localhost’);

This issue got fixed once I commented the above settings.

 

Domain name Transfer

To transfer the domain name from your old domain registrar to us                                             Please apply using below URL

Once done please make sure the at your old domain registrar

1) You need to disable the privacy Protection                                                                                  2) Disable Theft Protection                                                                                                                 3) Get the EPP or Authorization code and email it to us at support@onlinesupport4u.in along with domain name

Domain name transfer take minimum 5 days to get transferred.

 

“perl: warning: Setting locale failed”

This post shows a simple way of fixing  warning when running perl in linux.

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = “UTF-8”,
LANG = “en_US.UTF-8”
    are supported and installed on your system.
perl: warning: Falling back to the standard locale (“C”).

Solution:

on your home directory:

1. Edit your user bash_profile

vi .bash_profile

2. Insert the following:

export LANGUAGE=en_US.UTF-8

export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8

3. Reload your Bash Profile
# source  .bashrc

This should fix the warning you were getting

 

Lynx file “/etc/lynx.lss” is not available.

Are you getting below error in cpanel for cron  Lynx file “/etc/lynx.lss” is not available” in cpanel server ?  You can fix it using below mentioned setting

 

# vi /var/cpanel/exim.conf.deps   and append it and add below entries                             /etc/lynx.lss

Now Save file and quit and error should dissappear

 

 

 

 

 

How to find the max inode using folder in server in linux ?

Inodes are the important feature on any server which can sometimes be overused by clients in shared hostingTo find the user or folder using max inodes ,

SSH to server as root

#cd /home     ; Change directory to /home

run below command to see the max using inode account

This will show the max inode folder and then can login to the folder and run below command to see the exact folder which is using max inode

for d in *; do echo -n “$d: “; find $d -type f | wc -l; done

Find Brand of Hard disk in Linux server

Want to fine the find the band name or serial number of the hard disk in Linux sever ?           You just need one package called  hdparm which can be installed using below command

#yum -y install hdparm                                                                                                                  To check hard disk specification run below command

# hdparm -I /dev/sda

Below is the result shown
/dev/sda:

ATA device, with non-removable media
Model Number:       ST1000DM003-9YN162
Serial Number:      S1D55TYB
Firmware Revision:  CC4H
Transport:          Serial, SATA Rev 3.0

Fine spammer account in cpanel server

Getting sick of spammers in server and IP blacklisting ?  To find the spammer account in server you need to SSH to server and run below command

awk ‘$3 ~ /^cwd/{print $3}’ /var/log/exim_mainlog | sort | uniq -c | sed “s|^ *||g” | sort -nr

This will show the the path of the user account from where max email was sent  in sorted order.

You can suspended the user and also check if any malicious file in the directory shown.