Sunday, January 22, 2012

HardDisk Parameters (DMA/UDMA/CAPABILITIES)


 Commands are given below   :- 
----------------------
* To enable DMA for a hard drive: hdparm -d1 /dev/hda  


* To disable DMA for a hard drive: hdparm -d0 /dev/hda  

* To measure transfer rate of a hard drive: hdparm -Tt /dev/hda
  
* To see what options are enabled for a hard drive: hdparm /dev/hda  

* To see more info on your drive than you wanted to know: (this will show which UDMA modes are supported/enabled) hdparm -i /dev/hda 

Wednesday, January 18, 2012

Default locations for most commonly used configuration files and important directories:

**/  There are some important configuration files :--

..............***.................
#Exim 
/etc/exim.conf 
/var/log/exim_mainlog
/var/log/exim_rejectlog 
/etc/valiases/ 
/etc/vfilters/ 
/home/username/.forward
..............***................

#MySQL 
/root/.my.cnf 
/etc/my.cnf 
/var/lib/mysql/ 
...............***...............

#Apache 
/usr/local/apache/conf/httpd.conf 
/usr/local/apache/domlogs/ 
..............***................

#System 
/var/log/messages 
/var/log/dmesg 
..............***................

#Proftpd 
/etc/proftpd.conf 
/var/log/xferlog 
/etc/proftpd/ 
................***..............

#sshd 
/etc/ssh/sshd_config 
...............***...............

#PureFtp Config File
/etc/sysconfig/pure-ftpd
...............***...............

#Disable SMART Error in Cpanel
touch /var/cpanel/disablesmartcheck 
/scripts/updatenow

Wednesday, January 11, 2012

How to clear a full partition

-->tail -5000 filename > filename.new 

mv filename.new filename sync 

This will copy the last 5000 lines from the file to a temporary file. 

Now you probably want to restart whatever service it is that created the file to release it's file lock on the file.

 /usr also fills up sometimes because of apache.  The first thing you should look at is usually the apache logs. 

cd to /usr/local/apache 

and type "du -sh *" and chances are you'll find that the logs/error_log or logs/access_log is very large. 

Feel free to delete them or use the tail trick above.

-----****-----****------****------****------

Sunday, January 8, 2012

How to install a Perl Module


--: Steps are given below :--

--> On a server with CPanel, 
you can log into the WHM and install it there,  
If that for some reason doesn't work for you, you can log into the shell as root ,
and install it via the command line.  Once logged in, from any directory, 
type:   echo "HTML::Template" | /usr/local/cpanel/whostmgr/bin/perlmod -i  
(in this case, the module we want to install is HTML::Template).

Friday, January 6, 2012

Cpanel License File Expired


-------------------------------

service iptables stop

/usr/local/cpanel/cpkeyclt

service iptables start

------------------------------

Thursday, January 5, 2012

C-panel license expired

Please refer to the following link to confirm that the CPanel License is active: -
http://verify.cpanel.net/

***********

Please refer to the following link to confirm that the CPanel License is active: -
http://verify.cpanel.net/

***********

Try running the program /usr/local/cpanel/cpkeyclt
to re-initialize the license again if you encounter any other licensing errors. 


***********

Lastly : Flush your iptables and try again. Or disable your firewall.
------------------------------------------------------------------

Tuesday, January 3, 2012

how to install RMP

Rmp:--
----------------------

To install RMP:--
[root@deep] /#rpm -ivh foo-1.0-2.i386.rpm
--------------

To uninstall rmp:--
[root@deep] /#rpm -e foo
----------------

To upgrade rmp:--
[root@deep] /#rpm -Uvh foo-1.0-2.i386.rpm
----------------

To check rmp:--
[root@deep] /#rpm -q foo


-----------------------------------------------

Monday, January 2, 2012

Change Hostname in < FreeBSD >

** Simple steps are given to change Host name is given below :--


******************
To change your hostname to example myhostname.mydomain.com 

Run the command 'hostname myhostname.mydomain.com

Edit the file /etc/hosts 

Edit the file /etc/rc.conf 



*******************


Done ...