Official Blog

Feb
29
Posted on 29-02-2012
Filed Under (Linux) by Donna Sam

Uses Of SSH Client Commands In Your Linux Server :

SSH allows you to connect to a remote computer – for example, your Web server. This protocol allows commands to be carried out on that computer, such as moving and copying files, creating directories (folders), and running scripts. A SSH client should be installed on your computer to be able to talk to the remote server.

A. The

ls
command

LS is stands for “list”. Ls helps user to lists all the files and directories in their current directory. User have to type ls and press Enter to find out a listing appear in the terminal window:

username@webserver:~$ ls
myfile.txt   myfile2.txt   mysite.com

B. The

cd
command

Cd stands for “change directory”. User can able to to move into and out of directories, much like double-clicking folders on his/her PC with cd command. Such as, if ownsite.com listed above is the directory containing user’s website, he/she can move into the directory as follows:

username@webserver:~$ cd ownsite.com

User can then do another ls to list the contents of the ownsite.com directory:

username@webserver:~/mysite.com$ ls
cgi-bin   htdocs   logs

To move back up a directory, use cd .. (“..” means “the parent directory”). After use this, user can be back in original directory:

username@webserver:~/mysite.com$ cd ..
username@webserver:~$ ls
myfile.txt   myfile2.txt   mysite.com

C. The pwd command

Its important to know your exact current directory. To find this out, type the command pwd (short for “print working directory”) and press Enter. The computer displays the full path to the current directory.

username@webserver:~$ pwd
/home/users/username/

D. The more command

To quickly browse through the contents of a text file on your server. Just type more followed by the name of your file, and press Enter:

username@webserver:~$ more myfile.txt
Project Gutenberg's The Complete Works of Artemus Ward, Part 1
#1 of this seven part series by Charles Farrar Browne

Copyright laws are changing all over the world, be sure to check
the laws for your country before redistributing these files!!!

Please take a look at the important information in this header.
We encourage you to keep this file on your own disk, keeping an
electronic path open for the next readers.

Please do not remove this.

This should be the first thing seen when anyone opens the book.
Do not change or edit it without written permission.  The words
are carefully chosen to provide users with the information they
--More--(16%)
(0) Comments    Read More   
Feb
29
Posted on 29-02-2012
Filed Under (Dedicated Servers, Linux) by Donna Sam

Uses Of Grep Command In Unix And Linux Server

The name, “grep” is indicative of the operation which this command performs. It is executed using the Unix/Linux text editor ed: g/re/p

* grep Command Syntax

grep'word' filename
grep'string1 string2'  filename
cat otherfile | grep'something'
command | grep'something'
command option1 | grep'data'
grep --color 'data' fileName

* Way To Search File With grep Command :

Search /etc/passwd for boo user:
$ grep boo /etc/passwd

User can force grep to ignore word case. Such as, match boo, Boo, BOO and another combination with -i option:
$ grep -i "boo" /etc/passwd

* Utilize grep Recursively

User can search recursively. Such as, read all files under each directory for a string “192.168.2.6″
$ grep -r "192.168.2.6" /etc/

* Way To Search Words With grep Command :

When the user searches for boo, grep will match fooboo, boo123, etc. Grep can be made to select only the lines which contain matching whole words such as only the word boo.

$ grep -w "boo" /path/to/file

* Way To Search Two Different Words with grep command :

use egrep as follows:
$ egrep -w 'word1|word2' /path/to/file

*Way To Count Lines Content Similar Words With grep Command:

User can get the number of times which the pattern has been matched for every file with -c (count) option:
$ grep -c 'word' /path/to/file
Also keep in mind that
the user can utilize -n option, which causes grep to precede every line of output with the number of the line in the text file from which it was obtained:
$ grep -n 'word' /path/to/file

* Grep Invert Match

The -v option is used to print inverts of the the match; meaning that it will return only those lines that do not contain the given word. For example print all line that do not contain the word bar
$ grep -v bar /path/to/file

* grep Command With Pipes

grep command is also used with pipes. Like as follows :
# dmesg | egrep '(s|h)d[a-z]'
Display cpu model name:
# cat /proc/cpuinfo | grep -i 'Model'
User can use the above command without shell pipe, like below :
# grep -i 'Model' /proc/cpuinfo

* Way to list-out the name of the matching files :

Use the -l option to list file name whose contents mention main():
$ grep -l 'main' *.c
Users can also force grep to display output in colors:
$ grep --color vivek /etc/passwd

Use Coupon Code – summerdedicated – and Avail 5% Recurring Discount on Dedicated Server

(0) Comments    Read More   
Feb
28
Posted on 28-02-2012
Filed Under (Web Hosting) by Donna Sam

When managing several servers with different operating systems and versions, you might not be able to identify the LAMP version being used, it could happen with the client too. Here is a small method to check the LAMP version.

1) Linux Version:-
[root@localhost ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.1 (Santiago)

[root@localhost ~]# uname -a
Linux node1.oriensoft.com 2.6.32-042stab032.1 #1 SMP Sat Aug 13 18:16:00 MSD 2011 x86_64 x86_64 x86_64 GNU/Linux

As per above out put Operating System is RHEL 6.1 (64-Bit).

2)  Apache Version:-
[root@loalhost ~]# httpd -v
Server version: Apache/2.2.15 (Unix)
Server built: Aug 14 2010 08:53:20

As per above out put Apache version is 2.2.15.

