Install FreeSwitch in CentOS

Before we proceed, let’s make one thing certain: FreeSwitch Download & Installation Guide is and always will be better than this guide. However, what I try to do here is make things mentioned in the official guide more clear. Since FreeSwitch recommends using the code in trunk, we will follow this recommendation and the Quick and Dirty Install.

Install svn

svn is required to check-out code from FreeSwitch’s trunk. To install it, run the following command:

sudo yum install subversion

Stop Asterisk

If Asterisk is installed and running, you need to stop it first. Run the following commands:

sudo /usr/sbin/asterisk -r
codeghar*CLI> stop now

Install Development Tools

To make sure you have the things you might need to install FreeSwitch, install the following:

sudo yum install gcc gcc-c++ make automake autoconf libtool libtermcap-devel ncurses-devel

Download FreeSwitch

cd /usr/src/
sudo mkdir freeswitch
sudo chmod o+rwx freeswitch (This is unsafe)
cd /usr/src/freeswitch/

Now sit back and let it do its thing. Once that’s done, run the following commands:

make all
cd freeswitch.trunk
sudo make install
sudo make cd-sounds-install
sudo make cd-moh-install

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 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:



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

name=CentOS $releasever - $basearch - ATrpms

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!


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 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 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 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 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'

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. 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.


Get every new post delivered to your Inbox.

Join 30 other followers