Pages

Wednesday, July 25, 2012

Creating local directory for yum installation using createrepo @ rhel ,fedora

To create a local directory from which we can install through yum,Mainly we need the "createrepo plugin of yum"

first make the directory

>mkdir pak

then copy the rpms into the directory

then use createrepo to create the repository files inside the folder

>createrepo pak

then it will make repository files and show following on success

Saving Primary metadata
Saving file lists metadata
Saving other metadata

then make a file @ /etc/yum.repos.d/pak.repo

>vim /etc/yum.repo.d/pak.repo

inside that we need name url and enable option
enable should be equal to 1 to make the repository
active all the time.the url will have destination to
the folder

as follows


[pal]
Name=pak $releasever $basearch local repository
baseurl=file:///pak
enabled=1

Sunday, July 22, 2012

fedora 17 and grub2

Fedora 17 and grub2...While installing fedora 17 from the live cd  at the end of finishing the installations i got an error like "installing bootloader failed ..system any not boot properly " the problem was maily with grub2 version .Even though the grub2 is much better than the older one it has some bugs .it shows some problem whiling installing to a system with older grub.

We can try reinstall the grub with the distro dvd rescue mode...

1.chroot  /mnt/sysimage

the root file system will be loaded to /mnt/image

2. grub2-install /dev/sda
installing the grub to ur harddisk ..in normal mode this wont work we should also give --force and --recheck

grub2-install --force --recheck /dev/sda

3.to get all the operating system use

grub2-mkconfig -o /boot/grub2/grub.cfg

the -o will create the config file

 

 

Saturday, July 14, 2012

To create keyboard shortcut for terminal in linux

open the terminal then type

>gnome-keybinding-properties

Then an window will pop up that window can be used to create custom keyboard shortcuts.

Click add and give name for the entry and terminal command which should be activated with shortcut and click Apply

now in the window backward an entry such as custom entry will appear and now click in shortcut then the disabled option changes to New shortcut .now press the needed shortcut it will be set.

command for terminal is gnome-terminal and give needed shortcuts

Resizable linux partions --LVM-logical volume management

In linux we can can create resizable partition  which can be resized if free space is available. That type of partitions logical volumes.
lvm-digram

1.-------->First we need to create normal logical partitions.
i have a partion  /dev/sda4  in /dev/sda
2.--------->Then we need to select the partition and change the partition type to 0x8e or create the partition as physical volume using given option in palimpsest
using fdisk command we could change the partion type to 0x8e . we could use the 't' option in fdisk to change the type ,after seleting the 't' option it will prompt for the partition no of which type need to be changed .using the 'l' option will list types of  partition type.
fdisk /dev/sda
At the Linux fdisk command prompt,

  1. press n to create a new disk partition,

  2. press p to create a primary disk partition,

  3. press 1 to denote it as 1st disk partition,

  4. press ENTER twice to accept the default of 1st and last cylinder – to convert the whole secondary hard disk to a single disk partition,

  5. press t (will automatically select the only partition – partition 1) to change the default Linux partition type (0×83) to LVM partition type (0x8e),

  6. press L to list all the currently supported partition type,

  7. press 8e (as per the L listing) to change partition 1 to 8e, i.e. Linux LVM partition type,

  8. press p to display the secondary hard disk partition setup. Please take note that the first partition is denoted as /dev/hdb1 in Linux,

  9. press w to write the partition table and exit fdisk upon completion.


3.-------->Next, this LVM command will create a LVM physical volume (PV) on a regular hard disk or partition:
pvcreate /dev/sda4

4---------->Now, another LVM command to create a LVM volume group (VG) called vg0 with a physical extent size (PE size) of 16MB:
vgcreate -s 16M vg0 /dev/hdb1

 

5---------->Create a 400MB logical volume (LV) called lvol0 on volume group vg0:
lvcreate -L 400M -n lvol0 vg0

This lvcreate command will create a softlink /dev/vg0/lvol0 point to a correspondence block device file called /dev/mapper/vg0-lvol0.

6----------->Formatting the partition to the needed type ..here i am going to format it to ext4 type

mkfs.ext4 /dev/vg0/lvol0
Finally mounting the partition to the needed place.here i will be mounting the partition to /data

mkdir  /data

mount /dev/vg0/lvol0 /data

some of the useful commands in this are

pvs

vgs

lvs

pvdisplay

vgdisplay

lvdisplay

more useful commands are lvextend and lvreduce

reduced should be used carefully because  cutting of the file system may cause data loose if not done properly

Tuesday, June 19, 2012

Gcc for windows-Install the MinGW (GCC) Compiler Suite and Cygwin prompt

This Gcc compiler doesn't exactly replaces the normal Linux gcc compiler .First download the file from following link and run it to install MinGW (Minimalist GNU for Windows).We need net connection to install this