3)  Mysql Version:-
[root@localhost ~]# mysql -V
mysql Ver 14.14 Distrib 5.1.47, for redhat-linux-gnu (x86_64) using readline 5.1

As per above out put Mysql Version is 5.1.47 (64-Bit).

4)  PHP Version:-
[root@localhost ~]# php -v
PHP 5.3.2 (cli) (built: Aug 17 2010 04:35:29)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

As per above out put PHP Version is 5.3.2.

(0) Comments    Read More   
Feb
27
Posted on 27-02-2012
Filed Under (Cloud Hosting) by Admin1

eNlight cloud computing by Bodhost

eNlight cloud computing to be launched on bodhost which is a new technology to serve all our existing and new customers with features as :

a. Auto-scale :

Auto-scaling means that you can automatically assign computing resources by adding or removing capacity as per need in a cloud infrastructure. Today’s business requires a lot of computing resources and on-demand services.

eNlight cloud computing infrastructure automatically scales resources as per need integrated with billing system. You do not require a reboot of the server to increase or decrease the CPU or RAM resources.

b. Flexibility :

You can easily access the cloud servers and manage your need without much issues. Automatic provisioning system and server resources schedule is an add-on of flexibility. You can also create multiple virtual machines and pre-configure them.

c. Access :

You can reboot, start or shutdown the Virtual machines at any point of time. Assigning resources or setting up automatic resource allocation features.

d. User-friendly control panel :

Easy to use control panel allows you to manager different location clouds.

e. Server location and management :

You can select virtual machine setup in multiple locations and even load-balance them.

f. Operating System :

You can select from the operating system for virtual machine including Linux, Linux – cPanel cloud, Linux – Plesk, Windows server 2008

g. High-end infrastructure setup :

eNlight cloud is setup on a high-end infrastructure featuring :

- Intel Processors per node
- Fibre Channel Storage
- Dual Storage controllers
- Multiple Network providers
- Cisco routers and network infrastructure

h. Reliability :

eNlight cloud is highly reliable and avoids all hardware failures and other failures setup in Tier IV data center facility.

i. eNlight cloud security :

eNlight cloud is completely secured and includes features such as :

- Private Vlan
- Firewall and load-balancing
- Anti-spoof and Anti-sniff firewall technology

More on cloud computing hosting services

(0) Comments    Read More   
Feb
27
Posted on 27-02-2012
Filed Under (Linux) by Donna Sam

Uses of Tar Command in Unix and Linux Server :

For archiving purposes on the Unix platform, tar command is command to be used. Knowing the various tar command options will help you to be a master of the archive file manipulation.

A. Create an archive with tar command

* Create an uncompressed tar archive with option cvf

It is the most basic command to create a tar archive.

$ tar cvf archive_name.tar dirname/
Note :
c – create a new archive
v – verbosely list files which are processed.
f – following is the archive file name

* Create a tar gzipped archive with option cvzf

The above used tar cvf, can’t offer any compression. So, if you want to utilize a gzip compression on the tar archive then you can utilize the z option as follows.

$ tar cvzf archive_name.tar.gz dirname/
Note :
z – filter the archive through gzip

Note:

.tgz is similar as .tar.gz

* Create a bzipped tar archive with option cvjf

Create a bzip2 tar archive as shown below:

$ tar cvfj archive_name.tar.bz2 dirname/
Note :
j – filter the archive through bzip2

Note:

.tbz and .tb2 is similar as .tar.bz2

B. Extracting (untar) an archive with tar command

* Extract a *.tar file with option xvf

Extract a tar file with option x as shown below:

$ tar xvf archive_name.tar
Note :
x – extract files from archive

* Extract a gzipped tar archive ( *.tar.gz ) with option xvzf

Use the option z for uncompressing a gzip tar archive.

$ tar xvfz archive_name.tar.gz

* Extract a bzipped tar archive ( *.tar.bz2 ) with option xvjf

Use the option j for uncompressing a bzip2 tar archive.

$ tar xvfj archive_name.tar.bz2

C. Listing an archive with tar command

* View the tar archive file content without extracting with option tvf

You can find out the *.tar file content before extracting as shown below.

$ tar tvf archive_name.tar

* View the *.tar.gz file content without extracting with option tvzf

You can find out the *.tar.gz file content before extracting as shown below.

$ tar tvfz archive_name.tar.gz

* View the *.tar.bz2 file content without extracting using option tvjf

You can find out the *.tar.bz2 file content before extracting as shown below.

$ tar tvfj archive_name.tar.bz2

D. Process To Add a file or directory to an existing archive With option -r

You can add additional files to an existing tar archive as shown below. Like, to append a file to *.tar file do the following:

$ tar rvf archive_name.tar updatedfile

This updatedfile will be added to the existing archive_name.tar. Adding a directory to the tar is also similar,

$ tar rvf archive_name.tar newdir/

Note:

You can’t add file or directory to a compressed archive. In that case you will get the following error

$ tar rvfz archive_name.tgz newfile
tar: Cannot update compressed archives
Try `tar --help' or `tar --usage' for more information.

E. Way To Estimate The tar Archive Size

Before creating the tar file you can estimate the tar file size ( in KB ) with the command below:

$ tar -cf - /directory/to/archive/ | wc -c
20480

Before creating the tar.gz, tar.bz2 files, you can estimates the compressed tar file size ( in KB ) with the commands below:

$ tar -czf – /directory/to/archive/ | wc -c 508 $ tar -cjf – /directory/to/archive/ | wc -c 428

(0) Comments    Read More