Sunday, September 11, 2011

Mercury mTab, another low cost Android tablet for Rs. 9499


Specifications of Mercury mTab
  • 7-inch (800 x 480 pixels) TFT LCD capacitive touch screen display
  • G-Sensor for screen rotation and 3D games
  • Android 2.3 (Gingerbread)
  • Dimensions - 19.3cm X 11.7cm X 1.4cm
  • Weight 400g
  • 1.2 GHz ARM 11 processor with OpenGL 3D accelerator and VPU for 1080 hard encoding
  • Wi-Fi 802.11 a/b/g, 3G USB dongle support
  • 3.5mm audio jack, HDMI out (720p / 1080i), USB OTG support (cable included)
  • Audio player and Video player with 1080p playback support
  • 4GB inbuilt storage (supports up to 16GB optional) and expandable up to 32GB with micro SD
  • 1.3MP front camera
  • 4000 mAh Battery that supports up to 4h of continuous video playback
Mercury mTab is available for Rs. 9,499 and comes with a warranty for the period of 1 year.

iBall Slide Android Tablet, Price Rs 13995


iBall Slide Specifications:

  • Android 2.3 Gingerbread
  • 1 GHz ARM Cortex A8 Processor
  • 7″ WVGA Screen, Resolution: 840*480
  • 8GB Internal Memory, MicroSD Expandible upto 32GB
  • 2.0 MP Front Camera
  • 2 MicroUSB Ports
  • Battery 4400 mAh
The iBall Slide is priced at Rs 13,995.

Quick reference Linux commands