http://sourceforge.net/projects/mingw/files/MinGW/





in latest MinGW you will have c compiler in the list .Select the needed components and select the path to which you need to install it.After the installation we need to set the environment .

Create a directory (e.g. C:\MinGW), download all packages to C:\MinGW, extract the files from each package, and add C:\MinGW\bin; to your PATH environment variable using C:\> set PATH=C:\MinGW\bin;%PATH%" .or set it normally with properties of mycomputer>Environment variables.

To get more linux effect in windows install Cygwin from http://www.cygwin.com/install.html to get a terminal effect.and install needed packages as needed in cygwin.to install cygwin also we need internet connection

http://www.eecg.utoronto.ca/~aamodt/ece242/cygwin.html


Monday, May 21, 2012

Connecting to ur computer through ssh and No-IP form mobile or computer

Normally we use ssh for connecting to ur system over internet form other computer or mobile.When using ssh we will be having the ip address of the computer to which we need to connect .we set up a ssh server and we will be able to connect to this server using the ip to get a prompt to use.The main problem when u connect ur computer over internet is the dynamic ip problem.that is when the connection at ur computer is lost and reconnected u get another ip address and u don't know that one.

Solution

Using No-ip to get an static ip for the computer

Actually No-ip doesn't provide any static ip but binds our current ip to a host name so that when ever the ip is changed it automatically gets assigned to the host .thus by using the host name we a access the computer.

step1. Download the no-ip software form there site and install it-->> https://www.no-ip.com/downloads.php

step2.Make an account in the No-ip site and create a host name(which is free)

step3. now add the host name into the No-ip software in ur computer.First u need to use ur login id and password in the software then it will show ur host name .u can just select it.

 

Setting up ssh in windows

we can use freesshd for ssh services in windows.

  just download it from www.freesshd.com and install it.setup an ssh server.set the listen interface to all.and create a user account .with authorization "password stored as sha1"and give the password. and turn up the ssh server

its done now we can use putty to check whether its working or not ..In putty give the host name as host name u registered in no ip and connect

to connect from mobile putty is available for android and Symbian also.in mobile putty we can give the host name and username which we have created.

 

Thursday, May 17, 2012

removing Recycler virus

the recycler virus particularly come from pendrives,ipods,mp3 players etc.....which effects our folder's hidden and read only options....so to remove this virus I've got a lengthy,yet a very effective process..

1>restart your PC in safe mode {by pressing the F8 key constantly when the PC is restarted}

2>then run an anti-spyware check...for eg.download MALWAREBYTES ANTIMALWARE [its free]

3>run a complete anti-virus scan

4>clean up your system registry by downloading-- REG SEEKER

5>restart.....

[NOTE]:AFTER THIS PROCESS NEVER OPEN YOUR PENDRIVES OR ANY REMOVAL DRIVE,INSTEAD FORMAT THEM AND THEN OPEN......

Removing the Recycler.exe virus please follow the steps below…

Reboot your computer into Safe Mode, this is important as this is a memory resident virus. Do this by pressing F8 as the machine boots up and select safe mode from the DOS menu. Once in Safe Mode, press enter to stay in safe mode, you don't want to go to Recovery.

1. Open up windows explorer, Start>Programs>Accessories>Explorer

2. Go to (In Vista press ALT to display menus) Tools>Folder Options>View>uncheck the items below: 1>display the contents of system folders

2>hide extensions for known file types

3>hide protected operating system files(Recommended) Leave the other items as they are.

3. Press Apply>OK.

4. Leaving windows explorer open,

navigate to the root of the C:\ drive and remove AUTORUN.INF and any files that end in *.CMD and *.BAT excepting for AUTORUN.BAT and COMMAND.COM which are legacy files you may or may not have. Now go to C:\Recycler and remove anything located in the folders that look like recycle bins, if you are on a network there will be more than one.

5. Delete all instances of the virus on your disk. There are two or three variants of this virus, some put a file in the windows directory named SVHOSTE which is a hidden file - search for this and delete it.

 

6. Remove from Registry. Open Registry Editor.

Click Start>Run, type REGEDIT, then press Enter. In the left panel,

double-click the following: HKEY_LOCAL_MACHINE>SOFTWARE>Microsoft>Active Setup>Installed Components

In the left panel, locate and delete the key: {08B0E5C0-4FCB-11CF-AAX5-90401C608512} Close REGEDIT and click on Start>Run or on Vista just type in the search box MSCONFIG and press enter.

Click the startup tab and uncheck any misspelt entries such as Microssoft and Norrton, also take into account the command of this startup entry, navigate to where these files are located and delete them from your disk. Format any memory sticks you have used with this machine by going into explorer, right click on the disk and clicking format. Once Formatted reboot your virus free machine.