Monday, May 31, 2010

BASIC COMMAND FOR VMWARE & LINUX

Directory description
/bin Essential command binaries (programs) are stored here (bash, ls, mount,tar, etc.)
/boot Static files of the boot loader.
/dev Device files. In Linux, hardware devices are acceessd just like other files, and they are kept under this directory.
/etc Host-specific system configuration files.
/home Location of users' personal home directories (e.g. /home/susan).
/lib Essential shared libraries and kernel modules.
/Proc Process information pseudo-filesystem. An interface to kernel data structures.
/root The root (superuser) home directory.
/sbin Essential system binaries (fdisk, fsck, init, etc).
/tmp Temporary files. All users have permission to place temporary files here.
/usr The base directory for most shareable, read-only data (programs, libraries,documentation, and much more).
/var Variable data: mail and printer spools, log files, lock files, etc.

Basic Commands For Navigation

ESX Command DOS/Windows Command Description
pwd cd “Print Working Directory”. Shows the current location in the directory tree.
cd cd,chdir “Change Directory”. When typed all by itself, it returns you to your home directory.
cd directory cd directory Change into the specified directory name.
Example: cd /usr/src/linux
cd ~ . “~” is an alias for your home directory. It can be used as a shortcut to your “home”, or other directories relative to your home.
cd.. cd.. Move up one directory. For example, if you are in /home/vic and you type “cd ..”, you will end up in /home.
cd - . Return to previous directory. An easy way to get back to your previous location!
Is Dir /w List all files in the current directory, in column format.
Is directory Dir directory List the files in the specified directory.
Example: ls /var/log

Special Characters














Character Description
\ Escape character. If you want to reference a special character, you must “escape” it with a backslash first.
Example: touch /tmp/filename\*
/ Directory separator, used to separate a string of directory names.
Example: /usr/src/linux
. Current directory. Can also “hide” files when it is the first character in a filename.
..Parent Directory
~User's Home Directory
*Represents 0 or more characters in a filename, or by itself, all files in a directory.
Example: pic*2002 can represent the files pic2002, picJanuary2002, etc.
?Represents a single character in a filename.
Example: hello?.txt can represent hello1.txt, helloz.txt, but not hello22.txt
[]Can be used to represent a range of values, e.g. [0-9], [A-Z], etc.
Example: hello[0-2].txt represents the names hello0.txt,hello1.txt, and hello2.txt
|“Pipe”. Redirect the output of one command into another command.
Example: ls | more
>Redirect output of a command into a new file. If the file already exists, over-write it.
Example: ls > myfiles.txt
>>Redirect the output of a command onto the end of an existing file.
Example: echo .Mary 555-1234. >> phonenumbers.txt
<Redirect a file as input to a program.
Example: more < phonenumbers.txt
;Command separator. Allows you to execute multiple commands on a single line.Example: cd /var/log ; less messages
&&Command separator as above, but only runs the second command if the first one finished without errors.
Example: cd /var/logs && less messages
&Execute a command in the background, and immediately get your shell back.
Example: find / -name core > /tmp/corefiles.txt &

Working with Files and Directories

ESX Command DOS/Windows Command Description
CattypeDisplay the contents of a text file on the screen.
For example: cat mp3files.txt
Head - Display the first few lines of a text file.
Example: head /etc/services
Tail- Display the last few lines of a text file.
Example: tail /etc/services
tail-f - Display the last few lines of a text file, and then output appended data as the file grows (very useful for following log files!).
Example: tail -f /var/log/messages
CpCopyCopies a file from one location to another.
Example: cp mp3files.txt /tmp
mvMove,ren,renameMoves a file to a new location, or renames it.
For example: mv mp3files.txt /tmp
rmDelDelete a file. Example: rm /tmp/mp3files.txt
mkdirmdMake Directory. Example: mkdir /tmp/myfiles/
rmdirrd,RmdirRemove Directory. Example: rmdir /tmp/myfiles/

Find/Search things

