Thursday, March 31, 2011

Doing pxe boot of windows 2003

install server 2003

configure the   i) dns server
                      ii)dhcp server and create a scope



                   
Configure the RIS Service


Goto start->Control panel->Add or Remove programs->Add/Remove Windows Components Select Remote Installation Service and copy files from  cd( which u want to install in the client system)





Copying the image to the RemoteInstall folder

Goto start-> Administrator tools-> Remote Installation Service setup copy the image that which u want to install in the client system.


Give the full Authentication to the RemoteInstall folder(Right click the RemoteInstall folder where u created)

 The Remote install folder should not be the System drive



DHCP server configuration

Create a scope if scope does not exists.

Goto start->Administrative tools -> DHCP  Right click DHCP Add server then select this server option then the dhcp server will be created with domain name Right Click and select New scope and create a new scope then scope will be created.

Double click on scope ->scope options -> Right click configure options then

                                           configure these options i) Router
                                                                               ii)Boot server hostname
                                                                               iii)Bootfile name


Adding the Network driver to the RIS image


                 Create the directory  shown below inside the  drive:\RemoteInstall\Setup\English\Images\WINDOWS\i386

                                    \$oem$\$1\Drivers\Nic

Download the oem network driver from below url:


http://drivers.brothersoft.com/realtek-ethernet-pci-e-driver-5.776-for-2003-xp-download-47037.html

Copy the downloaded driver into the below path


Drive:\RemoteInstall\Setup\English\Images\WINDOWS\i386\$oem$\$1\Drivers\Nic\  


In Regedit(registry) HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Current Version\devicePath default will be %Systemdrive%\inf change into

            Drive:\RemoteInstall\Setup\English\Images\WINDOWS\i386\$oem$\$1\Drivers\Nic\

      then restart u r computer and boot the client system through network.




Requirements for the client system

The system should be connected to the network.

Red Hat 6: How to boot into Single-user mode

There are a few situations where we need to take a Linux system actually offline:
  • file systems operations ( i.e. resizing, backup/restore, fsck)
  • general maintenance (certain things simply cannot be done in multi-user mode)
  • lost root passwords (often enough a single admin is around, typically not documenting changes etc., or disgrantled employees do some harm )
In such situations, it is necessary to boot into Single-user mode (aka runlevel 1).
There are basically 2 general ways of achieving this:
  1. If you have a valid login account with elevated permissions, and want to do some maintenance, just change the runlevel as described here.
  2. If you lost the root password, you must reboot the computer and edit the bootloader ( typically GRUB) to boot into Single user mode.
In a situation where the root password is already lost and no other account with equivalent permissions is available, you probably have to hard-reset the system.
If that is a physical server, you might have to press the power button typically for 4 seconds or longer, or even unplug the power  cable, as most if not all modern servers can be configured on BIOS level to ignore the power buttons. Many companies  have coded this in their policies to ensure important servers are not being switched off by coincidence.
To reset a physical server, you usually need to have also physical access to that very box, including keyboard and monitor, or via KVM switch if available.
A virtual machine can usually be reset a bit easier, depending on the host system (VMware, XEN, KVM, etc. etc.).
Either way, once your system is rebooting, you need to access the edit bootloader, which in Redhat 6 is GRUB (GRand Unified Bootloader).
When the screen shows the GRUB stage 1, it counts down 4 seconds (at least per default configuration, this can be different in many cases) with one head-line “Press any key to enter the menu” and printing another line every second, stating which kernel will be booted:
GRUB stage 1
Press any key here to get into the GRUB menu:
GRUB stage2 menu
Good job! As you can see in the text under the border, you have a few choices now:
  • use the cursor keys to switch between kernels (if you have more than 1 installed) to chose the one you want to boot
  • press “enter ” to boot the selected kernel
  • press “e” to edit the kernel commands before booting => this will be our choice
  • press “a” to modify the kernel arguments
  • press “c” to go to a command-line,  for extended troubleshooting etc.
One you pressed “e” while the kernel of your choice is highlighted, you get a second menu:
GRUB stage 2 menu 2
Here it is vital to highlight the second line ( while it is possible to edit parameters on each of the lines, the second line is just where we need to go),  and press “e” once more to edit:
GRUB stage 2 menu3
Here we simply type the word “single” at the end of the line to add one more argument to the kernel:
add "single"
(Note that there are quite a few more parameters available to add, but we want to get into single-user mode so that is all we need for now).
Make sure to hit “enter” to actually add the argument and to return to the boot menu. Escape does get you back to the same menu as well, but it does not add the argument, so your work will be undone actually.
Grub stage 2 menu3
We are back to the previous menu, and if you like you can press “e” again to ensure that “single” is now added to the end of the line, otherwise you just can hit “b” now to boot into single-user mode:
single-user mode
As you can see at the bottom of the screen, you are now logged on as root without having to present any credentials. If you came here to reset your root password, just type passwd to do so:
[root@your_system /]# passwd
and enter the password of your choice when prompted.
As you can see, this is actually a very easy process.  As such, please always be aware that anyone who has access to this system can do that as well! Server or workstation, both have should be always secured in one way or the other. File level encryption might be one way of securing your data, but it does probably not help against someone trying to bring your system down, i.e. DOS attacks.

