Yum repomd.xml Error

I installed Fedora 11 in a VMware virtual machine from a DVD iso image. After installation, I went on to do yum update and got this message: Error: Cannot retrieve repository metadata (repomd.xml) for repository: fedora. Searching the web revealed one most-recommended solution: check your DNS settings. It turns out, repomd.xml is a file located on the mirror from which you are trying to download updates, new package, whatever. The error message is displayed when yum is unable to either find or get the repomd file.

The first thing you should check is your Internet connection. Maybe try to ping some server (ping -c 3 google.com). If your connection is fine, the issue could be with DNS settings, proxy issues, or maybe the mirror you are connecting to is having problems. One solution I found said they simply waited some hours and it worked. It indicates to me that maybe the mirrors were having a hard time when they first tried but when their load decreased things were ok.

When I checked, eth0 on my Fedora install was disabled. I had to enable it, make sure network card was connected on VMware, brought down the interface and brought it back up. It used DHCP to get a new IP. I tested a ping to a server and it was successful. Now yum worked just fine.

Enable eth0

To enable eth0, I had to change the ifcfg-eth0 file. I ran the following commands:

sudo vim /etc/sysconfig/network-scripts/ifcfg-eth0

And made sure the following two lines were present:

ONBOOT=yes

BOOTPROTO=dhcp

Bring Down Interface and Bring it Up

To bring down my eth0 interface, I ran

sudo ifdown eth0

To bring it back up, I ran

sudo ifup eth0

How to install Asterisk on CentOS? Package installation.

Follow these steps to install Asterisk (Open source PBX) on CentOS.

Step 1.

Make sure following packages were installed on CentOS/

  • kernel-devel OR kernel-smp-devel
  • bison
  • openssl-devel

To installed above packages run following commands

sudo yum install kernel-devel
sudo yum install bison
sudo yum install openssl-devel

Step 2.

Now add atrpms repository for Asterisk Installation

  • Create the file called atrpms.repo
sudo vim /etc/yum.repos.d/atrpms.repo

put following in the file

[atrpms]
name=CentOS $releasever - $basearch - ATrpms
baseurl=http://dl.atrpms.net/el$releasever-$basearch/atrpms/stable
gpgkey=http://atrpms.net/RPM-GPG-KEY.atrpms
gpgcheck=1

Step 3.

Run update command

sudo yum -y update

Step 4.

Now run following command to installed Asterisk

sudo yum install asterisk

After installation completed run following commands to check Asterisk status.

To check Asterisk Status

sudo /etc/init.d/asterisk status

To Start Asterisk

sudo /etc/init.d/asterisk start

To Stop Asterisk

sudo /etc/init.d/asterisk stop

To Restart Asterisk

sudo /etc/init.d/asterisk restart

5. Asterisk CLI

Go to asterisk directory and then use command -rvvv

                      cd /etc/asterisk/
                      asterisk]# asterisk -rvvvv

where ‘v’ indicates verbosity


Good Luck!

Reference:

How to install Asterisk on CentOS server

Types of Repositories

Many linux distributions divide their repositories into different parts based on certain criteria. It could be for support, policy, or anything else. I have tried to understand what kinds of repositories are out there for some distributions, and have always had a hard time remembering what is what. So I will provide a brief introduction here and link to more information. I hope you find this a good stepping stone to complete understanding.

Ubuntu

Ubuntu has four types of repositories: main, restricted, universe, and multiverse. Main contains free software which the Ubuntu distribution fully supports. Restricted may hold software which may not be free (or open source) but Ubuntu supports it. Universe contains open source software but it is not officially supported b Ubuntu. There is no guarantee for even security updates. Multiverse contains software which is absolutely not “free” and the advice is to use this at your own risk.

Debian

Debian has three main types of repositories: main, contrib, and non-free. There is a third-party unofficial apt repository and a multimedia packages repository.

Fedora

