Sunday 22 January 2012

Whm Remote access key


*// How to set up WHM Remote Access Key for RVSkin?  **// 
  
**Solution is as follows:--


     Usually, RVSkin will detect WHM Remote Access Key. If RVSkin detected, WHM Remote Access Key will install automatically. However if your server is new or just installs cPanel, RVSkin will not able to detect WHM Remote Access Key and you have to install WHM Remote Access Key manually. To install WHM Remote Access Key please follow instruction here.

         1>. SSH to server as root

         2>. Create new file and paste WHM Remote Access Key ( You can find your WHM Remote Access inhttps://YOUR_SERVER_IP:2087/scripts/setrhash) using below command :
pico /usr/local/cpanel/Cpanel/rvwhmkey

        And paste remote access key in this file. PASTE ONLY a key DON'T INCLUDE additional SPACE, line break, ------BEGIN WHM ACCESS KEY------, -------END WHM ACCESS KEY-------

        chown securervskin:securervskin /usr/local/cpanel/Cpanel/rvwhmkey
        chmod 700 /usr/local/cpanel/Cpanel/rvwhmkey

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

Wednesday 18 January 2012

How to update Apache on direct admin


//** For example steps are as follows **// :--

Changes with Apache 2.0.59

from 2.x to 2.0.59

Code :--

cd /usr/local/directadmin/customapache
rm -fr build
chmod 755 build
./build update
./build update_data_ap2
./build clean
./build apache_2
./build php_ap2 n
./build mod_frontpage_ap2
./build mod_perl_ap2
./build zend
/sbin/service httpd restart

from 1.3.x to 2.0.59

Code :--

cd /usr/local/directadmin/customapache
rm -fr build
chmod 755 build
./build update
./build update_data_ap2
./build convert 
./build clean
./build apache_2
./build php_ap2 n 
./build mod_frontpage_ap2
./build mod_perl_ap2
./build zend
/sbin/service httpd restart
************************************************

Wednesday 11 January 2012

Transfer HTTPD and configuration files

How to configured files are as follows :--


rsync -av --progress /olddrive/etc/httpd/conf/httpd.conf /etc/httpd/conf

rsync -av --progress /olddrive/etc/httpd/conf/ips.conf /etc/httpd/conf

rsync -av --progress /olddrive/etc/httpd/conf/ssl.crt /etc/httpd/conf

rsync -av --progress /olddrive/etc/httpd/conf/ssl.key/server.key /etc/httpd/conf/ssl.key


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

Sunday 8 January 2012

upcp killed ?

Just Follow the given insruction **//:--

Do The Following if /scripts/upcp --force gets killed automatically.

*********************
tar -x -v -C / -j -p -f scripts.tar.bz2 
chmod 755 /scripts/cpanelsync
/scripts/cpanelsync httpupdate.cpanel.net /cpanelsync/RELEASE/scripts /scripts
/scripts/upcp --force

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

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

Friday 6 January 2012

WHEN sshd fail

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


If you have changed the shell default Port 22 on a cPanel powered server , restarting sshd from the WHM will fail. You have to ssh to the server and issue the following command to restart sshd

    * /sbin/service sshd restart

To temporarily reset your shell port, back to 22, run the following command from the Address field in browser:

      SERVER_MAIN_IP:2087/scripts2/doautofixer?autofix=safesshrestart

Now, you should be able to access shell, and you need to restart sshd at the prompt using the command mentioned above


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

Thursday 5 January 2012

How to check SSH attacks

How to check SSH attack :--


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


cat /var/log/secure | grep Failed | cut -d: -f7 | cut -d' ' -f1 | sort| uniq -c


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

Tuesday 3 January 2012

Shell Scripts

Few Shell Scripts :--

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

echo "1. httpd"

echo "2. exim"

read -p "Enter Service to restart" n

if [ $n -eq 1 ]; then 
        /scripts/restartsrv httpd
else
        /etc/init.d/exim restart
fi


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

Monday 2 January 2012

Session Save Path


To make writable session save path :--


.htaccess file :

php_value session.save_path '/tmp' 

Sunday 1 January 2012

send mail


Follow the insruction **// :--

Can't execute command '/usr/local/cpanel/bin/sendmail_cpanel -i -t -f in squirrelmail


*** Solution  Quite a hard one to track down this one :---


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

First SSH into your server and run :-

/scripts/fixeverything
/scripts/upcp --force
/scripts/eximup --force

if that does not fix the issue run the following commands:-

cd /usr/sbin
mv sendmail sendmail.157979
ln -s /usr/sbin/exim /usr/sbin/sendmail
mv /etc/eximmailtrap /etc/eximmailtrap.157979