Monday, March 28, 2011

How to setup multimedia on Redhat 6 & Centos (32 and 64 bit)

Step 1: 

Add RPMforge repository access for your Redhat $ CentOS system. (Required for the majority of multimedia packages.)

Installing RPMforge for Redhat 6 & Centos 6

The default RPMforge repository does not replace any CentOS base packages. In the past it used to, but those packages are now in a separate repository (rpmforge-extras) which is disabled by default.
You can find a complete listing of the RPMforge package packages at http://packages.sw.be/
Download the rpmforge-release package. Choose one of the two links below, selecting to match your host's architecture. If you are unsure of which one to use you can check your architecture with the command uname -i
        The preferred rpmforge-release package to retrieve and to install in order to enable that repository is one of the two listed above.

Install DAG's GPG key
 
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt


Verify the package you have downloaded
 
rpm -K rpmforge-release-0.5.2-2.el6.rf.*.rpm

Install the package
 
rpm -i rpmforge-release-0.5.2-2.el6.rf.*.rpm

This will add a yum repository config file and import the appropriate GPG keys. 

Installing Dag RPM Repository for Red Hat Enterprise Linux

     The DAG RPM repositories which contains huge amount of rpm packages. It’s very easy. Just install the latest rpmforge-release package for your distribution and architecture.

This will automatically install the configuration and GPG keys that are for safely installing RPMforge packages.

First :-

# gedit /etc/yum.repos.d/dag.repo

Insert :-

[dag]

name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el6/en/x86_64/dag/
gpgcheck=1
enabled=1

Then save the repo file also you can update RPM

Find out waht the actual name for missing package from this site:

http://pkgs.org/

Download the package from this site

http://ftp.redhat.com/redhat/rhel/beta/6/optional/x86_64/os/Packages/


Step 2: Install the multimedia applications.

 
The following steps will use yum to install all the packages needed to have full multimedia support. Note there will be a lot of dependencies.
yum install compat-libstdc++-33 libdvdcss libdvdread libdvdplay libdvdnav lsdvd libquicktime
yum install flash-plugin mplayerplug-in mplayer mplayer-gui gstreamer-ffmpeg gstreamer-plugins-bad gstreamer-plugins-ugly


Step 3: Install the w32Codecs. (Required for xvid and other proprietary formats.)
 
wget www1.mplayerhq.hu/MPlayer/releases/codecs/mplayer-codecs-20061022-1.i386.rpm
rpm -ivh mplayer-codecs-20061022-1.i386.rpm
wget www1.mplayerhq.hu/MPlayer/releases/codecs/mplayer-codecs-extra-20061022-1.i386.rpm
rpm -ivh mplayer-codecs-extra-20061022-1.i386.rpm    

Redhat 6 Beta Package (32 and 64 bit)

Download Beta RPM in this site


http://ftp.redhat.com/redhat/rhel/beta/6/optional/x86_64/os/Packages/

Tuesday, March 22, 2011

Install Google Chrome with YUM on Fedora 14/13, Red Hat (RHEL) 6

This howto explains howto install Google Chrome Web browser on Fedora 14, Fedora 13, Fedora 12 and Red Hat 6 (RHEL 6). Best way to install and keep up-to-date with Google Chrome browser is use Google’s own YUM repository.

Enable Google YUM repository

Add following to /etc/yum.repos.d/google.repo file:

32-bit


[google]
name=Google - i386
baseurl=http://dl.google.com/linux/rpm/stable/i386
enabled=1
gpgcheck=1
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub


64-bit
 
[google64]
name=Google - x86_64
baseurl=http://dl.google.com/linux/rpm/stable/x86_64
enabled=1
gpgcheck=1
gpgkey=https://dl-ssl.google.com/linux/linux_signing_key.pub


Note: Both 32-bit and 64-bit repos can be placed in the same file.

Install Google Chrome with YUM (as root user)

Install Google Chrome Stable Version

## Install Google Chrome Stable version ##
yum install google-chrome-stable

Install Google Chrome Beta Version

## Install Google Chrome Beta version ##
yum install google-chrome-beta

Install Google Chrome Unstable Version

## Install Google Chrome Unstable version ##
yum install google-chrome-unstable 

Wednesday, March 9, 2011

Linux System Monitoring Tools

1: top - Process Activity Command

The top program provides a dynamic real-time view of a running system i.e. actual process activity. By default, it displays the most CPU-intensive tasks running on the server and updates the list every five seconds.

Commonly Used Hot Keys

The top command provides several useful hot keys:
Hot Key Usage
t Displays summary information off and on.
m Displays memory information off and on.
A Sorts the display by top consumers of various system resources. Useful for quick identification of performance-hungry tasks on a system.
f Enters an interactive configuration screen for top. Helpful for setting up top for a specific task.
o Enables you to interactively select the ordering within top.
r Issues renice command.
k Issues kill command.
z Turn on or off color/mono

 

