Kmaiti

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Saturday, 30 October 2010

Fatal error: Out of memory (allocated +) (tried to allocate + bytes) ?

Posted on 13:35 by Unknown
Guys,

Please increase the memory size in php.ini file. If it does not work just put following directives in the httpd.conf file and restart apache :

====
RLimitMEM 447392422
RLimitCPU 240
====

You may have increased the RLimitMEM size since above has in bytes.

OR : You can set -1 at ini_set('memory_limit', '-1'); This has in the configuration file of the script.

Try :)
Read More
Posted in | No comments

Thursday, 28 October 2010

DATABASE ERROR: CONNECTION FAILED! + roundcube

Posted on 18:21 by Unknown
Guys,

If you get this error just rectify the login details in the /usr/local/cpanel/base/roundcube/config/db.inc.php file since it's clear the DB connection error.

Example :

------
root@2red [/usr/local/cpanel/base/roundcube]# cat config/db.inc.php | grep roundcube
$rcmail_config['db_dsnw'] = 'mysql://roundcube:DB_PASSWORDlocalhost/roundcube';
// postgres example: 'pgsql://roundcube:pass@localhost/roundcubemail';
root@2red [/usr/local/cpanel/base/roundcube]#
------

PS: Name of the roundcube database : roundcube
DB username : roundcube
DB password : DB_PASSWORD //it has in /root/.my.cnf file

Also give grant privileges to that db.

That's it try :)
Read More
Posted in | No comments

How to install roundcube in the cpanel server?

Posted on 17:46 by Unknown
Guys,

I referred the following steps :

-----------
cd /usr/local/cpanel/base
rm -rf roundcube*
mysql -p -e 'drop database roundcube';
chattr -i /usr/local/cpanel/base/frontend/x/webmaillogin.html
chattr -i /usr/local/cpanel/base/webmaillogin.cgi
/scripts/upcp

cd /usr/local/cpanel/base
wget http://sourceforge.net/projects/roundcubemail/files/roundcubemail/0.4.2/roundcubemail-0.4.2.tar.gz/download
tar -zxvf roundcube.tar.gz
rm -rf roundcube.tar.gz
mv -f roundcubemail-0.1-rc1 roundcube
cd roundcube
chmod -R 777 temp
chmod -R 777 logs
-----------
mysql -e "CREATE DATABASE roundcube;" -pDATABASEPASSWORD
mysql -e "use roundcube; source SQL/mysql.initial.sql;" -pDATABASEPASSWORD


Now lets sort out the configuration


cd config
mv db.inc.php.dist db.inc.php
mv main.inc.php.dist main.inc.php

Now open db.inc.php

nano db.inc.php

Find

$rcmail_config['db_dsnw'] = 'mysql://roundcube:pass@localhost/roundcubemail';


Replace with

$rcmail_config['db_dsnw'] = 'mysql://root:DATABASEPASSWORD@localhost/roundcube';



Now Open main.inc.php

nano main.inc.php

Find

$rcmail_config['default_host'] = '';


Replace with

$rcmail_config['default_host'] = 'localhost';
-----------
Now we have to configure cPanel to show roundcube in the theme. Please note this is for the X theme(default) only!! If you use another theme please skip the next part and see below.

cd /usr/local/cpanel/base/roundcube/skins/default/images/
cp --reply=yes roundcube_logo.png /usr/local/cpanel/base/frontend/x/images/roundcube_logo.png
cp --reply=yes roundcube_logo.png /usr/local/cpanel/base/webmail/x/images/roundcube_logo.png
cd /usr/local/cpanel/base
wget http://www.hostgeekz.com/files/hostgeekz/HGpatch-roundcube-0.1-rc1
patch -p0 < HGpatch-roundcube-0.1-rc1
----------

chattr +i /usr/local/cpanel/base/frontend/x/webmaillogin.html
chattr +i /usr/local/cpanel/base/webmaillogin.cgi
-----------

try.
Read More
Posted in | No comments

Sunday, 24 October 2010

How to migrate Plesk data manually with Plesk Migration Manager?

Posted on 22:34 by Unknown
Manually migration?