Fedora has three main types of repositories: base, updates, and extras. Base contains software which make up the actual Fedora distribution on a disc. Updates contains updates to the packages in base. Additional software is provided in extras. Apart from these official types of repositories, there are some third-party repositories which are not officially supported by Fedora project. These include, but are not limited to, RPMforge, Livna, Fresh RPMs, and ATrpms.

CentOS

CentOS has many types of repositories: os, updates, extras, addons, centosplus, and contrib. As with Fedora, the same third-party repositories may be used. There is another repository, called Extra Packages for Enterprise Linux (EPEL) which aims to provide packages not included in the main CentOS repositories. And then there are additional repositories.

Django in CentOS

This post has been written using CentOS 5.2, but these instructions may also work for other versions. Just let us know if they don’t.

Install EPEL

Extra Packages for Enterprise Linux (EPEL) is “a repository of high-quality add-on packages that complement the Fedora-based Red Hat Enterprise Linux [...] and its compatible spinoffs such as CentOS or Scientific Linux.” You need this repository to install Django from a package. Another option is to download source and compile yourself. This guide, however, will be using packages. So just follow the instructions to add EPEL repository, which state:

su -c 'rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm'

Install Django

To install django from EPEL, just run the following command:

sudo yum install Django

Notice the uppercase ‘D’ in the name of the package. Django is installed in /usr/lib/python2.4/site-packages/django/ and it should already be included in the path.

Test Django

To make sure everything was installed properly, try to create a simple new project.

django-admin.py startproject /home/me/mynewproject

If a directory with the same name and some standard django sub-directories are created, then your installation was successful.

CentOS Wallpapers Location

In CentOS under Gnome (don’t know about KDE), wallpapers by default are kept in /usr/share/backgrounds/images/ folder. If I need to change the default wallpaper, I rename the existing default wallpaper (default.jpg) to something else (say, default-old.jpg), and rename the new default as default.jpg.

Wireshark on CentOS

The most obvious way to install Wireshark on CentOS is

yum install wireshark

But if you are in Gnome (I am not sure about KDE because I didn’t test on it), then you have to install this:

yum install wireshark-gnome

Hat tip: SOLVED – Re: [CentOS] wireshark install did not seem to work

CentOS Network Install

In CentOS 5.2, one can use the Debian-like network install (net install) disk image to install it. When it asks what kind of media contains installation stuff, CD, FTP, NFS, HTTP, or something else, choose HTTP. Enter required information as follows and then follow instructions. Substitute website and directory information with whatever information you have.

Web site name: sunsite.utk.edu
CentOS directory: ftp/pub/linux/CentOS/5.2/os/i386

Another good location may be

Web site name: mirror.stanford.edu
CentOS directory: yum/pub/centos/5.2/os/i386

Yet another good site may be

Web site name: mirror.linux.duke.edu
CentOS directory: pub/centos/5.2/os/i386

Why Use Net Install?

You basically have two options when installing CentOS: CD/DVD, or net install. You may wish to use net install when you do not want to waste unnecessary bandwidth by downloading all six CDs or one DVD. You download and install exactly what you require. Multiply this with as many servers as you are installing on and you can save considerable bandwidth on the mirror you are using.

The flip side is that you are using HTTP (if you are, that is) and it costs the mirror money. If you use a peer to peer system, like BitTorrent, then you are spreading that bandwidth usage to more than one party. Also, with torrents, you can download a release once and then burn as many copies as you need. This way you consume bandwidth once and then no need to do it any more.

You can also create a mirror of your own or just use NFS for your local net install-based installations. Again, you just download what you require (or everything just once, at least) and then all other computers can download over local network.

I would say if you are installing just a handful of servers, use net install. If it’s more than a handful of servers and you can afford to burn CDs or DVDs (lots of them if installing in parallel on more than one machine), then use a torrent to download all CD/DVDs. If you have a whole lot of machines, then create your local repository, mirror, NFS server, or whatever, and then use net install over local network. How do you install?

Hat Tips: Performing a Network Install; CentOS Netinstall settings;

Follow

Get every new post delivered to your Inbox.

Join 34 other followers