Archive for October, 2015

! FAILED TO INSTALL CPAN PERL MODULE(S) CRYPT::PASSWDMD5 !! – EASY APACHE

Well to fix this issue just run following command to install Crypt::PasswdMD5

# /usr/local/cpanel/bin/cpanm -n Digest::SHA1 Crypt::PasswdMD5

Once you have run the above code in SSH try Easy Apache again.

Comments (1)

The perl module installation

install Digest::SHA1 Crypt::PasswdMD5

cpan> install Bundle::CPAN
cpan> reload cpan
cpan> install DateTime  cpan> install DBI  cpan> install DBD::mysql cpan> install Class::Autouse cpan> install Digest::MD5 cpan> install Digest::SHA1 cpan> install HTML::Template cpan> install Image::Size cpan> install MIME::Lite cpan> install MIME::Wordscpan> install Compress::Zlib cpan> install Net::DNS cpan> install URI::URL cpan> install HTML::tagset cpan> install HTML::Parser cpan> install LWP::Simple cpan> install LWP::UserAgentcpan> install GD cpan> install Mail::Address cpan> install Unicode::MapUTF8 cpan> install XML::Simple cpan> install IO::WrapTie cpan> install Unicode::CheckUTF8 cpan> install Captcha::reCAPTCHA cpan> install Digest::HMAC_SHA1

Read the rest of this entry »

Comments

linux inode consume 100 percent solution

What is the inode?

Files stored on the hard disk,HDD minimum storage units called "sectors" (Sector)。Store 512 bytes per sector (equivalent 0.5KB)。
Operating system hard to read when,Not read a sector,Such efficiency is too low,But sequential read more sectors at once,That is a one-time read "block" (block)。This from a plurality of sectors "chunks",It is the smallest unit file access。Size "chunks",The most common is 4KB,That is a block consisting of eight consecutive sector。
Data files are stored in the "block" in the,Then it is clear,We must also find a place to store meta-information file,For example, the creator of the file、File creation date、File size, etc.。This storage area file meta information is called inode,Chinese translation for "inode"。
Each file has a corresponding inode,Which contains some information and documents relating to the。

How to view innode occupancy System

df -ih

How do I find that most catalog file

First cut to the root directory /

cd /

And then do

for i in /*; do echo $i; find $i | wc -l; done

or

for i in `ls -1A | grep -v "\.\./" | grep -v "\./"`; do echo "`find $i | sort -u | wc -l` $i"; done | sort -rn | head -10

This will in turn return/Most files under directory,Into this directory,And then execute the above command,In this way layers of depth is up to finalize the directory file

How do I delete all the files in that directory

Under normal circumstances,If there should be millions of files in this directory,If you directly rm -rf 目录名 If inefficient,You can use the following method

find 目录 -type f -name '*' -print0 | xargs -0 rm

Time may be relatively long,So you'd better open a screen to handle

You may be experiencing the following circumstances

/var / spool / postfix / maildrop below many files
in order to avoid,You can perform crontab -e
At the beginning of the most added MAILTO='"' Save,then server crond restart Restart crond

Comments

The method of Linux release the disk space occupied

1、Check with df find / root directory of free space 0

[root@/]#df -h

2、Check each directory found with du occupies very little space,About 3G space somehow lost。

[root@/]# du -m –max-depth=1 |sort -gr

3、Check with lsof after the discovery of reason,There files are deleted,And the process is still alive,Resulting phenomenon also takes up space

[root@/]# lsof |grep delete

According to numbers listed in the process lsof,After these processes kill,Space is released out

Comments

Linux how to modify the default port number of SSH?

In the installed linux,By default ssh is open,Vulnerable to hacker attacks,simple,Effective action is to modify one of the default port number
Such as the following,We modify my 22 2501
It is to modify / etc / ssh / sshd_config // note,Easy and ssh_config mixed
step one
[root@localhost ssh]# more sshd_config
# $OpenBSD: sshd_config,v 1.69 2004/05/23 23:59:53 dtucker Exp $
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.
#Port 22 //Comment out the first 22
port 2501 //Add a new port
#Protocol 2,1
Step Two
[root@localhost ~]# service sshd restart
Stopping sshd:[ OK ]
Starting sshd:[ OK ]
Step Three
Testing with SecureCRT

Comments

Linux Firewall Configuration,Open port 80、3306port

vi /etc/sysconfig/iptables

-A INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT (allow 80 port through the firewall)
-A INPUT -m state –state NEW -m tcp -p tcp –dport 3306 -j ACCEPT (allow port 3306 through the firewall)
Special Note:Many users add these two rules to the last line of firewall configuration,Cause the firewall fails to start,Right should be added to the default port 22. This rule below
After adding a good firewall rules are as follows:

######################################
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state –state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 22 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 3306 -j ACCEPT
-A INPUT -j REJECT –reject-with icmp-host-prohibited
-A FORWARD -j REJECT –reject-with icmp-host-prohibited
COMMIT
#####################################

/etc/init.d/iptables restart
#Finally, reboot the firewall configuration to take effect

Comments