Search This Blog

Thursday, May 3, 2012

Conifguring Apache in Linux machine

Here are the detailed steps if its already installed

check if its already installed 


# httpd -v  (you may get command not found ,so try this too)
#  whereis httpd   (output in my machine /usr/sbin/httpd ) so using the output where the command is
# /usr/sbin/httpd -v
This should give some output if its already installed like
 Server version: Apache/2.2.3
 Server built:   May 2 2012 13:21:52


====Now checking part is done =============

Configure


sudo  /etc/httpd/conf/httpd.conf

It throws this error

Starting httpd: (13)Permission denied: make_sock: could not bind to address [::]:80
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs                [FAILED]

The problem here is that the port is used by some other service or something ,so either you have to kill it or configure new port on which httpd can be used or apache.(I prefer the latter as no risk in that)

For killing 
#  ps -aux | grep httpd
Find the pid which is using this
# kill -9  //make sure you don't kill any important process 

Configuring new port

Run this command
# sudo semanage port -l | grep -w http_port_t  ( To view the ports SELinux allows httpd to listen on:)
    O/p on machine is 80, 443, 488, 8008, 8009, 8443 

Edit /etc/httpd/conf/httpd.conf as the root user. Configure the Listen option so it lists a port that is not configured in SELinux policy configuration for httpd like 12345

Go here and add Listening port info

# sudo vi  /etc/httpd/conf/httpd.conf 

Add this line 
Listen 127.0.0.1:12345

Now you have to configure  SELinux to allow httpd to listen on port 12345,use this command

# sudo semanage port -a -t http_port_t -p tcp 12345

Start apache again

# sudo /etc/rc.d/init.d/httpd start

Note : 1. You may hav to add /usr/sbin and /usr/bin in your path  if its not already
            2. You can set SELinux disabled using setenforce 0 command though never advisable.

====Done=====





Monday, February 22, 2010

For installing ns-2 on linux systems

========================================
# first put the tar.gz file in the folder say /home/abc

then

# use this command
# tar -zxvf ns-allinone-2.31.tar.gz
# cd ns-allinone-2.31
#./install

now to add this on startup do this.

cd /etc and type

gedit ~/.bashrc

Add the following lines to the end of it.

Replace “/usr/local/” by your installation path like mine was “/home/jigsaw”.

# LD_LIBRARY_PATH
OTCL_LIB=/usr/local/ns-allinone-2.31/otcl-1.12
NS2_LIB=/usr/local/ns-allinone-2.31/lib
X11_LIB=/usr/X11R6/lib
USR_LOCAL_LIB=/usr/local/lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OTCL_LIB:$NS2_LIB:$X11_LIB:$USR_LOCAL_LIB

# TCL_LIBRARY
TCL_LIB=/usr/local/ns-allinone-2.31/tcl8.4.14/library
USR_LIB=/usr/lib
export TCL_LIBRARY=$TCL_LIB:$USR_LIB

# PATH
XGRAPH=/usr/local/ns-allinone-2.31/bin:/usr/local/ns-allinone-2.30/tcl8.4.13/unix:/usr/local/ns-allinone-2.31/tk8.4.13/unix
NS=/usr/local/ns-allinone-2.31/ns-2.31/
NAM=/usr/local/ns-allinone-2.31/nam-1.12/
PATH=$PATH:$XGRAPH:$NS:$NAM

then do

source ~/.bashrc




====================================


Friday, October 23, 2009

yum installation related problems

this problem has really disturbed me for quite a while.
#the problem
#yum update

Error: Cannot retrieve repository metadata (repomd.xml) for repository: fedora. Please verify its path and try again

so here is he solution

first u need to make some changes in these two files
/etc/yum.repos.d/fedora.repo and
/etc/yum.repos.d/fedora-updates.repo

Now un-comment all the lines that start with the term baseurl and place a comment before all lines that start with mirrorlist. Do this for both the above files.then
edit your /etc/hosts file and append the following to it’s contents:

80.239.156.215          mirrors.fedoraproject.org
213.129.242.84 mirrors.rpmfusion.org


Now try updating your system or installing any software via Yum. You will see, the error is now resolved and the error message is not shown anymore.

Enjoi :)


FEDORA 11 leonidas related problems

hi,all
just installed fedora 11.
If u got any problem post it here.

Sunday, August 9, 2009

Display problem

Display problem

1.log into root by typing
#su
#password
2.go to this directory
# cd /etc/X11
3.edit this file
# vi xorg.conf
then look for the section "screen"
mine look like this :

Section "Screen"
Identifier "Screen0"
Device "Videocard0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1024x768" "640x480"
EndSubSection

edit the line containing Modes to the desired screen resolution

4.save the file and exit

5.find the pid of X server by
# ps -e | grep X

6.then kill it by
# kill -9 pid

(note: pid is what u get after step 5.)

you will then get logon prompt .

and your problem is solved

DONE :)

NOTE : But there is one catch in this as far as i'm concerned resolution greater than 1024x768 doesn't work on fedora 9.i will update this when i get this problem solved.
Enjoi :)


Saturday, April 4, 2009

SOME EXTRAS

SOME EXTRAS:)

NOTE : if u forgot then ,u need to be root to install any application.:D

FOR Permanently Accessing Windows Partitions

#'yum install ntfs-config

You can find it in System -> Administration -> NTFS Configuration Tool

====================================================:) enjoy

For Google Earth

Go to this page http://earth.google.com/download-earth.html and download GoogleEarthLinux.bin. Next open a terminal and go to the folder you have saved it, Install it by typing:

# GoogleEarthLinux.bin

you can find it under Applications -> Internet -> Google Earth. Note that in order it to run ok you must have installed drivers for your video card.

================================================:)Enjoi


FOR linuxdcpp (linuxdc++)

# yum install linuxdcpp

*FOR Partition Editor

For GNOME users gtk based partition manipulation program

# install gparted
For KDE users Qt based partition manipulation program

# yum install qtparted
===============================================:)

FOR unrar

# yum install unrar


================

FOR Bittorrent

# yum install bittorrent bittorrent-gui

==================================

FOR k3b

One of the best Linux CD/DVD burning program. It comes along with a lot KDE dependencies if you are using GNOME.

# yum install k3b
To enable all encoding features and programs for k3b type:

# yum install k3b-extras-nonfree vcdimager normalize transcode lame

====================================================



Adding the RPM Fusion repositories during install

FOR Adding the RPM Fusion repositories during install do this:)
Note:Before you start installing Fedora making sure you have a supported network card and over which a connection to the internet can be established. Start the install and move through the different anaconda screens where you select language, keyboard layout, root password and target volume until you get to the Additional Tasks screen:
then click on
add additional software repositories

Then follow these steps to enable the RPM Fusion free repository:

  1. In the Additional Repositories section, click the Add additional software repositories button.

  2. In the Edit Repository dialog, set the Repository name: 'RPM Fusion Free'
  3. Set Repository type: HTTP/FTP

  4. Set Repository URL depending distribution version and the architecture. For Fedora 10 on i386 use
    http://mirrors.rpmfusion.org/free/fedora/x/i386  note:where x is version of fedora
  5. Click URL is a mirror list

  6. Click OK

Notes:

  • For other architectures like x86_64 or PPC/PPC64, change i386 to x86_64, ppc, or ppc64 in the repository URL.

  • Packages in the nonfree repository require packages from the free repository to be available, hence you must enable the free repository if you want to enable the nonfree repository.

  • If you enable the Fedora Updates repository during install then you have to activate the RPM Fusion Updates repositories during install in addition to the RPM Fusion Release repositories. The URLs for the Updates repositories are similar to the ones for the release repositories. Some examples:

    Repository

    URL for i386

    RPM Fusion Free Release for F10

    http://mirrors.rpmfusion.org/free/fedora/10/i386

    RPM Fusion Nonfree Release for F10

    http://mirrors.rpmfusion.org/nonfree/fedora/10/i386

    RPM Fusion Free Update for F10

    http://mirrors.rpmfusion.org/free/fedora/updates/10/i386

    RPM Fusion Nonfree Updates for F10

    http://mirrors.rpmfusion.org/nonfree/fedora/updates/10/i386