Linux CommandDescription
WhichShows the full path of Shell Commands found in your path.For example,if u want to know exactly where the "grep Command is located on the file system,you cantype "Which grep".The Output should be something like /bin/grep.
where isLocates the Program,Source code,and manual page for a command(if all information is available).For example, to find out where "1s" and its main page are, type "Whereis 1s".The output will look something like:
1s:/bin//1s/usr/share/man/man1/1s.1.gz
locateA quick way to search for files anywhere on the file system.For example,you can find all files and directories that contain the name "mozilla"by typing:
locate mozilla
findA very powerful command,but sometimes tricky to use.It can be used to search for files matching certain patterns as well as many other types of searche.A simple example is:
find . -name \*mp3
This example starts searching in the current directory"." and all sub directories looking for files with"mp3"at the end od their names

Informational Commands

Linux CommandDescription
psLinks currently running process(programs).
wShow who is logged on and what they are doing.
idPrint your User-id's and Group id's.
dfReport File system disk space usage("DiskFree" is how I remember it)
duDisk Usage in a Particular Directory."du -s" provides a summary for current directory.
topDisplays CPU Processes in a full screen GUI.A great way to see the activity on your computer in real time.Type "Q" to quit.
freeDisplays amount of free and used memory in the system.
cat/proc/cpuinfoDisplays information about your CPU.
cat/proc/meminfoDisplays lots of information about current memory Usage
uname -aPrints system information to the screen(Kernel version,machine type,etc.,).

Other Utilities

Linux CommandDescription
ClearClear the Screen
echoDisplay text on the screen.Mostly useful when writing shell scripts.For example:
echo"Hello World"
moreDisplay a file, or program output onpage at a time.Examples:
more mp3files.txt
ls -la | more.
lessAn improved replacement for "more" command".Allows you to scroll backwards as well as forwards.
grepSearch for a pattern in a file or program output.For example to find out which TCP network is used by the "NFS" service,You can do this:
grep "nfs" /etc/services

This looks for any line that contains the string "nfs" in the file "/etc/services" and displays only those lines.
lprPrint a file or program output.Examples:
lpr mp3files.txt - Prints the mp3files.txt files.
ls -la | lpr -Prints the output of the "ls -la" command.
sortSort a file or Program Output.Examples: sort mp3files.txt.
su"Switch user".Allows you to switch to another user account temporarily.The default account to switch to is the root/superuser account.Examples:
su   -Switch to root account.
su-   -Switch to root and log in with root's environment.
su  larry-Switch to larry's account.

Tuesday, May 25, 2010

FAILOVER CLUSTER


                                                   Installing a Windows Server 2008 Failover  Cluster

I recently needed to do some testing with a Windows 2008 cluster for OpsMgr so I decided to go ahead and embrace Windows 2008 as both a host and guest operating system.
Server 2008 with Hyper-V ....

To do this I upgraded my Windows Server 2003 to Windows Server 2008, and added the role for Hyper-V. First off, Hyper-V is really cool. Attaching a Video of what my environment looked like once I had configured .

I followed this video ,Look into this !!!!!

http://mschnlnine.vo.llnwd.net/d1/edge/0/9/1/3/3HyperVR2BuildingaHyperVR2Cluster_2MB_edge.wmv

Wednesday, May 12, 2010

window7 Updates



Windows updates may fail in Windows 7 or in Vista with the Error Code 0×80070422 with the following error in the c:\windows\logs\CBS\CBS.log file.

80070422 SelfUpdate Failure Software Synchronization Windows Update Client failed to detect with error 0×80070422

This can happen for two reasons,

•“Windows Update” Service is disabled or not set to Automatic as Startup Type

•“Windows Modules Installer” Service is not set to manual as Startup type.

To resolve this Windows Vista or Windows 7 update issue, set the Startup type of respective services to “Automatic” & “Manual” respectively.
Follow the steps to resolve Windows Update error 80070422:

                        Important:You must be logged on as an administrator to perform these steps.
