Pages

Sunday, March 10, 2013

Php.ini using .htaccess

http://www.suphp.org/DocumentationView.html?file=apache/CONFIG

if you want to use "/path/to/server/config/php.ini", use
"suPHP_ConfigPath /path/to/server/config".

in .htaccess

Saturday, March 9, 2013

Htop installation

Htop is an interactive and real time process monitoring application for Linux. It shows complete list of processes running and easy to use for normal tasks. We can interact with mouse those who love to play with mouse. You can scroll vertically to view the full process list, and scroll horizontally to view the full command line of the process.

Install Htop from source

Download the htop source from : http://sourceforge.net/projects/htop/

cd /usr/src/
wget http://downloads.sourceforge.net/project/htop/htop/0.8.3/htop-0.8.3.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fhtop%2F&ts=1283665168&use_mirror=cdnetworks-kr-2tar zxvf htop-0.8.3.tar.gz
cd htop-0.8.3
./configure
yum install ncurses-devel
make all
make install


Htop installation on 64bit centos version 6 RPM Package


wget http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/htop-0.9-1.el6.rf.x86_64.rpm
rpm -i htop-0.9-1.el6.rf.x86_64.rpm


Htop installation on 32bit centos version 6 RPM Package

wget http://apt.sw.be/redhat/el6/en/i386/rpmforge/RPMS/htop-0.9-1.el6.rf.i686.rpm
rpm -i htop-0.9-1.el6.rf.i686.rpm


Htop installation on 64bit centos RPM Package

and if your linux centos version is 64bit use this instead:

wget http://packages.sw.be/htop/htop-0.8.3-1.el5.rf.x86_64.rpm
rpm -i htop-0.8.3-1.el5.rf.x86_64.rpm


Htop Installation on 32bit Centos RPM Package


wget http://packages.sw.be/htop/htop-0.8.3-1.rh9.rf.i386.rpm
rpm -i htop-0.8.3-1.rh9.rf.i386.rpm


yum install htop*

How to Use htop

for using htop you can simply run htop command

htop


also there are some other options for example the delay time that is -d

htop -d 2


That the above will delay the refresh time to 2 seconds

To list only the specific user in the system try -u for exampe : htop -u apache (will list only the process run by the apache user)

Wednesday, March 6, 2013

MailMon installtion

cd /usr/src/
wget http://www.mycutelife.net/sanju/newt...mon_1-3.tar.gz
tar -xvzf mailmon_1-3.tar.gz
cd /usr/src/MailMon
cp -f /usr/sbin/sendmail /usr/sbin/mon.bkp
wget http://www.mycutelife.net/sanju/newt...on/mailmon.new
sed -e s/opteron.dnsprotect.com/$hostname/g mailmon.new > mailmon.temp;
cp -f mailmon.temp /usr/sbin/sendmail
cd /usr/sbin
chown root.mailtrap sendmail
chmod 755 sendmail
chattr +i sendmail
cd /var/log
touch mailmon.log
chmod 622 mailmon.log
touch mailmon.junk
chmod 622 mailmon.junk
mysql
mysql>create database mailmon2005;
mysql>grant all privileges on mailmon2005.* to mailmon2005@localhost identified by '123dsa';
mysql>use mailmon2005;
CREATE TABLE `limits` (
`id` int(11) NOT NULL auto_increment,
`user` varchar(20) NOT NULL default '',
`speedlimit` int(11) NOT NULL default '0',
`seconds` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=6 ;
INSERT INTO `limits` VALUES (6, 'cpanel', 200, 3600);
CREATE TABLE `mailmon` (
`user` varchar(20) NOT NULL default '',
`timestamp` int(10) unsigned NOT NULL default '0',
`script_name` varchar(255) NOT NULL default '',
KEY `user` (`user`,`timestamp`)
) TYPE=MyISAM;
mysql> quit;