Thursday 27 November 2014

Couchbase Server

Couchbase Server is the world’s most complete, scalable, and highest performing NoSQL distributed database.

yum install -y pkgconfig

yum install openssl098e

wget http://packages.couchbase.com/releases/3.0.1/couchbase-server-enterprise-3.0.1-centos6.x86_64.rpm

rpm -ivh couchbase-server-enterprise-3.0.1-centos6.x86_64.rpm
Preparing...                ########################################### [100%]
Warning: Transparent hugepages may be used. To disable the usage
of transparent hugepages, set the kernel settings at runtime with
echo never > /sys/kernel/mm/transparent_hugepage/enabled
Warning: Transparent hugepages may be used. To disable the usage
of transparent hugepages, set the kernel settings at runtime with
echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled
Warning: Swappiness is not 0.
You can set the swappiness at runtime with
sysctl vm.swappiness=0
Minimum RAM required  : 4 GB
System RAM configured : 3.74 GB

Minimum number of processors required : 4 cores
Number of processors on the system    : 2 cores

   1:couchbase-server       ########################################### [100%]
Starting couchbase-server[  OK  ]

You have successfully installed Couchbase Server.
Please browse to http://mb1udarmiweb02.pearsontc.com:8091/ to configure your server.
Please refer to http://couchbase.com for additional resources.

Please note that you have to update your firewall configuration to
allow connections to the following ports: 11211, 11210, 11209, 4369,
8091, 8092, 18091, 18092, 11214, 11215 and from 21100 to 21299.

By using this software you agree to the End User License Agreement.
See /opt/couchbase/LICENSE.txt.

/etc/init.d/couchbase-server status
couchbase-server is running

Ref:
http://www.couchbase.com/nosql-databases/about-couchbase-server#ElasticScalability
http://docs.couchbase.com/couchbase-manual-2.5/cb-install/

Update time zone in Linux


date
Thu Nov 27 19:40:33 EST 2014

ls -l /etc/localtime
lrwxrwxrwx 1 root root 39 Nov 27 19:40 /etc/localtime -> /usr/share/zoneinfo/Australia/Melbourne

unlink /etc/localtime

ln -s /usr/share/zoneinfo/Asia/Kolkata /etc/localtime

ls -l /etc/localtime
lrwxrwxrwx 1 root root 32 Nov 27 14:08 /etc/localtime -> /usr/share/zoneinfo/Asia/Kolkata

date
Thu Nov 27 14:09:15 IST 2014

Ref:- http://www.linuxnix.com/2014/11/linuxunix-how-update-timezone-in-a-system.html?utm_source=feedburner&utm_medium=email&utm_campaign=Feed%3A+TheLinuxJuggernaut+%28The+Linux+Juggernaut%29

Wednesday 19 November 2014

PHP Warning: PHP Startup: Unable to load dynamic library

Scenario :-

php -v

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/module.so' - /usr/lib64/php/modules/module.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP 5.3.3 (cli) (built: Sep 10 2014 05:27:26)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

cat /etc/php.d/mcrypt.ini
; Enable mcrypt extension module
extension=module.so

but module.so not exist in /usr/lib64/php/modules/

Resolution :-
uninstall the php-mcrypt and reinstall the suitable rpm

rpm -e php-mcrypt-5.3.3-1.el6.rf.x86_64
wget ftp://ftp.pbone.net/mirror/download.fedora.redhat.com/pub/fedora/epel/6/x86_64/php-mcrypt-5.3.3-3.el6.x86_64.rpm
rpm -ivh php-mcrypt-5.3.3-3.el6.x86_64.rpm

php -v
PHP 5.3.3 (cli) (built: Sep 10 2014 05:27:26)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

cat /etc/php.d/mcrypt.ini
; Enable mcrypt extension module
extension=mcrypt.so

now mcrypt.so exist in /usr/lib64/php/modules/mcrypt.so


Monitor MySQL performance with innotop


Innotop is an excellent command line program, similar to ‘top command‘ to monitor local and remote MySQL servers running under InnoDB engine.

yum install innotop

innotop -u root -p 'mysqlpassword'

Innotop Help
Press “?” to get the summary of command line options and usage.

Switch to a different mode:
   A  Dashboard         I  InnoDB I/O Info     Q  Query List
   B  InnoDB Buffers    K  InnoDB Lock Waits   R  InnoDB Row Ops
   C  Command Summary   L  Locks               S  Variables & Status
   D  InnoDB Deadlocks  M  Replication Status  T  InnoDB Txns
   F  InnoDB FK Err     O  Open Tables         U  User Statistics

Actions:
   d  Change refresh interval        p  Pause innotop
   k  Kill a query's connection      q  Quit innotop
   n  Switch to the next connection  x  Kill a query

Other:
 TAB  Switch to the next server group   /  Quickly filter what you see
   !  Show license and warranty         =  Toggle aggregation
   #  Select/create server groups       @  Select/create server connections
   $  Edit configuration settings       \  Clear quick-filters
Press any key to continue

Non-Interactively

innotop -u root -p 'mysqlpassword' --count 5 -d 1 -n

Monitor Remote Database

innotop -u username -p password -h hostname

Ref : -
http://www.tecmint.com/install-innotop-to-monitor-mysql-server-performance/
http://linux.die.net/man/1/innotop