•Press Start, type admin in the start menu search box, and click on Administrative Tools
•Double-click Services. If you are prompted for an administrator password or confirmation, type the password or provide confirmation
•Right-click the Windows Update service, and then click Properties
•On the General tab, next to Startup type, make sure that Automatic is selected
•Next to Service status, check to see if the service is started. If it is not, click Start. If you are prompted for an administrator password or confirmation, type the password or provide confirmation.
•Similarly, set the “Windows Modules Installer” service startup type as “manual”.
Note:First you want to reveal the hidden admin account in Windows Vista and login to the hidden admin account.For this do the following:
•Click on Windows Vista Start orbs.
•In start menu search type: cmd
•Right-Click the cmd icon and choose “Run as Administrator”
•Now type the follwoing command:
net user administrator /active:yes
You should see a message that the command completed successfully, logoff and login to the true admin account


Friday, May 07, 2010

Updates Error In windows Operating System



I understand the inconvenience you encountered when trying to perform Windows Update. Please be assured that I will do my best to help you.


The issue may be caused by one of the following factors:
1. The installation is affected by some third-party security software.
2. The downloaded installation file is corrupted.


In order to narrow down the cause of our issue, let's refer to the following steps:

NOTE: Some third party programs can affect the Windows Update service. If you are running any third party applications such as Spyblocker, Internet or web accelerators (programs designed to boost the speed of the Internet connection), security or anti-virus programs (Norton, McAfee, etc.), I recommend we temporarily disable or shut them down and then try accessing Windows Update later. Please be sure to enable them again when the update process has been completed.


Step 1: Rename the Windows Update Softwaredistribution folder
================================================
This issue may occur if the Windows Update Software distribution folder has been corrupted. We can refer to the following steps to rename this folder. Please note that the folder will be re-created the next time we visit the Windows Update site.
1. Close all the open windows.
2. Click the "Start" Button, click "All programs", and click "Accessories".
3. Right-click "Command Prompt", and click "Run as administrator".

4. In "Administrator: Command Prompt" window, type in "net stop WuAuServ" (without the quotes) and press Enter.
Note: Please look at the cmd window and make sure it says that it was successfully stopped before we try to rename the folder. However, if it fails, please let me know before performing any further steps and include any error messages you may have received when it failed.

5. Click the "Start" Button, in the "Start Search" box, type in "%windir%" (without the quotes) and press Enter.
6. In the opened folder, look for the folder named "SoftwareDistribution".
7. Right-click on the folder, select "Rename" and type "SDold" (without the quotes) to rename this folder.
8. Still in "Administrator: Command Prompt" window, type the command "net start WuAuServ" (without the quotes) in the opened window to restart the Windows Updates service.

Note: Please look at the cmd window and make sure it says that it was successfully started. However, if it fails, please let me know before performing any further steps and include any error messages you may have received when it failed.
If the steps above do not work, let's refer to the following steps to manually download and install the update.
Step 2: Download and install the update manually.
======================================
1. Please download the update from
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=c0145563-428e-47b6-b245-b59dce88ac0e
Please note its location.
2. Please double-click the downloaded file to install the update.
If an error is encountered when installing the update manually, please capture a screenshot for further research
How to capture a screenshot
======================
1. Press the Print Screen key (PrtScn) on your keyboard.
2. Click the "Start" Button, type "mspaint" in the Search Bar and Press Enter.
3. In the Paint program, click the "Edit" menu, click "Paste". Then click the "File" menu, and click "Save".
4. The "Save As" dialogue box will appear. Type a file name in the "File name:" box, for example: "screenshot".
5. Make sure "JPEG (*.JPG;*.JPEG;*.JPE;*.JFIF)" is selected in the "Save as type" box, click "Desktop" on the left pane and then click "Save".
In the meantime, to clarify the issue and provide more accurate troubleshooting steps, please assist me in collecting the following information.


How to collect the WindowsUpdate.log file
================================
1. Click the "Start" Button, type "WindowsUpdate.log" (without the quotes) in the Search Bar and Press Enter. We will see a file named "WindowsUpdate.log"
2. Now click on the "File" menu and then click on the "Save As".

3. From the left panel, click "Desktop" and click the Save button.
Cool........................................................
Contact:Satishchirala@gmail.com

acm bottom ad