Wednesday, July 30, 2014

exit from mysql shell

Sometimes you may struck in the mysql shell and you cannot exit from the shell using /q or exit command.

Solution:
use single quotes and then quit from your mysql console.

`> \q
`>
`> ;


'> ''' ( use 3 single quotes)
 -> \q
Bye
[root@test ~]#




Friday, July 18, 2014

phpMyAdmin installation


Steps:
cd /usr/local/src/
wget http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/4.2.5/phpMyAdmin-4.2.5-all-languages.tar.gz
tar -xzvf phpMyAdmin-4.2.5-all-languages.tar.gz 
mv phpMyAdmin-4.2.5-all-languages /home/ajeesh/public_html/
cd /home/ajeesh/public_html/
mv phpMyAdmin-4.2.5-all-languages phpMyAdmin
cd phpMyAdmin
mkdir config
chmod o+rw config
cp config.inc.php config/ (For migration we need to copy this file and access the web panel, for new installation just visit the web panel and the config file will create automatically.)

: Web Panel access http://ajeesh.com/phpMyAdmin/setup/

Error:
[Fri Jul 18 00:31:06 2014] [error] [client IP] File does not exist: /home/ajeesh/public_html/favicon.ico
[Fri Jul 18 00:31:07 2014] [error] [client IP] PHP Fatal error:  Call to undefined function mb_detect_encoding() in /home/ajeesh/public_html/phpMyAdmin/libraries/php-gettext/gettext.inc on line 177

Fix:
yum install php-mbstring
yum install php-mcrypt
/etc/init.d/httpd restart


mv config/config.inc.php /home/ajeesh/public_html/phpMyAdmin/
chmod 644 config.inc.php
rm -rf setup

Latest phpMyadmin needs mysql5.5 version. So I have updated the latest version using the following steps:

rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
yum --enablerepo=remi list mysql mysql-server
yum --enablerepo=remi upgrade mysql mysql-server


Monday, June 23, 2014

Missing Word Edit tools : wordpress

Text Editors and Missing Buttons in wordpress.

You can fix this issue by adding the following line on your wp-config.php file.

You should add this line at the beginning of your php opening tag

define('CONCATENATE_SCRIPTS', false);

 

OR 

Install Google Libraries plugin, which will use common java script libraries from google's not from wordpress.

Wednesday, June 4, 2014

openvz ubuntu vps not restarting


While rebooting Ubuntu vps on your Openvz node you will get the following error.

~]# vzctl start 2121454
Starting container ...
Container is mounted
Adding IP address(es): IP address for your vps
FATAL: kernel too old
Setting CPU limit: 400
Setting CPU units: 1000
Setting CPUs: 4
FATAL: kernel too old
Container start in progress...



This means your Node is running on Centos 5

2.6.18-371.3.1.el5.028stab110.1

So we cannot update to 2.6.32 openvz kernel on CenOS 5

Fix:
 kernel]# pwd
/proc/sys/kernel
kernel]# cat virt_osrelease
2.6.18-371.3.1.el5.028stab110.1
kernel]# echo 2.6.32 > virt_osrelease
[root@server kernel]# vzctl start 5909
Starting container ...
Container is mounted
Adding IP address(es): ipdaddress
Setting CPU limit: 400
Setting CPU units: 1000
Setting CPUs: 4
Container start in progress...

Thursday, May 22, 2014

add ll command to show ls -la


Open ]# vi /root/.bash_profile

Add the following line

alias ll='ls -la'

After that run the below commad.

 ]# source /root/.bash_profile

This will show ll command as ls -la out put. Like that you can simplify your commands.


Friday, January 31, 2014

imapsync

We are using this command for transferring IMAP emails from remote server to our server. This command is very useful when we are doing account migrations from remote server to ours.

command used:
imapsync --host1 sourceserver_ip --user1 emailaddress --password password --host2 destinationserverip --user2 emailaddress --password2 password