[How to] How to migrate Plesk data manually with Plesk Migration Manager?
Article ID: 1152
Last Review: Nov,24 2009 Author: Bezborodova Anastasiya
Last updated by: Bezborodova Anastasiya APPLIES TO:
Plesk 8.x for Linux/Unix
Plesk 9.x for Linux/Unix
Resolution
To do this follow the steps below:

1. Upload migration agent and modules to the source server. For example for Parallels Plesk Panel, there are two folders: /usr/local/psa/PMM/agents/shared and /usr/local/psa/PMM/agents/PleskX. Use the command below to copy the Migration Manager:

destination ~# scp -r /usr/local/psa/PMM/agents/shared/* /usr/local/psa/PMM/agents/PleskX/* root@source:/temporary_migration_directory/

2. Login to source server and change to directory /temporary_migration_directory.
Run migration agent (PleskX.pl) with parameter --help to get all available options of the migration agent. Start dumping with options you need. For example:

source ~# cd /temporary_migration_directory
temporary_migration_directory ~# chmod 755 PleskX.pl
temporary_migration_directory ~# ./PleskX.pl --dump-all

3. This will create dump configuration file dump.xml and content dump archives in current directory /temporary_migration_directory.

4. On the destination server create directory /work_dir and copy file dump.xml from /temporary_migration_directory to it.:

source ~# scp /temporary_migration_directory/dump.xml root@destination:/work_dir/

5. On destination Parallels Plesk Panel 8 create subdirectory /work_dir/archives and copy other content dump files to this directory:

source ~# scp -r /temporary_migration_directory/* root@destinationPPP8:/work_dir/archives/

On destination Parallels Plesk Panel 9 dump.xml and all other content files should locate in the same directory. So copy all other files into /work_dir/:

source ~# scp -r /temporary_migration_directory/* root@destinationPPP9:/work_dir/

6. Deploy the data through Parallels Plesk Panel GUI.

Login to Parallels Plesk Panel (PPP) as administrator and change to the Migration Manager page. The page is Server -> Migration Manager in PPP version 8.x and Home -> Migration Manager in PPP version 9.x

Click button "Start a new migration" and choose "Data import" in PPP version 8.x or "Transfer data already processed by the migration agent and located on the local host." in PPP version 9.x.

In version 8.x pay attention for choosing correct Working directory for the data importing, it should the directory where you put the data to be restored (/work_dir).
In version 9.x put location of dump.xml file in the "Migration data file location" field. It should be /work_dir/dump.xml.

Additional information
In Parallels Plesk Panel version 9 restoration logs of manual migration are located on page Backup Manager at Home -> Backup Manager. So that is normal that you you see the Home page after specifying "Migration data file location" and click Next.


try :)
Read More
Posted in | No comments

How to reduce server's load?

Posted on 22:31 by Unknown
You can refer following steps to deal with to reduce server's load :

=======
1 )netstat -plan | grep :80 | awk '{print $5}' | cut -d: -f 1 | sort | uniq -c | sort -n

2) netstat -plan | grep :25 | awk '{print $5}' | cut -d: -f 1 | sort | uniq -c | sort -n

3) pstree -paul

4) cd /tmp

5) rm -f dos-* sess_* .spamassassin*

6) find . -user nobody -exec rm -f '{}' \;

7) ps -C exim -fH ewww

8) ps -C exim -fH eww |grep home

9) netstat -ntu | grep ':' | awk '{print $5}' | awk '{sub("::ffff:","");print}' | cut -f1 -d ':' | sort | uniq -c | sort -n

10) mysqladmin proc |grep Sleep |awk {'print $4'}|cut -d_ -f 1|sort|uniq -c|sort -nk 1

11) ps -C exim -fH ewww

12) for i in `ipcs -s | awk '{print $2}'`; do (ipcrm -s $i); done

13) for i in `mysqladmin proc |grep Sleep |cut -d " " -f 2`; do mysqladmin kill $i; done

14) exim -bp |grep "*** frozen ***" |awk '{print $3}' |xargs exim -Mrm

15) exiqgrep -z -i | xargs exim -Mrm;exiqgrep -o 432000 -i | xargs exim -Mrm
=======

Try :)
Read More
Posted in | No comments

How to check server's resource usage?

Posted on 22:29 by Unknown
You can use following script :