2: vmstat - System Activity, Hardware and System Information

The command vmstat reports information about processes, memory, paging, block IO, traps, and cpu activity.

 [root@NaN NaN]# vmstat
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 1  0      0 206052 117096 1177156    0    0    49    52  206  445  4  1 94  1  0    

Display Memory Utilization Slabinfo

# vmstat -m

Get Information About Active / Inactive Memory Pages

# vmstat -a

3: w - Find Out Who Is Logged on And What They Are Doing

w command displays information about the users currently on the machine, and their processes.

[root@NaN NaN]# w NaN
 13:27:45 up  3:26,  2 users,  load average: 0.00, 0.00, 0.00
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
NaN      tty1     :0               10:02    3:25m  3:12   0.00s pam: gdm-password
NaN      pts/0    :0.0             12:44    0.00s  1.33s  1.52s gnome-terminal



4: uptime - Tell How Long The System Has Been Running

The uptime command can be used to see how long the server has been running. The current time, how long the system has been running, how many users are currently logged on, and the system load averages for the past 1, 5, and 15 minutes.

[root@NaN NaN]# uptime
 13:28:36 up  3:26,  2 users,  load average: 0.00, 0.00, 0.00

5: ps - Displays The Processes

ps command will report a snapshot of the current processes. To select all processes use the -A or -e option:
 
[root@NaN NaN]# ps -A
  PID TTY          TIME CMD
    1 ?        00:00:00 init
    2 ?        00:00:00 kthreadd
    3 ?        00:00:00 migration/0
    4 ?        00:00:00 ksoftirqd/0
    5 ?        00:00:00 watchdog/0
    6 ?        00:00:00 migration/1
    7 ?        00:00:00 ksoftirqd/1
    8 ?        00:00:00 watchdog/1
    9 ?        00:00:00 events/0
   10 ?        00:00:00 events/1

6: free - Memory Usage

The command free displays the total amount of free and used physical and swap memory in the system, as well as the buffers used by the kernel.

[root@NaN NaN]# free
             total       used       free     shared    buffers     cached
Mem:       2052376    1848564     203812          0     117924    1176184
-/+ buffers/cache:     554456    1497920
Swap:      4196348          0    4196348


7: iptraf - Real-time Network Statistics

The iptraf command is interactive colorful IP LAN monitor. It is an ncurses-based IP LAN monitor that generates various network statistics including TCP info, UDP counts, ICMP and OSPF information, Ethernet load info, node stats, IP checksum errors, and others. It can provide the following info in easy to read format:
  • Network traffic statistics by TCP connection
  • IP traffic statistics by network interface
  • Network traffic statistics by protocol
  • Network traffic statistics by TCP/UDP port and by packet size
  • Network traffic statistics by Layer2 address






Thursday, March 3, 2011

Configure TigerVNC server In Fedora

Install VNC server on the remote system to which we want to log in on via remote desktop



yum -y install tigervnc-server

As soon as the installation is finished, make a backup of the VNC server configuration file located in /etc/sysconfig/vncservers.



cp /etc/sysconfig/vncservers /etc/sysconfig/vncservers.backup

Open VNC server configuration file located with your desired editor.



vi /etc/sysconfig/vncservers

Read the instructions in this file. Have a look at the commented example at the end of the configuration file.



# VNCSERVERS="2:myusername"
# VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -localhost"


VNCSERVERS="1:root"
VNCSERVERARGS[1]="-geometry 1440x900 -nolisten tcp -localhost"

Create VNC passwords for your user. Log in as the user (zdenek in my example) and type command

vncpasswd

Go to user's .vnc directory on VNC server

cd ~/.vnc

- Edit configuration xstartup file

vi xstartup

- Comment "vncconfig -iconic &" line with "#" symbol, so the result will looks like this

#vncconfig -iconic &

Go to the end of the file, comment line with "twm &" and add "startx &" to initiate Gnome or "startkde &" for KDE environment initialization. The final result fill be following:
for Gnome

#twm &
startx &

Start VNC server

service vncserver restart

You should see following output
[root@NaN NaN]# service vncserver start
Starting VNC server: 1:root                                [  OK  ]

Add the VNC  tcp,udp port Number in firewall



Finally The VNC tcp,udp port number will add in others port number in firewall


Open vnc viewer on your client - execute command

vncviewer

Or start the application from menu "Applications" > "Internet" > "TigerVNC Viewer". Following window will pop up




Type there the IP address of the localhost (127.0.0.1) and port number of your desktop behind the colon (Do not use the public / private IP address of your VNC server because it will not work; use only localhost). In general, use 127.0.0.1:N, where N is number of the assigned desktop. In my case it is the desktop number 1. Click OK button. You will be asked for password. Type the one you have set up in the step 6 above and enter the return key.



A window with remote desktop will appear.