To install compiz fusion and all reated themes

COMPIZ FUSION:

these are for official packages:)

#yum install compiz-fusion compiz-fusion-gnome compiz-fusion-extras compiz-fusion-extras-gnome compiz-manager gnome-compiz-manager ccsm fusion-icon fusion-icon-gtk emerald emerald-themes

these are for unofficial packages:(

#yum install compiz-all fusion-icon-all compiz-fusion-plugins-unsupported compiz-fusion-plugins-extra compiz-bcop ccsm emerald-themes compizconfig-backend-gconf compizconfig-backend-kconfig


FOR Auto start

GNOME:

Go to System -> Preferences -> Personal -> Sessions and click Add. Then type

name : Fusion Icon
command : fusion-icon
Comment : Compiz Fusion panel applet

then make a symbolic link by typing this terminal
#ln -s /usr/bin/fusion-icon

Logout and then back in. Now you should see a blue icon in your tray. Right click on it and go to Select Window Manager -> Compiz. You can leave the default Window Decorator or select emerald through Select Window Decorator -> Emerald. If you click on Settings Manager, ccsm will run and you can configure compiz fusion as you like. Enjoy! :)

Sunday, March 22, 2009

Back up your MBR

Backup MBR with dd command

Backing up partition is nothing but actually backing up MBR (master boot record). The

command is as follows for backing up MBR stored on /dev/sdX or /dev/hdX :
# dd if=/dev/sdX of=/tmp/sda-mbr.bin bs=512 count=1

Replace X with actual device name such as /dev/sda.

Now to restore partition table to disk, all you need to do is use dd command:
# dd if= sda-mbr.bin of=/dev/sdX bs=1 count=64 skip=446 seek=446

NJOI:)

Thursday, January 8, 2009

Recovery problems

Bootrec.exe tool in the Windows Recovery

It repairs the following items in Windows Vista:
• A master boot record (MBR)
• A boot sector


To run the Bootrec.exe tool, you must start Windows RE(recovery environment). To do this, follow these steps:
1. Put the Windows Vista installation disc in the disc drive, and then start the computer.
2. Press a key when you are prompted.
3. Select a language, a time, a currency, a keyboard or an input method, and then click Next.
4. Click Repair your computer.
5. Click the operating system that you want to repair, and then click Next.
6. In the System Recovery Options dialog box, click Command Prompt.
7. Type Bootrec.exe, and then press ENTER.

Note: This is only possible with windows vista recovery cd which you can get with vista installation cd/dvd or from

net you can download it.

Bootrec.exe options
The Bootrec.exe tool supports the following options. Use the option that is appropriate for your situation.

Note: If rebuilding the BCD does not resolve the startup issue, you can export and delete the BCD, and then run

this option again. By doing this, you make sure that the BCD is completely rebuilt. To do this, type the following

commands at the Windows RE command prompt:
• bcdedit /export C:\BCD_Backup
• c:
• cd boot
• attrib bcd -s -h -r
• ren c:\boot\bcd bcd.old
• bootrec /RebuildBcd
/FixMbr
The /FixMbr option writes a Windows Vista-compatible MBR to the system partition. This option does not overwrite

the existing partition table. Use this option when you must resolve MBR corruption issues, or when you have to

remove non-standard code from the MBR.
/FixBoot
The /FixBoot option writes a new boot sector to the system partition by using a boot sector that is compatible with

Windows Vista. Use this option if one of the following conditions is true:
• The boot sector has been replaced with a non-standard Windows Vista boot sector.
• The boot sector is damaged.
• An earlier Windows operating system has been installed after Windows Vista was installed. In this scenario,