alias – Create an alias
awk – Find and Replace text, database sort/validate/index
break – Exit from a loop
builtin – Run a shell builtin
cal – Display a calendar
cse – Conditionally perform a command
cat – Display the contents of a file
cd – Change Directory
cfdisk – Partition table manipulator for Linux
chgrp – Change group ownership
chmod – Change access permissions
chown – Change file owner and group
chroot – Run a command with a different root directory
cksum – Print CRC checksum and byte counts clear Clear terminal screen
cmp – Compare two files
comm – Compare two sorted files line by line
command – Run a command – ignoring shell functions
continue – Resume the next iteration of a loop
cp – Copy one or more files to another location
cron – Daemon to execute scheduled commands
crontab – Schedule a command to run at a later time
csplit – Split a file into context-determined pieces
cut – Divide a file into several parts
date – Display or change the date & time
dc – Desk Calculator
dd – Data Dump – Convert and copy a file
declare – Declare variables and give them attributes
df – Display free disk space
diff – Display the differences between two files
diff3 – Show differences among three files
dir – Briefly list directory contents
dircolors – Colour setup for `ls'
dirname – Convert a full pathname to just a path
dirs – Display list of remembered directories
du – Estimate file space usage
echo – Display message on screen ed A line-oriented text editor (edlin)
egrep – Search file(s) for lines that match an extended expression eject Eject CD-ROM
enable – Enable and disable builtin shell commands
env – Display, set, or remove environment variables
eval – Evaluate several commands/arguments
exec – Execute a command exit Exit the shell
expand – Convert tabs to spaces
export – Set an environment variable
expr – Evaluate expressions
factor – Print prime factors
false – Do nothing, unsuccessfully
fdformat – Low-level format a floppy disk
fdisk – Partition table manipulator for Linux
fgrep – Search file(s) for lines that match a fixed string
find – Search for files that meet a desired criteria
fmt – Reformat paragraph text
fold – Wrap text to fit a specified width.
for – Expand words, and execute commands format Format disks or tapes free Display memory usage
fsck – Filesystem consistency check and repair.
function – Define Function Macros
gawk – Find and Replace text within file(s)
getopts – Parse positional parameters
grep – Search file(s) for lines that match a given pattern
groups – Print group names a user is in
gzip – Compress or decompress named file(s)
hash – Remember the full pathname of a name argument
head – Output the first part of file(s)
history – Command History
hostname – Print or set system name
id – Print user and group id's
if – Conditionally perform a command
import – Capture an X server screen and save the image to file
info – Help info
install – Copy files and set attributes
join – Join lines on a common field
kill – Stop a process from running
less – Display output one screen at a time
let – Perform arithmetic on shell variables
ln – Make links between files
local – Create variables
locate – Find files
logname – Print current login name
logout – Exit a login shell
lpc – Line printer control program
lpr – Off line print lprint Print a file lprintd Abort a print job lprintq List the print queue
lprm – Remove jobs from the print queue
ls – List information about file(s)
m4 – Macro processor
man – Help manual
mkdir – Create new folder(s)
mkfifo – Make FIFOs (named pipes)
mknod – Make block or character special files
more – Display output one screen at a time
mount – Mount a file system
mtools – Manipulate MS-DOS files
mv – Move or rename files or directories
nice – Set the priority of a command or job
nl – Number lines and write files
nohup – Run a command immune to hangups
passwd – Modify a user password
paste – Merge lines of files pathchk Check file name portability
popd – Restore the previous value of the current directory
pr – Convert text files for printing printcap Printer capability database printenv Print environment variables
printf – Format and print data
ps – Process status
pushd – Save and then change the current directory
pwd – Print Working Directory
quota – Display disk usage and limits
quotacheck – Scan a file system for disk usage
quotactl – Set disk quotas
ram – ram disk device
rcp – Copy files between two machines.
read – read a line from standard input
readonly – Mark variables/functions as readonly remsync Synchronize remote files via email
return – Exit a shell function
rm – Remove files
rmdir – Remove folder(s)
rpm – Remote Package Manager
rsync – Remote file copy (Synchronize file trees) screen Terminal window manager
sdiff – Merge two files interactively
sed – Stream Editor
select – Accept keyboard input
seq – Print numeric sequences
set – Manipulate shell variables and functions
shift – Shift positional parameters
shopt – Shell Options
shutdown – Shutdown or restart linux
sleep – Delay for a specified time
sort – Sort text files
source – Run commands from a file `.'
split – Split a file into fixed-size pieces
su – Substitute user identity
sum – Print a checksum for a file
symlink – Make a new name for a file
sync – Synchronize data on disk with memory
tac – Concatenate and write files in reverse
tail – Output the last part of files
tar – Tape ARchiver
tee – Redirect output to multiple files
test – Evaluate a conditional expression
time – Measure Program Resource Use
times – User and system times
touch – Change file timestamps
top – List processes running on the system
traceroute – Trace Route to Host trap Run a command when a signal is set(bourne)
tr – Translate, squeeze, and/or delete characters
true – Do nothing, successfully
tsort – Topological sort
tty – Print filename of terminal on stdin
type – Describe a command
ulimit – Limit user resources
umask – Users file creation mask umount Unmount a device
unalias – Remove an alias
uname – Print system information
unexpand – Convert spaces to tabs
uniq – Uniquify files
units – Convert units from one scale to another
unset – Remove variable or function names
unshar – Unpack shell archive scripts
until – Execute commands (until error)
useradd – Create new user account
usermod – Modify user account
users – List users currently logged in
uuencode – Encode a binary file
uudecode – Decode a file created by uuencode v Verbosely list directory contents (`ls -l -b') vdir Verbosely list directory contents (`ls -l -b')
watch – Execute/display a program periodically
wc – Print byte, word, and line counts
whereis – Report all known instances of a command
which – Locate a program file in the user's path.
while – Execute commands
who – Print all usernames currently logged in whoami Print the current user id and name (`id -un')
xargs – Execute utility, passing constructed argument list(s)
yes – Print a string until interrupted
.period – Run commands from a file

Linux/unix command "lsof"


When looking at the operating system one of your best friends will be lsof. lsof stands forlists information about files opened by processes for the following UNIX dialects . As everything under Linux is a file this tool will show you everything you could possible want to know.
Examples how to use “lsof” :
To list all open files:
lsof
To list all open IPv4 network files in use by the process
whose PID is 1234 :
lsof -i 4 -a -p 1234
Presuming the UNIX dialect supports IPv6, to list only open
IPv6 network files :
lsof -i 6
To list all files using any protocol on ports 21 of hostnames:

lsof -i @hostname:portnumbers

To list all files using any protocol on any port of
hostname :

lsof -i @hostname

Linux command "Cron" and running crontab jobs


The crontab command is used to manage cron jobs. The -l option displays the current list of jobs for the user.
admin@suresh$ crontab -l
This show the current running cron jobs
crontab -l : Display the information for scheduled jobs
crontab -e : Edit the user’s list of scheduled jobs
crontab -r : Remove the definition of scheduled jobs
crontab filename : Replace the current crontab file
If you want to edit a cron
admin@suresh$ crontab -e
* * * * * command to be executed
- – – – -
| | | | |
| | | | +—– day of week (0 – 6) (Sunday=0)
| | | +——- month (1 – 12)
| | +——— day of month (1 – 31)
| +———– hour (0 – 23)
+————- min (0 – 59)
cron example :
*/30 * * * * date > ~/out.txt
here for every 30mins its send the date output to out.txt file

SSH Tunneling


You have a trouble when you got your localhost (your computer) has no route to XWindows public server (linux, unix base). Your computer only has route to one of computer in the network which has route to public server that you want.
Somebody that ever install Oracle via remote connection will find this problem.
Example:
Your local computer is “localhost”
Your server #1 is private IP “192.168.12.15″
Your server #2 is public IP “202.153.99.9X”

Localhost —– Server #1 ——- Server #2
|______ XWindows Application _______|
|___________ No Route ______________|

How to get connection via SSH so you can remote your public server include the XWindows application ?
Here are the steps must be done :
SSH tunneling from 192.168.12.15 to public IP 202.153.99.9X
ssh root@192.168.12.15 -p 2350
ssh -L 2211:127.0.0.1:2350 root@202.153.99.9X -p 2350
SSH tunneling from localhost to 192.168.12.15
ssh -L 2211:127.0.0.1:2211 root@192.168.12.15 -p 2350
SSH to 202.153.99.9X via tunnel + forward X
ssh -X root@localhost -p 2211
For example on X environment :
xclock &
You will get “xclock” program from remote 202.153.99.9X

Setting up a Linux server as Gateway


Configuring Linux as an internet gateway using iptables

Edit sysctl.conf file by doing
admin@suresh$ vi /etc/sysctl.conf

now turn on IP forwarding in sysctl.conf config file by setting the value to 1

the ip tables command for nat masquerade(masquerade mean All computers appear to have the same IP)

admin@suresh$ iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADEadmin@suresh$ iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
check the iptables effect by
admin@suresh$ iptables-save
(note :  iptables-save inside the file /etc/sysconfig/iptables )

linux command tcpdump example


Description :
tcpdump is a common packet sniffer that runs under the command line. It allows the user to intercept and display TCP/IP and other packets being transmitted or received over a network to which the computer is attached.
Examples:
tcpdump -i  -s 1500 eth0 192.168.1.0/24 -w tmp/xxx.pcap

eth0 is the interface name is the interface sets on your device. If you want to filter based on the network address, you should put as above, if filter based on host, change it to ‘host 192.168.1.0′. The -s 1500 indicate the normal 1500 size packet you want to capture. If you don’t define 1500, the packets captured will show incomplete details.-w is used to save the files to a specific folder. By defining the file extension with .pcap, you’d be able to double click the file to open it via ethernet
To print all packets arriving at or departing from sundown:
tcpdump host sundown
tcpdump host sundown -i eth2
tcpdump -w test.pcap -i eth2 tcp port 6881
tcpdump -w test.pcap -i eth1 tcp port 6881 or udp \( 33210 or 33220 \
To print traffic between helios and either hot or ace:
tcpdump host helios and \( hot or ace \)
To print all IP packets between ace and any host except helios:
tcpdump ip host ace and not helios
To print all traffic between local hosts and hosts at Berkeley:
tcpdump net ucb-ether
To print all ftp traffic through internet gateway snup: (note that the
expression is quoted to prevent the shell from (mis-)interpreting the
parentheses):
tcpdump ‘gateway snup and (port ftp or ftp-data)’
To print traffic neither sourced from nor destined for local hosts (if
you gateway to one other net, this stuff should never make it onto your
local net).
tcpdump ip and not net localnet
To print the start and end packets (the SYN and FIN packets) of each
TCP conversation that involves a non-local host.
tcpdump ‘tcp[tcpflags] & (tcp-syn|tcp-fin) != 0 and not src and dst net localnet’
To print all IPv4 HTTP packets to and from port 80, i.e. print only
packets that contain data, not, for example, SYN and FIN packets and
ACK-only packets. (IPv6 is left as an exercise for the reader.)
tcpdump ‘tcp port 80 and (((ip[2:2] – ((ip[0]&0xf)<<2)) – ((tcp[12]&0xf0)>>2)) != 0)’
To print IP packets longer than 576 bytes sent through gateway snup:
tcpdump ‘gateway snup and ip[2:2] > 576′
To print IP broadcast or multicast packets that were not sent via Eth-
ernet broadcast or multicast:
tcpdump ‘ether[0] & 1 = 0 and ip[16] >= 224′
To print all ICMP packets that are not echo requests/replies (i.e., not
ping packets):
tcpdump ‘icmp[icmptype] != icmp-echo and icmp[icmptype] != icmp-echoreply’

Linux Keyboard shortcuts keys


Keyboard shortcuts keys  in linux:
keys
  • ctrl+d – — Exit from text mode
  • ctrl+alt+backspace—logout from GUI mode
  • ctrl+l —clear in terminel
  • ctrl+alt+(+) —  increase the resolution size in gnome terminal
  • ctrl+alt+(-) ——-  decrease the resolution size in gnome terminal
  • ctrl+c ——– kill the current process
  • alt+F2 —Shortcut for gnome run
  • ctrl+alt+[F1-F6] —- enter in to text mode
  • ctl+alt+F7 —-  GUI mode from text mode
  • ctrl+r —— search commands in the history
  • ctrl+alt+[arrow keys]——-switch  the desktop
  • ctrl+alt+d ———— minimize all windows
  • alt+tab— switch between the windows
  • alt+shift+tab — switch between the windows in reverse order
  • ctrl+alt+delete —- restart the PC from text mode
  • ctrl+alt+l ——— lock the desktop

Run shell commands in php


You can run shell commands in php,for example if you want to display a uptime  in php
example :

$results = exec(‘uptime’); //you need enter the command in exec filed
echo $results;
?>
or

php system (“uptime”);
?>

About MAC Address


Media Access Control address (MAC address) is a unique identifier assigned to most network adapters or network interface cards (NICs) by the manufacturer for identification, and used in the Media Access Control protocol sublayer. If assigned by the manufacturer, aMAC address usually encodes the manufacturer’s registered identification number. It may also be known as an Ethernet Hardware Address (EHA), hardware address, adapter address, or physical address.
In linux you can find the MAC id using below command
$ifconfig
Link encap:Ethernet HWaddr 01:01 :01 : 01 : 01 : 01 
inet addr:192.168.1.3 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: x Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Red highlighted one is you mac id
MAC : 01:01 :01 : 01 : 01 : 01
  • First 3 bytes of the MAC address identifies manufacturer, another 3 bytes it’s serial number.

unix and linux difference


UNIX / Linux:
That’s a very broad question and could be answered any number of ways. Probably the simplest answer is that from a technical point of view there are no major differences. Most people aren’t satisfied with believing that Linux and UNIX are very similar though. Here’s a list of the most obvious remaining differences.
Origin: UNIX originated in the laboratories of universities and large corporations as an initiative within the context of those organisations. Linux was begun by a university student (Linus Torvalds) without any initial support from any large organisation. Linux also began as in mimickry of other well-known UNIX-like implementations whereas the initial UNIX implementations were original research. Most commercial UNIX versions are also derived from that early research.
Service Model: Most UNIX versions operate on the basis that you can buy help (support and service contracts). Although such things are increasingly available to Linux technologists traditional arrangements consist of providing your own help with the assistance of a community of like-minded people. Linux is big and access to communities is more important than say it is for IBM mainframes.
Equipment: Although Linux runs on many kinds of equipment it is best known for its support of commodity IBM-Intel PC-based hardware. Most of the more popular UNIX flavours focus on high-performance hardware usually of a proprietory nature or using high-end standard computing architectures like SPRAC. With ever-increasing gains in pc-hardwarelike Serial-ATA this distinction is not as large as it used to be especially for low performance uses like desktops.
Licensing: Linux follows the Free Software Foundation’s radical licensing model which provides a great deal of liberty to those that interact with Linux technology. UNIX versions provided by other vendors have profit strategies embedded in them. People who offer Linux services might have a profit strategy but Linux itself doesn’t. This means that vendor lock-in is less of an issue with Linux than it is with other UNIX offerings. It also means that organisations big enough to have a center of computing competancy always have the choice of doing it themselves.
Honesty: Linux and related software is extremely visible. You can find out about flaws before yocommit to the technology rather than afterwards. Because of this a version number in Linux is a more relable indicator of the quality of the software than in UNIX. For example most Linux software spends a long time being version 0 (zero) before it ever qualifies for the label version 1.
In terms of quality performance and feature set there’s little to separate Linux from the other UNIXes. Linux has yet to provide genuine real-time scheduling which some other UNIX versions do well.

Linux Players List and how to install


Top Players in LINUX
1.VLC player
2.mplayer
3.xine
4.Kaffeine
5.totem
6.real player
Players Installation procedure follows:
1. VLC Media Player
VLC media player is a highly portable multimedia player for various audio and video formats (MPEG-1, MPEG-2, MPEG-4, DivX, mp3, ogg, …) as well as DVDs, VCDs
download vlc player
in Ubuntu
To install VLC, open a terminal and run following command:
sudo apt-get install vlc
in redhat
download vlc and open a terminal window and use the following command:
“yum install vlc”
2. MPlayer
Description:
It plays back CDs, DVDs, and VCDs. It also decodes multimedia files like AVI, MOV, WMV, and MP3 from local disk drives, and displays multimedia streamed over the Internet.
in ubuntu
Install mplayer using the following command
sudo apt-get install mplayer
other way to install players
download mplayer
./configure –enable-gui
note : ithout the –enable-gui switch, you’ll get a command-line-based playermake
su (if you’re not already root)
make install
3. Xine
Descrption :
It plays most MPEG/VOB, AVI, Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT, NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files, supported by many native, XAnim, and Win32 DLL codecs. You can watch VideoCD, SVCD, DVD, 3ivx, DivX
In ubuntu
sudo aptitude install xine-ui libxine-extracodecs
in other linux flavors
your can download from the site
link to site 
after downloading run below command in the terminal
yum install xine
4. Kaffeine
Description:
Kaffeine is a full featured Multimedia-Player for kde
In other flavors
click for kaffeine download
yum install kaffeine
5. Totem
Description:
GNOME desktop environment based on xine-lib or GStreamer. It features a playlist, a full-screen mode, seek and volume controls, as well as keyboard navigation
in Ubuntu
sudo apt-get install totem-gstreamer
in other flavors
yum install totem
6. Real player
Description:
Plays RealAudio, RealVideo, and now RealFlash
For all flavors download from
link to download
Prompt $ chmod +x Realplayer10Gold.bin
prompt$ ./Realplayer10Gold.bin
Some KDE player
Xt7-Player
KMPlayer
KMPlayer
M.O.V.E. (My Own Video Encoder)
MyRT
‘Q’ DVD-Author
Kdenlive
sMovieDB
SMPlayer

clean your filesystem from empty directories, corrupt symlinks, files with bad names, duplicate and temp files


FSlint is a utility tool that helps you clean your filesystem by pointing out junk in the form of empty directories, corrupt symlinks, files with bad names, duplicate and temp files, and more.
To intsall on ubuntu you need to run below code :
$sudo apt-get install fslint
In, Applications-> System Tools-> FSlint.
for other distros here is the rpm link to download and install :
wget http://www.pixelbeat.org/fslint/fslint-2.40-2.noarch.rpm
$sudo rpm -Uvh fslint-2.40-2.noarch.rpm

sntop - simple network top


sntop is an ncurses-based top-esque console utility for monitoring the connectivity of network hosts, supporting various advanced features and released under the GPL.
sntop uses fping (ping is supported, too) to determine connectivity of hosts, specified in a config file, on a regular interval. the results are displayed in a top-like format.
advanced features include html generation of results for automatic web page, secure terminal mode, execution of external file on alarm (configurable for either host DOWN or any change in host status), color support, and both user and system-wide config files. sntop aims for support on all popular unices and platforms.

http://sourceforge.net/projects/sntop - the sourceforge projects page; where everything is.
ftp://sntop.sourceforge.net/pub/sntop/ - find releases old and new. to be safe, check sourceforge.

Bald head


Mix  Bhringaraj / Guntagalagara leaves juice and radish  (mullangi rasam) and apply to the hair lost part on the head every night  and massage it well.Wash the head with soap nut juice ( kunkudu rasam)  in the morning .
Guntagalagara aku / Bhringaraj
Raddish /Mullangi
soap nuts/kunkudu kaya
Along with this do yoga asana such as sarvangasanam , mathyasanam ,ustrasanam .
Along with this eat the combination of guntagalagara ,black sesame seeds ( nalla nuvvulu ) , amla (usirika) powders with a spoon of honey everyday both morning and evening .Gradually hair starts growing in the bald head part.

Your Hotspot Your Way (Connectify)

Connectify is an easy to use software router for Windows computers. Users can wirelessly and securely share any Internet connection: a cable modem, cellular card, even another Wi-Fi network with other Wi-Fi enabled devices such as smart phones, laptops, and gaming systems.


http://connectify.me/

Disable ping command in linux


You can disable ping command in the server coz many users wants to disable PING to avoid detection or to keep away from Hackers. doing below steps

to disable the ping
admin@suresh$ echo 1  > /proc/sys/net/ipv4/icmp_echo_ignore_all
to enable the ping
admin@suresh$ echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_all

Shell script to add an static ip


#!/bin/sh
#shell script to add static ip
killall dhclinet
echo “Adding static ip”
sudo ifconfig eth0 up 192.168.1.2 netmask 255.255.255.0
echo “successfully added eth0″
echo “checking weather the gw is reachable or not ”
while [ -n  "$(ping -c 2 192.168.16.1 | grep 100%)" ]
do
echo “gateway not reachable try it agian”
exit
done
echo  “now adding default gateway for this network”
sudo route add default gw 192.168.1.1
echo “now checking weather it is added or not ”
route -n
echo ” sucessfully added”
done

Connecting Mysql in tomcat server in linux


You can connect to mysql in tomcat
- Setup mysql
Download Mysql click here
-download mysql connector(driver) and add file .jar to your project
Click here to download jconnector

-run mysql create datasource

Example for connecting the mysql in tomcat jsp
public static Connection getConnection(){
try{
Connection conn DriverManager.getConnection(“jdbc:mysql://127.0.0.1/lamtung?user root&password password”);
return conn;
}
catch(SQLException se)
{
se.printStackTrace();
return null;
}
}

Tomcat change the working folder in linux


Note : Before doing changes to the server.xml make a backup of it
mkdirs:
/home/username/tomcatwork
edit the server.xml file
admin@smartproteam$ vi /etc/tomcat6/server.xml
host name=”localhost” appbase=”/var/www/html/webapps/” workdir=”/home/username/tomcatwork” upackwars=”true” autodelpoy=”true” xmlvalidation=”false” xmlnamespaceaware=”false”

Install Apache and Tomcat in linux


1. must have the base packages installed on your system, these include: httpd, httpd-devel, php, php-common, php-devel. must have the base packages installed on your system, these include: httpd, httpd-devel, php, php-common, php-devel. and their respective units, this will use the “yum” that comes with CentOS (RedHat Enterprise) and their respective units, this will use the “yum” that comes with CentOS (RedHat Enterprise)
yum install httpd httpd-devel php php-common php-devel
After having installed the packages above, we proceed to update all our centos, using yum command again as follows After having installed the packages above, we proceed to update all our centos, again using the yum command as follows
yum-y update
However, we already have installed centos with PHP support for Apache, which is listening on port 80 (default port). However, we already have installed centos with PHP support for Apache, which is listening on port 80 (default port). CentOS is a directory / var / www / html which is the ROOT of the HTTP server (Apache) that is where we should place the files you want to see in our server via http://localhost/ http://localhost or if we a domino. CentOS is a directory / var / www / html which is the ROOT of the HTTP server (Apache) that is where we should place the files you want to see in our server via http://localhost/ http://localhost if we or a domino.
The following are going to install the development libraries also known as Java JDK (Java Developer Kit). The following are going to install the development libraries also known as Java JDK (Java Developer Kit). to do so download the package in the JDK 1.6 version extension. bin “jdk-6u5-linux-x64.bin for this example. to do so download the package in the JDK 1.6 version extension. bin “jdk-6u5-linux-x64.bin for this example.
once we get this file, create a directory called java under / usr, then copy the file. bin in / usr / java / we execute permission and execute it well: once we get this file, create a directory called java under / usr, then copy the file. bin in / usr / java / we execute permission and execute it like this:
cd / usr
mkdir java
cd java
cp / root/jdk-6u5-linux-x64.bin.
chmod + x jdk-6u5-linux-x64.bin
./jdk-6u5-linux-x64.bin
That we already have unpacked all the JDK in / usr / java we need to do is rename the directory to better organization and outcome: That we already have unpacked all the JDK in / usr / java we need to do is to rename the directory better organization and result:
mv jdk1.6.0_05 jdk1.6.0
Now we must include in the PATH of our environment, the Java libraries, for this, edit the file / etc / profile and include sigueintes the lines just before the end of the file, may be before the line “unset i” Now we must include in The Path of our environment, the Java libraries, for this, edit the file / etc / profile and include sigueintes the lines just before the end of the file, may be before the line “unset i”
JAVA_HOME = / usr/java/jdk1.6.0
PATH = $ PATH: $ JAVA_HOME / bin
export PATH JAVA_HOME
However, once we finish with the editing, save the file, and update the varables environment like this: However, once we finish with the editing, save the file, and update the environment varables like this:
source / etc / profile
Ready, we can test whether the libraries are working, running the command “javac-version” in this way we should mostar version 1.6 just installed. Ready, we can test whether the libraries are working, running the command “javac-version” in this way we should just mostar version 1.6 installed.
Now proceed to download Tomcat 5, then take the file, go to the directory / usr / java / copy it there, decompress it, and rename the result directory for tomcat5 higher order like this: Now proceed to download Tomcat 5, then take the file, go to the directory / usr / java / copy it there, decompress it, and rename the result directory for tomcat5 higher order like this:
cd / usr / java
tar xzf apache-tomcat-5.5.26.tar.gz
mv apache-tomcat-5.5.26 tomcat5
With this and we in our tomcat linux, we must now add the path to the tomcat, in our work environment, again by editing / etc / profile at the end should be something like this: With this and we in our tomcat linux, we must now add the path to the tomcat, in our work environment, again by editing / etc / profile at the end should be something like this:
JAVA_HOME = / usr/java/jdk1.6.0
PATH = $ PATH: $ JAVA_HOME / bin
CATALINA_HOME = / usr/java/tomcat5
export PATH JAVA_HOME CATALINA_HOME
Now we can run the tomcat and test it in our browser http://localhost:8080/ Now we can run the tomcat and test it in our browser http://localhost:8080/
/ usr/java/tomcat5/bin/startup.sh
The next step is to compile the jk module for inclusion in the HTTP server that downloaded the source for download here and the following steps (assuming you have downloaded the file / root). The next step is to compile the jk module for inclusion in the HTTP server that downloaded the source for download here and the following steps (assuming you have downloaded the file / root).
cd / root
tar xzf jakarta-tomcat-connectors-1.2.15-src.tar.gz
cd jakarta-tomcat-connectors-1.2.15-src
cd jk / native
. / buildconf.sh
. / configure – with-apxs = / usr / sbin / apxs
make
make install
Now create a file in / etc / httpd / conf workers.properties called Now create a file in / etc / httpd / conf call workers.properties
workers.tomcat_home = $ CATALINA_HOME
workers.java_home = $ JAVA_HOME
ps = /
worker.list = default
worker.default.port = 8009
worker.default.host = localhost
worker.default.type = ajp13
worker.default.lbfactor = 1
Edit the Apache configuration file (/ etc / httpd / conf / httpd.conf) to load the module. Edit the Apache configuration file (/ etc / httpd / conf / httpd.conf) to load the module. In the LoadModule section add: In the LoadModule section add:
Jk_module LoadModule modules / mod_jk.so
And at the end of the file: And at the end of the file:
JkWorkersFile “conf / workers.properties”
JkLogFile “logs / mod_jk.log”
JkLogLevel warn
JkMount / jsp-examples default
JkMount / jsp-examples / * default
Now restart Tomcat, then Apache:
/ etc / init.d / httpd restart
/ usr/java/tomcat5/bin/shutdown.sh
/ usr/java/tomcat5/bin/startup.sh

Top 6 Hacking Tools in Linux


1.NMAP
Nmap uses raw IP packets in novel ways to determine what hosts are available on the network, what services (application name and version) those hosts are offering, what operating systems (and OS versions) they are running, what type of packet filters/firewalls are in use, and dozens of other characteristics. Nmap runs on most types of computers and both console and graphical versions are available.
click here for NMAP tool
2.Nikto
web server scanner which performs comprehensive tests against web servers for multiple items, including over 3200 potentially dangerous files/CGIs, versions on over 625 servers, and version specific problems on over 230 servers
click here for Nikto tool
3.THC-Amap
Amap is a next-generation tool for assistingnetwork penetration testing.
It performs fast and reliable application protocol detection, independant
on the TCP/UDP port they are being bound to.
click here for THC-Amap
4.Ethereal
Ethereal is used by network professionals around the world for troubleshooting, analysis, software and protocol development, and education. It has all of the standard features you would expect in a protocol analyzer, and several features not seen in any other product. Its open source license allows talented experts in the networking community to add enhancements. It runs on all popular computing platforms, including Unix, Linux, and Windows.
click here for Ethereal
5.THC-Hydra
Number one of the biggest security holes are passwords, as every password security study shows.
Hydra is a parallized login cracker which supports numerous protocols to attack. New modules
are easy to add, beside that, it is flexible and very fast.
click here for THC-Hydra
6.Nessus
Nessus vulnerability scanner, is the world-leader in active scanners, featuring high speed discovery, configuration auditing, asset profiling, sensitive data discovery and vulnerability analysis of your security posture. Nessus scanners can be distributed throughout an entire enterprise, inside DMZs, and across physically separate networks.
click here for nessus

Locate command with examples


The locate command can quickly find a file.
When invoked, locate does not trail tree your disc, but uses a database to retrieve the file faster.
Advantage :
Search very rapidly.
Disadvantage :
It searches the files which are only in database or it won’t locate the file
To solve this problem. The command updatedb will update the database.
The generic syntax of locate is simple:
locate xyzfile
Without option, locate will return all occurrences of  xyzfile.
Some options to refine your search ,Search all files .py  and does not display error messages.
locate “*.py” -q
result
/usr/src/linux-headers-2.6.32-21/scripts/rt-tester/rt-tester.py
/usr/src/linux-headers-2.6.32-21/scripts/tracing/draw_functrace.py
/usr/src/linux-headers-2.6.32-22/scripts/rt-tester/rt-tester.py
/usr/src/linux-headers-2.6.32-22/scripts/tracing/draw_functrace.py
/usr/src/linux-headers-2.6.32-23/scripts/rt-tester/rt-tester.py
/usr/src/linux-headers-2.6.32-23/scripts/tracing/draw_functrace.py
/usr/src/linux-headers-2.6.32-24/scripts/rt-tester/rt-tester.py
/usr/src/linux-headers-2.6.32-24/scripts/tracing/draw_functrace.py
/usr/src/linux-headers-2.6.32-25/scripts/rt-tester/rt-tester.py
/usr/src/linux-headers-2.6.32-25/scripts/tracing/draw_functrace.py
/usr/src/linux-headers-2.6.32-26/scripts/rt-tester/rt-tester.py
/usr/src/linux-headers-2.6.32-26/scripts/tracing/draw_functrace.py
Search  for xorg file and limits the number of entries to 10
locate “xorg” -n 10
/xorg.conf.new
/etc/X11/xorg.conf
/etc/X11/xorg.conf-backup-100508180533
/etc/X11/xorg.conf.backup
/etc/X11/xorg.conf.failsafe
/etc/alternatives/xorg_extra_modules
/lib/udev/rules.d/40-xserver-xorg-video-intel.rules
/lib/udev/rules.d/64-xorg-xkb.rules
/lib/udev/rules.d/66-xorg-synaptics.rules
/lib/udev/rules.d/69-xorg-vmmouse.rules
Search for in case sensitive file name
locate -i XYZ.PHP

15 wget command examples


Wget is to download  download of files from the Web.
It supports HTTP, HTTPS, and FTP protocols, as well as
retrieval through HTTP proxies.
Syntax
wget [option] … [URL] …
Multiple options can be, for example
wget-rpk http://www.example.com
Usage Examples
Download file
wget http://www.example.com/fichier.html
Download a file whose URL contains a “&” (note quotes)
wget “http://www.example.com/min.php?page=home&user=ma”
Download, in addition to the specified file, all files required for optimal viewing
wget-p http://www.example.com/index.html
Draw an entire site (recursive download)
wget-r http://www.example.com/
Resume a download
wget-c http://www.example.com/xyz.html
Specify the name of the file once downloaded
wget – output-document = index.html http://www.example.com/index.php?page=home
Download files only an extension (here,. Jpg)
wget-A.jpg http://www.example.com/
Limit download speed
wget – limit-rate = 30k http://www.example.com/
Using a file containing addresses for download
wget-i liste_de_zyx.txt
Mp3 download all addresses contained in this list
wget-r-l1-H-t1-nd-N-np-a.mp3 erobots = off-imp3_sites.txt
Links automatically convert to a local consultation pages
wget-k http://www.example.com/
Download via ftp (With authentication)
wget-r l4 ftp://username:password @ example.com /
Create a backup of your del.icio.us bookmarks
wget http://del.icio.us/username/
Use wget to display the page source on the terminal
wget-qO – http://www.example.com/blog
For instance, if your .wgetrc
sets “exclude_directories” to /cgi-bin, the following example will
first reset it, and then set it to exclude /~nobody and /~somebody.
You can also clear the lists in .wgetrc.
wget -X ” -X /~nobody,/~somebody