======
root@magneto [/var/log]# cat resusage.sh
#!/bin/bash
top -b -c -n 1 >topresult
while read line
do
awk '{if( $9 >= 20 ) print $2 ":" $9 ":" $12 }' $line
done <"topresult"
root@magneto [/var/log]

cron :

* * * * * /bin/bash /var/log/resusage.sh 1>>/var/log/server_resusagewq.log

========================
flush log :

root@magneto [/var/log]# cat flush_server_resusage.sh
#!/bin/bash

rm -f /var/log/server_resusage.log
touch /var/log/server_resusage.log
echo "===================`date`===================" >>/var/log/server_resusage.log
root@magneto [/var/log]#

cron :
0 1 * * * /bin/bash /var/log/flush_server_resusage.sh

=========================

try :)
======
Read More
Posted in | No comments

How to login into the server using bash script?

Posted on 22:22 by Unknown
Here is the script :

===
#!/bin/bash

HOST="remote-hostname"
USER="remote-user"
PASS="remore-user-password"
CMD=$@

VAR=$(expect -c "
spawn ssh -o StrictHostKeyChecking=no $USER@$HOST $CMD
match_max 100000
expect \"*?assword:*\"
send -- \"$PASS\r\"
send -- \"\r\"
expect eof
")
echo "==============="
echo "$VAR"
===

Try :)
Read More
Posted in | No comments
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Popular Posts

  • [a fatal error or timeout occurred while processing this directive] + cpanel
    Guys, Just check the cpanel log file and you'll get the clue from there. I got following messages : execute : tail -f /usr/local/cpanel/...
  • How to access the webalizer from the outside of the cpanel?
    Guys, I don't want to post this type of article since you'll get it from the Google. But still I did. I followed following steps : E...
  • How to enable php in apache on RHEL ?
    1. In order to enable php engine in apache, you should make sure php is installed in the system first. Then refer following steps : locate l...
  • WHM + http showing failed ?
    Guys, Please check the log of the apache server like : 1. tail -f /usr/local/apache/logs/error_log 2. check the http port in /usr/local/apac...
  • How to verify UDP packet communication between two linux system?
    Guys, Today, I had to check UDP packet communication between linux and a windows system. Main purpose of the windows system was to capturing...
  • Addition, multiplication etc in bash script?
    ======== #!/bin/bash x=5 # initialize x to 5 y=3 # initialize y to 3 add=$(($x + $y)) # add the values of x and y and assign it to va...
  • How do I determine if my x86-compatible Intel system is multi-processor, multi-core or supports hyperthreading?
    Guys, We need to know about multi-processor, multi-core or supports hyperthreading. Here are the details : Physical ID (Physical processor o...
  • DATABASE ERROR: CONNECTION FAILED! + roundcube
    Guys, If you get this error just rectify the login details in the /usr/local/cpanel/base/roundcube/config/db.inc.php file since it's cle...
  • make: *** [install-webconf] Error 1
    Guys, I got this error message during configuring the nagios : Here is the exact error message. ======= root@server [/usr/local/src/nagios-3...
  • How linux calls happens while it starts ?
    We start the Linux kernel first from C code executed from ''startup_32:'' asm label: |startup_32: |start_kernel |lo...

Categories

  • ACL
  • ESX
  • Linux
  • Storage
  • UCS

Blog Archive

  • ▼  2013 (5)
    • ▼  May (1)
      • NDMP communication failure error
    • ►  April (3)
    • ►  February (1)
  • ►  2012 (10)
    • ►  July (1)
    • ►  June (1)
    • ►  April (1)
    • ►  March (3)
    • ►  February (3)
    • ►  January (1)
  • ►  2011 (86)
    • ►  December (3)
    • ►  November (2)
    • ►  September (19)
    • ►  August (9)
    • ►  July (5)
    • ►  June (9)
    • ►  May (12)
    • ►  April (3)
    • ►  March (4)
    • ►  February (5)
    • ►  January (15)
  • ►  2010 (152)
    • ►  December (9)
    • ►  November (34)
    • ►  October (20)
    • ►  September (14)
    • ►  August (24)
    • ►  July (19)
    • ►  June (3)
    • ►  May (25)
    • ►  April (3)
    • ►  January (1)
Powered by Blogger.