the computer starts by using Windows NT Loader (NTLDR) instead of Windows Boot Manager (Bootmgr.exe).
/ScanOs
The /ScanOs option scans all disks for installations that are compatible with Windows Vista. Additionally, this

option displays the entries that are currently not in the BCD store. Use this option when there are Windows Vista

installations that the Boot Manager menu does not list.
/RebuildBcd
The /RebuildBcd option scans all disks for installations that are compatible with Windows Vista. Additionally, this

option lets you select the installations that you want to add to the BCD store. Use this option when you must

completely rebuild the BCD

Reinstalling Grub boot loader
BY
COMMANDS @ TERMINAL
COMMANDS TO REINSTALL GRUB:
U just need to enter the terminal using the installation CD/DVD of your GNU/Linux operating system.

Once you are at the terminal. type this:
$ grub
If it says that you don’t have the permission. Type this command at the terminal:
$ sudo grub
You will get the grub-shell prompt:
grub>

Now, you need to find out in which partition Grub had been installed before, so that you reinstall in that

partition only. Give this command at the terminal:
grub> find /boot/grub/stage1
(returns value)
It returns the number of the partition in which Grub i.e your GNU/Linux had been installed.
e.g.,

grub> find /boot/grub/stage1
(hd0,2)


NOTE:
Sometimes, when Grub has not been installed properly, the file “/boot/grub/stage1″ may not exist. So, the output

will be “Error 15: File not found”. In such a case, come out of the grub-shell by pressing “Ctrl+c”. Then, at the

shell prompt, give this command at the terminal:
$ fdisk -l
Again, if you are not logged in as root, give this command at the terminal:
$ sudo fdisk -l
The output will list all the partitions and it’s properties, including the file system type.
e.g.,
Device Boot Start End Blocks Id System
/dev/sda1 1 654 5253223+ b FAT32
/dev/sda2 * 655 1962 10506510 7 HPFS/NTFS
/dev/sda3 1963 3924 15759765 83 Linux
The “System” attribute of your GNU/Linux operating system will be “Linux”. So note down that partition number.
e.g., sda3
Since it’s array numbering, sdaN is mapped to (hd0,N-1).
Just (hd0) will be the Master Boot Record(MBR).
sda1 will be (hd0,0) and so on.
So, sda3 will be (hd0,2)
Now, log into the grub-shell prompt again.

Before reinstalling Grub, you will have to notify the partition that your Grub i.e. GNU/Linux is resided in. So,

give this command at the terminal:
grub> root (returned value)
e.g.,
grub> root (hd0,2)

Now, reinstall grub in the MBR i.e. the returned value without number part.
e.g., (hd0)
So, give this command at the terminal:
grub> setup (returned value without number part)
e.g.,
grub> setup (hd0)

Exit the grub-shell prompt using “Ctrl+c”.
Exit the shell prompt using “Ctrl+d”.

NOTE :

You can also reinstall Grub in your GNU/Linux partition, only if this GNU/Linux partition is “primary” and you have

another boot loader installed at the MBR(in case of more than one GNU/Linux operating systems) through which you

can boot this primary partition. To do that, give this command at the terminal:
grub> setup (returned value)
e.g.,
grub> setup (hd0,2)

Friday, October 31, 2008

Check this

HELLO PEOPLE,

In this blog u can find organized knowledge for installing different applications on fedora.

So just give a visit to it?
IF u like it ,do comment?
IF u don't like ,then also comment .
But In either case do give suggestions .

======================================

Njoi !!!!!!!!!!

Sorry for the inconvenience

my previous posts were showing some HTML errors ,so i have to delete all of them .All these are new posts with some modifications .

================

Njoi!!!!

Audio/video related problems

To check whether sound is properly configured or not


Here is the solution:



1. Open a terminal and switch to root user.
Launch the terminal from the panel menu
Click Applications->System Tools->Terminal
On the terminal type: su -
Type your root password and hit enter key on the keyboard.

2. Check whether sound is properly configured on your system.
play /usr/share/sounds/startup3.wav

