Quick tips: Compress/Extract Linux directory with Tar command

To compress:

tar -zcvf archive-name.tar.gz directory-name
    -z: Compress archive using gzip program
    -c: Create archive
    -v: Verbose i.e display progress while creating archive
    -f: Archive File name

To Extract:

tar -zxvf archive-name.tar.gz /to/bath/directory-name
    -z: Compress archive using gzip program
    -x: Extract files
    -v: Verbose i.e display progress while creating archive
    -f: Archive File name

Centos 6 & Cpanel: How to install Memcached

What is Memcached?

Free & open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.

Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.

Memcached is simple yet powerful. Its simple design promotes quick deployment, ease of development, and solves many problems facing large data caches. Its API is available for most popular languages.

Official website: http://memcached.org/

How to install Memcached:

1. Install Required Packages

yum install libevent libevent-devel -y

2. Configure and Compile Latest Version

wget http://memcached.googlecode.com/files/memcached-1.4.13.tar.gz
tar xvf memcached-1.4.13.tar.gz
cd memcached-1.4.13
./configure && make && make install

3. Install Memcached Configuration

Open /etc/memcached.conf with your favorite editor and paste in:

#Memory a usar
-m 16
# default port
-p 11211
# user to run daemon nobody/apache/www-data
-u nobody
# only listen locally

Continue reading “Centos 6 & Cpanel: How to install Memcached”

How to backup/restore database via SSH/Telnet

In order to back up your database via SSH/Telnet, you are required two things:

1. You have ROOT access to your server:

(VPS and Dedicated server only, thats not allowed on Shared hosting). Ask your hosting provider or check again the email they sent to you when your order was complete.

You need to know:

– Server ips

– Port (default: 22)

– Username (default: root)

– Password

2. An SSH/Telnet Client, such as PuTTy.

Download Putty here. (link)

Open Putty client then choose SSH connection type and enter your server ip address. (Host name or ip address)

putty client
Continue reading “How to backup/restore database via SSH/Telnet”