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