If you hear sounds proceed further. Otherwise check volume control and sound devices configuration. Below is the output when you play the wav sound file from the terminal.
Input File : '/usr/share/sounds/startup3.wav'
Sample Size : 16-bit (2 bytes)
Sample Encoding: signed (2's complement)
Channels : 2
Sample Rate : 44100

Time: 00:02.50 [00:00.00] of 00:02.50 ( 100.0%) Output Buffer: 110.36K

=========================================================

now u can ROCK!!!

How to install any applications(apps) on fedora

If you have just installed GNU/Linux and would like to know how to install software on your new OS then go thru this.

There are many ways but I prefer these:
1.By downloading from internet and then installing manually
2. By installing repositories first and then using yum package installer

lets go for first method

REMEMBER: YOU HAVE TO BE ROOT USER FOR THIS
=======================you need to get the site address for the software(get it from any search engine )
#wget -c site addresslike (# wget -c http://easylinux.info/upload/1.0.bin.tar.bz2 )
# tar -jxvf filename
like( tar -zxvf ndiswrapper-1.53.tar.gz) (note: use jxvf only for tar.bz2 files,zxvf for tar.gz)it will create a directory by same filename to that directory
#cd directory
# ./configure
#make install
====================================================================================Now 2nd method (I prefer this most)
for this u have to install repositories first =============================================
# rpm -ivh http://rpm.livna.org/livna-release-8.rpm (if u rusing different version of fedora then just change the numeral above.)or
you can do it other way

first download corresponding livna-release.rpm from anywebsite (as required fedora 8,9)
then open terminal
go to the directory in which you u've downloaded the livna repo.and
#rpm -ivh livna-release-9.rpm
now the repo. is installed . now you u can continue with yum package installer
#yum install packagename

u can search for the package by
#yum search packagename
and then install the required package.


=====================================================================================
have fun

yum related problems

TIRED OF GETTING MESSAGE LIKE THIS

Another app is currently holding the yum lock; waiting for it to exit...
here is the solution


FIRST OF ALL u have to remove the lock from /var/run/ directory
============================================
# cd /var/run/
#ls -l yum.pid (just to confirm if there is any proces using yum ,you can skip this part )
#rm yum.pid
it will ask if uwant to remove [then press 'y'].
now the yum is unlocked.
u can now use yum
#yum -y install packagename
============================================================
have fun

To install codecs/plugins

To install codecs and plugins

#yum install gstreamer*

here are some commands for codecs/plugins

# yum install rhythmbox gstreamer-plugins-ugly gstreamer-plugins-bad gstreamer-ffmpeg

# yum install audacious audacious-plugins-nonfree *

# yum install amarok amarok-extras-nonfree amarok-visualisation

Fedora 9 video solutions

# yum install xine xine-lib-extras xine-lib-extras-nonfree libdvdcss ffmpeg libstdc + +. So.5


#yum install gstreamer-plugins-bad gstreamer-plugins-bad-extras gstreamer-plugins-ugly xine-lib-extras-nonfree


#yum install ffmpeg ffmpeg-libs ffmpeg2theora gstreamer-ffmpeg

For media players audio/video

For different players

FOR VLC

#yum install vlc

for xmms (its like winamp for linux)

# yum install xmms.i386
# yum install xmms-mp3
#yum install xmms-skins

FOR KPLAYER

# yum install kplayer.i386

FOR MPLAYER

#yum -y install mplayer-gui

#yum -y install mplayerplug-in


FOR AMAROK

#yum -y install amarok



FOR TOTEM PLAYER

#yum install totem-xine totem-xine-mozplugin totem-xine-galago totem-xine-lirc

For Audacious player

#yum install audacious-plugins-nonfree-aac audacious-plugins-nonfree-alac
audacious-plugins-nonfree-lame audacious-plugins-nonfree-mms audacious-plugins-nonfree-mp3 audacious-plugins-nonfree-tta audacious-plugins-nonfree-wma audacity-nonfree


=========================================================================
have fun